[asterisk-commits] branch group/autoconf_and_menuselect r18602 -
/team/group/autoconf_and_menuse...
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Sun Apr 9 10:45:33 MST 2006
Author: dancho
Date: Sun Apr 9 12:45:30 2006
New Revision: 18602
URL: http://svn.digium.com/view/asterisk?rev=18602&view=rev
Log:
Added more robust check for Qt library
Modified:
team/group/autoconf_and_menuselect/configure.ac
team/group/autoconf_and_menuselect/makeopts.in
Modified: team/group/autoconf_and_menuselect/configure.ac
URL: http://svn.digium.com/view/asterisk/team/group/autoconf_and_menuselect/configure.ac?rev=18602&r1=18601&r2=18602&view=diff
==============================================================================
--- team/group/autoconf_and_menuselect/configure.ac (original)
+++ team/group/autoconf_and_menuselect/configure.ac Sun Apr 9 12:45:30 2006
@@ -187,9 +187,8 @@
AC_LINK_IFELSE(
[
AC_LANG_PROGRAM(
- [#include "${VPB_DIR}/vpbapi.h"],
- [
- int q = vp b_open(0,0);])
+ [#include "${VPB_DIR}vpbapi.h"],
+ [int q = vpb_open(0,0);])
],
[ AC_MSG_RESULT(yes)
ac_cv_lib_vpb_vpb_open="yes"
@@ -222,21 +221,82 @@
fi
AC_SUBST([PBX_LIBvpb])
+
+AC_LANG(C++)
+
+AC_ARG_WITH([qt], AC_HELP_STRING([--with-qt=PATH],[use Qt files in PATH]),[
+case ${withval} in
+ n|no)
+ USE_QT=no
+ QT_MANDATORY="yes"
+ ;;
+ y|ye|yes)
+ ;;
+ *)
+ QT_DIR="${withval}"
+ QT_MANDATORY="yes"
+ ;;
+esac
+])
+
PBX_QT=0
-AC_PATH_TOOL(QTMOC, moc, No)
-if test ! x"${QTMOC}" = xNo; then
- QTDIR=$(${DIRNAME} ${QTMOC})
- QTDIR=$(${DIRNAME} ${QTDIR})
-
- AC_CHECK_HEADER(
- [${QTDIR}/include/qapplication.h],
+if test "${USE_QT}" != "no"; then
+ echo -n "checking for QDate in -lqt..."
+ saved_ldflags="${LDFLAGS}"
+ LDFLAGS="${LDFLAGS} -L${QT_DIR}/lib -lqt"
+ qtlib="qt"
+ AC_LINK_IFELSE(
[
- PBX_QT=1
- AC_DEFINE([HAVE_QT], 1, [Define if your system has the QT libraries.])
- ])
-fi
-AC_SUBST(PBX_QT)
-AC_SUBST(QTDIR)
+ AC_LANG_PROGRAM(
+ [#include "${QT_DIR}include/qdatetime.h"],
+ [QDate date();])
+ ],
+ [ac_cv_lib_qt_qt_date="yes"],
+ [ac_cv_lib_qt_qt_date="no"])
+
+ if test "${ac_cv_lib_qt_qt_date}" = "no"; then
+ qtlib="qt-mt"
+ LDFLAGS="${saved_ldflags} -L${QT_DIR}/lib -lqt-mt"
+ AC_LINK_IFELSE(
+ [
+ AC_LANG_PROGRAM(
+ [#include "${QT_DIR}include/qdatetime.h"],
+ [QDate date();])
+ ],
+ [ac_cv_lib_qt_qt_date="yes"],
+ [ac_cv_lib_qt_qt_date="no"])
+ fi
+
+ LDFLAGS="${saved_ldflags}"
+
+ if test "${ac_cv_lib_qt_qt_date}" = "yes"; then
+ AC_MSG_RESULT(yes)
+ else
+ AC_MSG_RESULT(no)
+ fi
+
+ if test "${ac_cv_lib_qt_qt_date}" = "yes"; then
+ QT_LIB="-l${qtlib}"
+ if test "${QT_DIR}" != ""; then
+ QT_LIB="-L${QT_DIR}/lib ${QT_LIB}"
+ QT_INCLUDE="-I${QT_DIR}/include"
+ AC_SUBST([QT_INCLUDE])
+ fi
+ AC_SUBST([QT_LIB])
+ PBX_QT=1
+ AC_DEFINE([HAVE_LIBQT], 1, [Define if your system has the Qt library])
+ AC_PATH_TOOL(QTMOC, moc, No)
+ elif test ! -z "${QT_MANDATORY}";
+ then
+ echo "***"
+ echo "*** The Qt installation on this system appears to be broken."
+ echo "*** Either correct the installation, or run configure"
+ echo "*** including --without-qt."
+ exit 1
+ fi
+fi
+AC_SUBST([PBX_QT])
+
PBX_KDE=0
AC_PATH_TOOL(KDEINIT, kdeinit, No)
@@ -294,9 +354,8 @@
AC_LINK_IFELSE(
[
AC_LANG_PROGRAM(
- [#include "${PWDIR_DIR}/ptime.h"],
- [
- int q = PTime::IsDaylightSaving();])
+ [#include "${PWDIR_DIR}ptime.h"],
+ [int q = PTime::IsDaylightSaving();])
],
[ AC_MSG_RESULT(yes)
ac_cv_lib_pwlib="yes"
Modified: team/group/autoconf_and_menuselect/makeopts.in
URL: http://svn.digium.com/view/asterisk/team/group/autoconf_and_menuselect/makeopts.in?rev=18602&r1=18601&r2=18602&view=diff
==============================================================================
--- team/group/autoconf_and_menuselect/makeopts.in (original)
+++ team/group/autoconf_and_menuselect/makeopts.in Sun Apr 9 12:45:30 2006
@@ -84,7 +84,8 @@
Z_LIB=@z_LIB@
Z_INCLUDE=@z_INCLUDE@
-QTDIR = @QTDIR@
+QT_LIB=@QT_LIB@
+QT_INCLUDE=@QT_INCLUDE@
KDEDIR=@KDEDIR@
KDE_INCLUDE=@KDE_INCLUDE@
More information about the asterisk-commits
mailing list