dnl AX_CHECK_HEADER_LIB([HEADER-NAME], [LIBRARY-NAME], [FUNCTION-IN-LIB], [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND], [LIB-WEB-PAGE]) AC_DEFUN([AX_CHECK_HEADER_LIB], [ _header_check="" _lib_check="" AC_CHECK_HEADER([$1], [_header_check="yes"], [_header_check="no"]) AC_CHECK_LIB([$2], [$3], [_lib_check="yes"], [_lib_check="no"]) if [test "x$_header_check" = "xyes" && test "x$_lib_check" = "xyes"] ; then LIBS="$LIBS -l$2" $4 else echo "no Support for $2" $5 fi ]) dnl AX_CHECK_REQUIRED_HEADER_LIB([HEADER-NAME], [LIBRARY-NAME], [FUNCTION-IN-LIB], [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND], [LIB-WEB-PAGE]) AC_DEFUN([AX_CHECK_REQUIRED_HEADER_LIB], [ _header_check="" _lib_check="" for _header in $1 do AC_CHECK_HEADER([$_header], [_header_check="yes"], [_header_check="no"]) if test "x$_header_check" = "xyes" ; then break fi done AC_CHECK_LIB([$2], [$3], [_lib_check="yes"], [_lib_check="no"]) if [test x$_header_check = "xyes" && test "x$_lib_check" = "xyes"] ; then LIBS="$LIBS -l$2" $4 else echo "------------------" echo "LIBRARY $2 not found." echo "please install the $2-LIBRARY-package which can be found at $6" echo "------------------" $5 exit -1 fi ]) dnl AX_CHECK_REQUIRED_LIB([LIBRARY-NAME], [FUNCTION-IN-LIB], [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND], [LIB-WEB-PAGE]) AC_DEFUN([AX_CHECK_REQUIRED_LIB], [ _lib_check="" _found_lib="" for _lib in $1 do AC_CHECK_LIB([$_lib], [$2], [_lib_check="yes"], [_lib_check="no"]) if test "x$_lib_check" = "xyes" ; then _found_lib=$_lib break fi done if [test "x$_lib_check" = "xyes"] ; then LIBS="$LIBS -l$_found_lib" $3 else echo "------------------" echo "LIBRARY $1 not found." echo "please install the $1-LIBRARY-package which can be found at $5" echo "------------------" $4 exit -1 fi ]) dnl AX_CHECK_QT([QTDIR], [LIBRARIES], [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND], [LIB-WEB-PAGE]) AC_DEFUN([AX_CHECK_QT], [ _lib_check="" _found_lib="" QT_PREFIX="$1" QT_LIBS="" QT_CXXFLAGS="-I${QT_PREFIX}/include" QT_LDFLAGS="-L${QT_PREFIX}/lib -Wl,-rpath -Wl,${QT_PREFIX}/lib" QT_BIN_DIR="${QT_PREFIX}/bin" QT_COMMON_INCLUDE_DIRECTORIES=/usr/include `ls -dr /usr/include/qt*` `ls -dr /usr/lib/qt*/include` `ls -dr /usr/local/qt*/include` `ls -dr /opt/qt*/include` `ls -dr /Developer/qt*/include` QT_COMMON_LIB_DIRECTORIES=/usr/lib `ls -dr /usr/lib/qt*` `ls -dr /usr/local/qt*/lib` `ls -dr /opt/qt*/lib` `ls -dr/Developer/qt*/lib` CACHED_CPPFLAG=${CPPFLAGS} CACHED_LDFLAGS=${LDFLAGS} LDFLAGS="${LDFLAGS} ${QT_LDFLAGS}" for _lib in $2 do AC_CHECK_LIB([$_lib], [main], [_lib_check="yes"], [_lib_check="no"]) if test "x$_lib_check" = "xyes" ; then _found_lib=$_lib break fi done if [test "x$_lib_check" = "xyes"] ; then QT_LIBS="${QT_LIBS} -l$_found_lib" $3 else echo "------------------" echo "LIBRARY $2 not found.in $1" echo "please install the $1-LIBRARY-package which can be found at $5" echo "------------------" $4 exit -1 fi AC_SUBST([QT_LIBS]) AC_SUBST([QT_CXXFLAGS]) AC_SUBST([QT_LDFLAGS]) #----------# # QT - MOC # #----------# AC_PATH_PROG([QT_MOC], [moc], [no], ["${QT_BIN_DIR}:${PATH}"]) if test x${QT_MOC} = xno ; then AC_MSG_ERROR([QT MOC not found]) fi AC_SUBST([QT_MOC]) AC_PATH_PROG([QT_UIC], [uic], [no], ["${QT_BIN_DIR}:${PATH}"]) # if test x${QT_UIC} = xno ; then # AC_MSG_WARN([QT UIC not found]) # fi AC_SUBST([QT_UIC]) AC_PATH_PROG([QT_RCC], [rcc], [no], ["${QT_BIN_DIR}:${PATH}"]) # if test x${QT_RCC} = xno ; then # AC_MSG_WARN([QT RCC not found]) # fi AC_SUBST([QT_RCC]) # Restore Values of CPPFLAGS and LDFLAGS CPPFLAGS=${CACHED_CPPFLAG} LDFLAGS=${CACHED_LDFLAGS} ])