wrong pkg-config prefix

master
Marc Wäckerlin 10 years ago
parent 293e01d115
commit 3aaa9f4e27
  1. 5
      ChangeLog
  2. 39
      ax_check_qt.m4
  3. 13
      ax_init_standard_project.m4
  4. 4
      bootstrap.sh
  5. 6
      configure.ac
  6. 4
      src/libpcscxx.pc.in

@ -1,3 +1,8 @@
2015-03-14 09:31 marc
* ChangeLog, ax_init_standard_project.m4, bootstrap.sh,
src/libpcscxx.pc.in: add compile dependencies
2015-03-13 16:30 marc
* ax_check_qt.m4, ax_init_standard_project.m4, bootstrap.sh,

@ -62,16 +62,35 @@ AC_DEFUN([AX_CXX_QT_TOOLS], [
AX_CXX_QT_TOOL(LRELEASE, lrelease)
])
AC_DEFUN([AX_CXX_CHECK_QT], [
AC_DEFUN([AX_CHECK_VALID_FLAG], [
AC_MSG_CHECKING([m4_default([$2], [for valid flag in "$1"])])
save_cxxflags="$CXXFLAGS"
newflag="no"
for test_flag in $1; do
CXXFLAGS+=" ${test_flag}"
AC_COMPILE_IFELSE([AC_LANG_PROGRAM()], [
newflag="$test_flag"
AM_CXXFLAGS+=" ${test_flag}"
CXXFLAGS="$save_cxxflags"
break;
])
CXXFLAGS="$save_cxxflags"
done
AC_SUBST(AM_CXXFLAGS)
AC_MSG_RESULT([$newflag])
])
AC_DEFUN([AX_CHECK_QT], [
qt_modules="$2"
AX_CXX_QT_TOOLS
HAVE_$1=0
PKG_CHECK_MODULES([$1], [${qt_modules//Qt/Qt5}], [
PKG_PROG_PKG_CONFIG
PKG_CHECK_MODULES([$1]5, [${qt_modules//Qt/Qt5}], [
HAVE_$1=1
AC_DEFINE([HAVE_$1])
AM_CPPFLAGS+=" ${$1_CFLAGS}"
AM_CXXFLAGS+=" ${$1_CFLAGS}"
LIBS+=" ${$1_LIBS}"
AM_CPPFLAGS+=" ${[$1]5_CFLAGS}"
AM_CXXFLAGS+=" ${[$1]5_CFLAGS}"
LIBS+=" ${[$1]5_LIBS}"
], [
PKG_CHECK_MODULES([$1], [${qt_modules}], [
HAVE_$1=1
@ -82,10 +101,11 @@ AC_DEFUN([AX_CXX_CHECK_QT], [
], [HAVE_$1=0])
])
AM_CONDITIONAL(HAVE_$1, test $HAVE_$1 -eq 1)
AX_CHECK_VALID_FLAG([-fPIC -fPIE], [position independent code flag])
AC_SUBST(AM_CPPFLAGS)
AC_SUBST(AM_CXXFLAGS)
AX_ADDITIONAL_QT_RULES_HACK='
%_ui.hxx: %.ui
ui_%.hxx: %.ui
${UIC} -o [$][@] $<
moc_%.cxx: %.hxx
@ -95,3 +115,10 @@ qrc_%.cxx: %.qrc
${RCC} -o [$][@] $<'
AC_SUBST(AX_ADDITIONAL_QT_RULES_HACK)
])
AC_DEFUN([AX_REQUIRE_QT], [
AX_CHECK_QT([$1], [$2])
if ! test "$HAVE_$1" -eq 1; then
AC_MSG_ERROR([Required Qt modules not found: $2])
fi
])

@ -251,3 +251,16 @@ uninstall-documentation:
#### End: $0
EOF
])
AC_DEFUN([AX_PKG_REQUIRE], [
PKG_PROG_PKG_CONFIG
PKG_CHECK_MODULES([$1], [$1], [
AM_CPPFLAGS+=" ${$1_CFLAGS}"
AM_CXXFLAGS+=" ${$1_CFLAGS}"
LIBS+=" ${$1_LIBS}"
], [
AC_MSG_ERROR([Required package $1 not found])
])
AC_SUBST(AM_CPPFLAGS)
AC_SUBST(AM_CXXFLAGS)
])

@ -282,8 +282,8 @@ if ! test -f makefile.am; then
echo "${HEADER}SUBDIRS =${SUBDIRS}" | to makefile.am
fi
to --condition AX_USE_LIBTOOL src/${PACKAGE_NAME}.pc.in <<EOF
${HEADER}prefix=@PACKAGE_NAME@
exec_prefix=${prefix}
${HEADER}prefix=@prefix@
exec_prefix=@exec_prefix@
libdir=${exec_prefix}/lib
includedir=${prefix}/include

@ -18,9 +18,9 @@ AX_USE_RPM_PACKAGING
AX_BUILD_EXAMPLES
# qt features
AX_CXX_CHECK_QT([QTGUI], [QtCore QtGui])
AX_CXX_CHECK_QT([QTWIDGETS], [QtWidgets]) # optional, needed only for qt5
AX_CXX_CHECK_QT([QTNETWORK], [QtNetwork])
AX_CHECK_QT([QTGUI], [QtCore QtGui])
AX_CHECK_QT([QTWIDGETS], [QtWidgets]) # optional, needed only for qt5
AX_CHECK_QT([QTNETWORK], [QtNetwork])
# programs
#PKG_PROG_PKG_CONFIG

@ -1,5 +1,5 @@
prefix=@PACKAGE_NAME@
exec_prefix=${prefix}
prefix=@prefix@
exec_prefix=@exec_prefix@
libdir=${exec_prefix}/lib
includedir=${prefix}/include

Loading…
Cancel
Save