dnl ======================================================= dnl FILE: ./admin/configure.in.min dnl ======================================================= dnl This file is part of the KDE libraries/packages dnl Copyright (C) 2001 Stephan Kulow (coolo@kde.org) dnl This file is free software; you can redistribute it and/or dnl modify it under the terms of the GNU Library General Public dnl License as published by the Free Software Foundation; either dnl version 2 of the License, or (at your option) any later version. dnl This library is distributed in the hope that it will be useful, dnl but WITHOUT ANY WARRANTY; without even the implied warranty of dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU dnl Library General Public License for more details. dnl You should have received a copy of the GNU Library General Public License dnl along with this library; see the file COPYING.LIB. If not, write to dnl the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, dnl Boston, MA 02110-1301, USA. # Original Author was Kalle@kde.org # I lifted it in some mater. (Stephan Kulow) # I used much code from Janos Farkas dnl Process this file with autoconf to produce a configure script. AC_INIT(acinclude.m4) dnl a source file from your sub dir dnl This is so we can use kde-common AC_CONFIG_AUX_DIR(admin) dnl This ksh/zsh feature conflicts with `cd blah ; pwd` unset CDPATH dnl Checking host/target/build systems, for make, install etc. AC_CANONICAL_SYSTEM dnl Perform program name transformation AC_ARG_PROGRAM dnl Automake doc recommends to do this only here. (Janos) AM_INIT_AUTOMAKE(kmess, 1.5-pre1) dnl searches for some needed programs KDE_SET_PREFIX dnl generate the config header AM_CONFIG_HEADER(config.h) dnl at the distribution this done dnl Checks for programs. AC_CHECK_COMPILERS AC_ENABLE_SHARED(yes) AC_ENABLE_STATIC(no) KDE_PROG_LIBTOOL dnl for NLS support. Call them in this order! dnl WITH_NLS is for the po files AM_KDE_WITH_NLS KDE_USE_QT(3.1) AC_PATH_KDE dnl ======================================================= dnl FILE: configure.in.in dnl ======================================================= #MIN_CONFIG(3.1) # ---- KMess version ---- dnl PACKAGE set before # ---- KDevelop stuff ---- dnl CXXFLAGS="$NOOPT_CXXFLAGS" dnl __kdevelop[noopt]__ dnl CFLAGS="$NOOPT_CFLAGS" dnl __kdevelop[noopt]__ dnl CXXFLAGS="$CXXFLAGS $USE_EXCEPTIONS" dnl __kdevelop[exc]__ dnl KDE_NEED_FLEX dnl __kdevelop__ dnl AC_PROG_YACC dnl __kdevelop__ # ---- Additional KMess debug option ---- # The syntax is: AC_ARG_ENABLE(flagname, description, if-user-desides, if-user-ignores) AC_ARG_ENABLE(debug-output, [ --enable-debug-output enable debugging output. [default=no]], [ enable_debug_output="$enableval" ], [ enable_debug_output="no" ] ) # Checking code if test "x$enable_debug_output" = "xyes" ; then AC_WARN(Creating debug build. This has serious implications in the performance of KMess) AC_DEFINE_UNQUOTED(KMESS_DEBUG, 1, [output debug?]) else AC_DEFINE_UNQUOTED(KMESS_DEBUG, 0, [output debug?]) fi dnl ======================================================= dnl FILE: ./kmess/configure.in.in dnl ======================================================= # -- Check for XScreenSaver ----------------------------------------- # This is based on libkopete/configure.in.in and karm/configure.in.in # backup old flags (are changed by the tests) ac_LDFLAGS_save="$LDFLAGS" ac_CPPFLAGS_save="$CPPFLAGS" ac_LIBS_save="$LIBS" ac_APBUILD_STATIC_save="$APBUILD_STATIC" ac_APBUILD_BOGUS_DEPS_save="$APBUILD_BOGUS_DEPS" LIB_XSCREENSAVER= # # run the test # LIBS="-lXext -lX11 $X_LDFLAGS" # AC_CHECK_LIB(Xss, XScreenSaverAllocInfo, # [ # LIB_XSCREENSAVER="-lXext -lXss" # AC_DEFINE(HAVE_XSCREENSAVER, 1, [Define if you have the XScreenSaver installed]) # ], # [ # AC_WARN(XScreenSaver extension not found. Auto-away feature will not work) # ]) # The syntax is: AC_TRY_COMPILE(header, [if true do], [if false do], [(code)]) # # Check for the scrnsaver.h header KDE_CHECK_HEADERS(X11/extensions/scrnsaver.h, [ # Check if libXext has XScreenSaverQueryInfo() # Disable bogus dependencies for apg++ (autopackage) APBUILD_STATIC="" APBUILD_BOGUS_DEPS="" LIBS="$X_PRE_LIBS -lX11 $X_LDFLAGS $X_EXTRA_LIBS" AC_CHECK_LIB(Xext,XScreenSaverQueryInfo, [ # Success, use "-lXext" AC_DEFINE(HAVE_XSCREENSAVER, 1, [Define if you have the XScreenSaver extension]) LIB_XSCREENSAVER="-lXext" ], [ # else: # Check if libXss has XScreenSaverQueryInfo() LIBS="-lXext -lX11 $X_LDFLAGS" AC_CHECK_LIB(Xss,XScreenSaverQueryInfo, [ # Success, use "-lXss" AC_DEFINE(HAVE_XSCREENSAVER, 1, [Define if you have the XScreenSaver extension]) LIB_XSCREENSAVER="-lXext -lXss" ], [ # Library not found, disabling idle timer code. AC_WARN(XScreenSaver extension not found. Auto-away feature will not work) ] ) ] ) ], [ # Header not found, disabling idle timer code. AC_WARN(XScreenSaver header not found. Auto-away feature will not work) ], [ #include ] ) # restore old flags (changed by the tests) CPPFLAGS="$ac_CPPFLAGS_save" LDFLAGS="$ac_LDFLAGS_save" LIBS="$ac_LIBS_save" APBUILD_STATIC="$ac_APBUILD_STATIC_save" APBUILD_BOGUS_DEPS="$ac_APBUILD_BOGUS_DEPS_save" # Export the LIB_XSCREENSAVER to Makefile.am AC_SUBST(LIB_XSCREENSAVER) # -- Check for BinReloc ----------------------------------------- # Check for binary relocation support # Hongli Lai # http://autopackage.org/ # New configure arguments AC_ARG_ENABLE(binreloc, [ --enable-binreloc compile with binary relocation support (default=enable when available)], enable_binreloc=$enableval,enable_binreloc=auto) AC_ARG_ENABLE(binreloc-threads, [ --enable-binreloc-threads compile binary relocation with threads support (default=yes)], enable_binreloc_threads=$enableval,enable_binreloc_threads=yes) # checking code BINRELOC_CFLAGS= BINRELOC_LIBS= if test "x$enable_binreloc" = "xauto"; then AC_CHECK_FILE([/proc/self/maps]) AC_CACHE_CHECK([whether everything is installed to the same prefix], [br_cv_valid_prefixes], [ if test "$bindir" = '${exec_prefix}/bin' -a "$sbindir" = '${exec_prefix}/sbin' -a \ "$datadir" = '${prefix}/share' -a "$libdir" = '${exec_prefix}/lib' -a \ "$libexecdir" = '${exec_prefix}/libexec' -a "$sysconfdir" = '${prefix}/etc' then br_cv_valid_prefixes=yes else br_cv_valid_prefixes=no fi ]) fi AC_CACHE_CHECK([whether binary relocation support should be enabled], [br_cv_binreloc], [if test "x$enable_binreloc" = "xyes"; then br_cv_binreloc=yes elif test "x$enable_binreloc" = "xauto"; then if test "x$br_cv_valid_prefixes" = "xyes" -a \ "x$ac_cv_file__proc_self_maps" = "xyes"; then br_cv_binreloc=yes else br_cv_binreloc=no fi else br_cv_binreloc=no fi ]) if test "x$br_cv_binreloc" = "xyes"; then # using both -DENABLE_BINRELOC and AC_DEFINE(ENABLE_BINRELOC) produces # a ENABLE_BINRELOC redefined warning. Disable one. BINRELOC_CFLAGS="-DENABLE_BINRELOC" ### AC_DEFINE(ENABLE_BINRELOC,,[Use binary relocation?]) if test "x$enable_binreloc_threads" = "xyes"; then AC_CHECK_LIB([pthread], [pthread_getspecific]) fi AC_CACHE_CHECK([whether binary relocation should use threads], [br_cv_binreloc_threads], [if test "x$enable_binreloc_threads" = "xyes"; then if test "x$ac_cv_lib_pthread_pthread_getspecific" = "xyes"; then br_cv_binreloc_threads=yes else br_cv_binreloc_threads=no fi else br_cv_binreloc_threads=no fi ]) if test "x$br_cv_binreloc_threads" = "xyes"; then BINRELOC_LIBS="-lpthread" AC_DEFINE(BR_PTHREAD,1,[Include pthread support for binary relocation?]) else BINRELOC_CFLAGS="$BINRELOC_CFLAGS -DBR_PTHREADS=0" AC_DEFINE(BR_PTHREAD,0,[Include pthread support for binary relocation?]) fi fi AC_SUBST(BINRELOC_CFLAGS) AC_SUBST(BINRELOC_LIBS) dnl ======================================================= dnl FILE: ./kmess/chat/configure.in.in dnl ======================================================= # -- Check for libxml ----------------------------------------- XML_CONFIG= KDE_FIND_PATH(xml2-config, XML_CONFIG, [${exec_prefix}/bin ${prefix}/bin], [AC_MSG_ERROR([libxml2 not found, please install libxml2 and libxml2-devel first (at least version 2.4.8) and run configure again.])] ) if test -n "$XML_CONFIG"; then vers=`$XML_CONFIG --version 2>/dev/null | sed -e 's/libxml //' | awk 'BEGIN { FS = "."; } { printf "%d", ($1 * 1000 + $2) * 1000 + $3;}'` if test -n "$vers" && test "$vers" -ge 2004008 then LIBXML_LIBS="`$XML_CONFIG --libs`" LIBXML_RPATH= for args in $LIBXML_LIBS do case $args in -L*) LIBXML_RPATH="$LIBXML_RPATH $args" ;; esac done LIBXML_RPATH=`echo $LIBXML_RPATH | sed -e "s/-L/-R/g"` LIBXML_CFLAGS="`$XML_CONFIG --cflags`" AC_DEFINE(HAVE_LIBXML2, 1, [Define if you have libxml2 libraries and header files]) else AC_MSG_ERROR([You need at least libxml 2.4.8, please upgrade your libxml packages and run configure again.]) fi fi if test -z "$XML_CONFIG"; then all_tests="bad" echo "" echo "Please fix the problems, and run ./configure again." echo "" exit 1 fi AC_SUBST(LIBXML_LIBS) AC_SUBST(LIBXML_CFLAGS) AC_SUBST(LIBXML_RPATH) # -- Check for libxslt ----------------------------------------- KDE_FIND_PATH(xslt-config, XSLT_CONFIG, [${prefix}/bin ${exec_prefix}/bin /usr/local/bin /opt/local/bin /usr/bin], [AC_MSG_ERROR([libxslt not found, please install libxslt and libxslt-devel first (at least version 1.0.7) and run configure again.])] ) if test -n "$XSLT_CONFIG"; then vers=`$XSLT_CONFIG --version 2>/dev/null | awk 'BEGIN { FS = "."; } { printf "%d", ($1 * 1000 + $2) * 1000 + $3;}'` if test -n "$vers" && test "$vers" -ge 1000007 then LIBXSLT_LIBS="`$XSLT_CONFIG --libs`" LIBXSLT_RPATH= for args in $LIBXSLT_LIBS do case $args in -L*) LIBXSLT_RPATH="$LIBXSLT_RPATH $args" ;; esac done LIBXSLT_RPATH=`echo $LIBXSLT_RPATH | sed -e "s/-L/-R/g"` LIBXSLT_CFLAGS="`$XSLT_CONFIG --cflags`" AC_DEFINE(HAVE_LIBXSLT, 1, [Define if you have libxslt libraries and header files]) else AC_MSG_ERROR([You need at least libxslt 1.0.7, please upgrade your libxslt packages and run configure again.]) fi fi AC_SUBST(LIBXSLT_LIBS) AC_SUBST(LIBXSLT_CFLAGS) AC_SUBST(LIBXSLT_RPATH) dnl ======================================================= dnl FILE: ./kmess/network/configure.in.in dnl ======================================================= dnl ---- Additional KMess options ---- # KPhone support is still not stable, and should be updated to something like libkcall. # AC_ARG_ENABLE(kphone, [ --enable-kphone enable kphone. [default=no]], enable_kphone=$enableval, enable_kphone=no) # -- Check for KPhone ----------------------------------------- if test "x$enable_kphone" = "xyes" ; then AC_MSG_NOTICE(*** Enable KPhone support ***) AC_DEFINE_UNQUOTED(HAS_KPHONE, 1, [enable kphone?]) if test "${KPHONEDIR:-unset}" != "unset" ; then AC_CHECK_FILE(${KPHONEDIR}/kphone/kphone.h, HAS_KPHONE=1) fi if test "${HAS_KPHONE:-unset}" = "unset" ; then AC_CHECK_FILE(${PWD}/../kphone/kphone/kphone.h, HAS_KPHONE=1) if test "${HAS_KPHONE:-unset}" != "unset" ; then KPHONEDIR="${PWD}/../kphone" fi fi if test "${HAS_KPHONE:-unset}" = "unset" ; then echo "Cannot find kphone, please install or set KPHONEDIR and try again." exit 1 fi KPHONE_G711_OBJ="$KPHONEDIR/kphone/g711.o" KPHONE_DTMFGENERATOR_OBJ="$KPHONEDIR/kphone/dtmfgenerator.o" KPHONE_DSPOUTRTP_OBJ="$KPHONEDIR/kphone/dspoutrtp.o" KPHONE_DSPOUTOSS_OBJ="$KPHONEDIR/kphone/dspoutoss.o" KPHONE_DSPOUT_OBJ="$KPHONEDIR/kphone/dspout.o" KPHONE_DSPAUDIO_OBJ="$KPHONEDIR/kphone/dspaudio.o" KPHONE_DSPAUDIOIN_OBJ="$KPHONEDIR/kphone/dspaudioin.o" KPHONE_DSPAUDIOOUT_OBJ="$KPHONEDIR/kphone/dspaudioout.o" KPHONE_CALLAUDIO_OBJ="$KPHONEDIR/kphone/callaudio.o" KPHONE_CALLAUDIO_MOC_OBJ="$KPHONEDIR/kphone/callaudio.moc.o" KPHONE_AUDIOBUFFER_OBJ="$KPHONEDIR/kphone/audiobuffer.o" KPHONE_DISSIPATE2_LIB="$KPHONEDIR/dissipate2/dissipate2.a" KPHONE_ILBC_LIB="$KPHONEDIR/ilbc/ilbc.a" KPHONE_GSM_LIB="$KPHONEDIR/gsm/gsm.a" AC_SUBST(KPHONE_G711_OBJ) AC_SUBST(KPHONE_DTMFGENERATOR_OBJ) AC_SUBST(KPHONE_DSPOUTRTP_OBJ) AC_SUBST(KPHONE_DSPOUTOSS_OBJ) AC_SUBST(KPHONE_DSPOUT_OBJ) AC_SUBST(KPHONE_DSPAUDIO_OBJ) AC_SUBST(KPHONE_DSPAUDIOIN_OBJ) AC_SUBST(KPHONE_DSPAUDIOOUT_OBJ) AC_SUBST(KPHONE_CALLAUDIO_OBJ) AC_SUBST(KPHONE_CALLAUDIO_MOC_OBJ) AC_SUBST(KPHONE_AUDIOBUFFER_OBJ) AC_SUBST(KPHONE_DISSIPATE2_LIB) AC_SUBST(KPHONE_ILBC_LIB) AC_SUBST(KPHONE_GSM_LIB) AC_SUBST(KPHONEDIR) fi KDE_CREATE_SUBDIRSLIST AC_CONFIG_FILES([ Makefile ]) AC_CONFIG_FILES([ doc/Makefile ]) AC_CONFIG_FILES([ doc/en/Makefile ]) AC_CONFIG_FILES([ kmess/Makefile ]) AC_CONFIG_FILES([ kmess/actions/Makefile ]) AC_CONFIG_FILES([ kmess/chat/Makefile ]) AC_CONFIG_FILES([ kmess/contact/Makefile ]) AC_CONFIG_FILES([ kmess/crypt/Makefile ]) AC_CONFIG_FILES([ kmess/dialogs/Makefile ]) AC_CONFIG_FILES([ kmess/network/Makefile ]) AC_CONFIG_FILES([ kmess/network/applications/Makefile ]) AC_CONFIG_FILES([ kmess/network/extra/Makefile ]) AC_CONFIG_FILES([ kmess/network/upnp/Makefile ]) AC_CONFIG_FILES([ kmess/notification/Makefile ]) AC_CONFIG_FILES([ kmess/pics/Makefile ]) AC_CONFIG_FILES([ kmess/settings/Makefile ]) AC_CONFIG_FILES([ kmess/sounds/Makefile ]) AC_CONFIG_FILES([ kmess/styles/Makefile ]) AC_CONFIG_FILES([ kmess/styles/Colourful-Enclosed/Makefile ]) AC_CONFIG_FILES([ kmess/styles/Default/Makefile ]) AC_CONFIG_FILES([ kmess/styles/Default-compact/Makefile ]) AC_CONFIG_FILES([ kmess/styles/Dim/Makefile ]) AC_CONFIG_FILES([ kmess/styles/Efficient/Makefile ]) AC_CONFIG_FILES([ kmess/styles/Fresh/Makefile ]) AC_CONFIG_FILES([ kmess/styles/Pure/Makefile ]) AC_CONFIG_FILES([ po/Makefile ]) AC_OUTPUT if test "x$all_tests" = "xbad"; then # $all_tests is an internal variable in the configure script # the configure script may also be terminated with AC_MSG_ERROR echo "" echo "Please fix the problems, and run ./configure again." echo "" exit 1 else echo "" echo "" echo "Configure report:" echo "" echo " Install prefix: $prefix" echo -n " Auto-away feature: " if test -z "$LIB_XSCREENSAVER"; then echo "no (extension not detected)" else echo "yes" fi echo -n " Debugging messages: " if test "x$enable_debug_output" = "xyes"; then echo "yes (KMess will be slow!)" else echo "no (good!)" fi echo -n " Binary relocatable: " if test "x$br_cv_binreloc" = "xyes"; then echo "yes" else echo "no (only supported in Linux)" fi echo "" fi # Check if KDE_SET_PREFIX was called, and --prefix was passed to configure if test -n "$kde_libs_prefix" -a -n "$given_prefix"; then # And if so, warn when they don't match if test "$kde_libs_prefix" != "$given_prefix"; then # And if kde doesn't know about the prefix yet echo ":"`kde-config --path exe`":" | grep ":$given_prefix/bin/:" 2>&1 >/dev/null if test $? -ne 0; then echo "" echo "Warning: you chose to install this package in $given_prefix," echo "but KDE was found in $kde_libs_prefix." echo "For this to work, you will need to tell KDE about the new prefix, by ensuring" echo "that KDEDIRS contains it, e.g. export KDEDIRS=$given_prefix:$kde_libs_prefix" echo "Then restart KDE." echo "" fi fi fi if test x$GXX = "xyes" -a x$kde_have_gcc_visibility = "xyes" -a x$kde_cv_val_qt_gcc_visibility_patched = "xno"; then echo "" echo "Your GCC supports symbol visibility, but the patch for Qt supporting visibility" echo "was not included. Therefore, GCC symbol visibility support remains disabled." echo "" echo "For better performance, consider including the Qt visibility supporting patch" echo "located at:" echo "" echo "http://bugs.kde.org/show_bug.cgi?id=109386" echo "" echo "and recompile all of Qt and KDE. Note, this is entirely optional and" echo "everything will continue to work just fine without it." echo "" fi if test "$all_tests" = "bad"; then if test ! "$cache_file" = "/dev/null"; then echo "" echo "Please remove the file $cache_file after changing your setup" echo "so that configure will find the changes next time." echo "" fi else echo "" echo "Good - your configure finished. Start make now" echo "" fi