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., 59 Temple Place - Suite 330, dnl Boston, MA 02111-1307, 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(sim, 0.9.4.3) dnl searches for some needed programs AC_ARG_ENABLE(kde, AC_HELP_STRING([--disable-kde],[don't use kde]), use_kde=$enableval, use_kde=yes) if test "$use_kde" = "yes"; then KDE_SET_PREFIX else SIM_SET_PREFIX KDE_FAST_CONFIGURE fi 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) AC_LIBTOOL_DLOPEN KDE_PROG_LIBTOOL dnl for NLS support. Call them in this order! dnl WITH_NLS is for the po files AM_KDE_WITH_NLS if test "x$use_kde" != "xyes"; then KDE_CHECK_STL include_ARTS_TRUE='#' include_ARTS_FALSE= fi AC_PATH_KDE dnl ======================================================= dnl FILE: configure.in.in dnl ======================================================= #MIN_CONFIG AC_PREREQ(2.50) AC_LANG_CPLUSPLUS AC_LANG_C dnl PACKAGE set before AC_PROG_LIBTOOL AC_STDC_HEADERS AC_C_BIGENDIAN KDE_NEED_FLEX AM_CONDITIONAL(QT2, test "$kde_qtver" = "2") if test "$kde_qtver" = "2" ; then LIBUIQT="../../sim/qt3/libsimuiqt.la" LIBUI="../../sim/qt3/libsimuiqt.la" else LIBUIQT="" LIBUI="" fi AC_SUBST(LIBUIQT) AC_SUBST(LIBUI) LFLAGS="-o${LEX_OUTPUT_ROOT}.c" AC_SUBST(LFLAGS) if test "$CYGWIN" = "yes"; then LDFLAGS="$LDFLAGS --enable-auto-import" fi if ! echo $CXXFLAGS | fgrep '-fno-strict-aliasing' >/dev/null 2>&1 ; then old_cxxflags=$CXXFLAGS CXXFLAGS="$CXXFLAGS -fno-strict-aliasing" AC_TRY_COMPILE([], [return 0;], , CXXFLAGS=$old_cxxflags) fi RELEASE_BUILD="yes" AC_ARG_ENABLE( release, [ --enable-release enable release build], RELEASE_BUILD="$enableval") if test "$RELEASE_BUILD" != "yes"; then AC_DEFINE(CVS_BUILD, 1, [CVS build]) fi AC_TYPE_OFF_T AC_TYPE_PID_T AC_TYPE_SIZE_T AC_TYPE_UID_T AC_STRUCT_TM AC_PATH_X if test $have_x = yes; then AC_DEFINE(HAVE_X,1,[Have X Window System]) fi AC_HEADER_SYS_WAIT AC_TM_GMTOFF AC_FUNC_FORK AC_C_INLINE AC_C_CONST KDE_CHECK_SSL AC_HEADER_STDBOOL AC_FUNC_ERROR_AT_LINE AC_FUNC_MMAP AC_FUNC_MKTIME AC_FUNC_MEMCMP AC_FUNC_MALLOC AC_FUNC_REALLOC AC_FUNC_STAT AC_CHECK_HEADERS([arpa/inet.h netinet/in.h sys/ioctl.h sys/socket.h]) AC_CHECK_HEADERS([fcntl.h limits.h netdb.h stddef.h termios.h]) AC_CHECK_FUNCS([dup2 gethostbyname gethostname inet_ntoa]) AC_CHECK_FUNCS([memset mkdir munmap rmdir socket]) AC_CHECK_FUNCS([strcspn strdup strerror strstr strtol strtoul]) AC_CHECK_FUNC(strcasecmp,[AC_DEFINE(HAVE_STRCASECMP,1,[Have strcasecmp])]) AC_CHECK_FUNC(chmod,[AC_DEFINE(HAVE_CHMOD,1,[Have chmod])]) AC_CHECK_FUNC(uname,[AC_DEFINE(HAVE_UNAME,1,[Have uname])]) AC_EGREP_HEADER(in_addr_t, netinet/in.h,, AC_DEFINE(in_addr_t,int,[defaults in_addr_t to int])) AC_EGREP_HEADER(socklen_t, sys/socket.h,, AC_DEFINE(socklen_t,int,[defaults socklen_t to int])) AC_CHECK_LIB(xnet,inet_addr) AC_CHECK_LIB(socket, socket) AC_MSG_CHECKING([for The Ultimate Answer]) AC_MSG_RESULT([42]) EXTRA_LIBS="" if test "$use_kde" = "yes" ; then KDE_CHECK_HEADER(ktextedit.h,[AC_DEFINE(HAVE_KTEXTEDIT_H,1,[Have ktextedit.h])]) fi KDE_CHECK_HEADER(qsyntaxhighlighter.h,[AC_DEFINE(HAVE_QSYNTAXHIGHLIGHTER_H,1,[Have qsyntaxhighlighter.h])]) AC_DEFINE_UNQUOTED(PREFIX, "$prefix", [Install prefix]) AC_SUBST(EXTRA_LIBS) if test "${exec_prefix}" = "NONE" ; then exec_prefix=$prefix fi libdir=`eval echo $libdir` sim_plugindir="${libdir}/sim" sim_stylesdir="\${sim_plugindir}/styles" AC_SUBST(sim_plugindir) AC_SUBST(sim_stylesdir) AC_DEFINE_UNQUOTED(PLUGIN_PATH,"${sim_plugindir}",[Plugins path]) LIB_XML2="" AC_PATH_PROG(XML2_CONFIG, xml2-config, no) if test "x$XML2_CONFIG" = "xno" ; then AC_MSG_ERROR([Executable xml2-config not found! Seems you have no libxml2 devel files installed. You can download it from http://xmlsoft.org/download.html ]) fi LIB_XML2=`$XML2_CONFIG --libs 2>/dev/null` CPPFLAGS="$CPPFLAGS `$XML2_CONFIG --cflags`" LIB_XSLT="" AC_PATH_PROG(XSLT_CONFIG, xslt-config, no) if test "x$XSLT_CONFIG" = "xno" ; then AC_MSG_ERROR([Executable xslt-config not found! Seems you have no libxslt devel files installed. You can download it from http://xmlsoft.org/download.html ]) fi LIB_XSLT=`$XSLT_CONFIG --libs 2>/dev/null` CPPFLAGS="$CPPFLAGS `$XSLT_CONFIG --cflags`" AC_SUBST(LIB_XML2) AC_SUBST(LIB_XSLT) ZIP_FLAGS="" AC_PATH_PROG(ZIP, zip, no) if test "x$ZIP" = "xno" ; then AC_PATH_PROG(ZIP, jar, no) ZIP_FLAGS=" -cMf " if test "x$ZIP" = "xno" ; then AC_MSG_ERROR([Executable zip or jar not found! ]) fi fi AC_SUBST(ZIP) AC_SUBST(ZIP_FLAGS) if test "$have_ssl" != "yes" -a "$want_ssl" != "no"; then AC_MSG_ERROR([SIM requires OpenSSL library. Please install OpenSSL (libraries and headers). OpenSSL can be found at http://www.openssl.org or as RPM from your local distribution site. ]) fi AM_CONDITIONAL(QT_WIN, test "$kde_use_qt_win" = "yes") if test "$kde_use_qt_win" = "yes"; then AC_SUBST(SIM_RC_OBJ, "sim_rc.o") AC_SUBST(GMSGFMT, "$GMSGFMT --qt") fi DO_NOT_COMPILE="$DO_NOT_COMPILE plugins/update" dnl ======================================================= dnl FILE: ./plugins/__homedir/configure.in.in dnl ======================================================= if test "$kde_use_qt_win" = "yes"; then __HOMEDIR_OBJ=homedircfg.lo AC_SUBST([__HOMEDIR_OBJ]) fi dnl ======================================================= dnl FILE: ./plugins/autoaway/configure.in.in dnl ======================================================= if test "x$kde_use_qt_win" = "xno"; then compile_plugin="no" XSS_LIBS="no" save_CPPFLAGS="$CPPFLAGS" save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $all_libraries" CPPFLAGS="$CPPFLAGS $X_INCLUDES" AC_CHECK_LIB(Xext, XScreenSaverRegister,[XSS_LIBS=""],[], [-lX11 -lXext -lm]) AC_CHECK_LIB(Xss, XScreenSaverRegister,[XSS_LIBS="-lXss"],[],[-lX11 -lXext -lm]) if test \! "$XSS_LIBS" = "no"; then KDE_CHECK_HEADER(X11/extensions/scrnsaver.h,[compile_plugin="yes"],[]) else XSS_LIBS="" AC_CHECK_HEADER(Carbon/Carbon.h,[compile_plugin="yes"]) fi AC_SUBST(XSS_LIBS) if test "x$compile_plugin" = "xno"; then AC_MSG_WARN([ScreenSaver extension not found. AutoAway plugin is disabled]) DO_NOT_COMPILE="$DO_NOT_COMPILE plugins/autoaway" fi fi dnl ======================================================= dnl FILE: ./plugins/gpg/configure.in.in dnl ======================================================= if test "$kde_use_qt_win" = "yes"; then GPG_OBJ=gpgfind.lo AC_SUBST([GPG_OBJ]) fi dnl ======================================================= dnl FILE: ./plugins/icq/configure.in.in dnl ======================================================= compile_plugin="no" if test "$have_ssl" != yes; then AC_MSG_WARN([OpenSSL library disabled. ICQ plugin is disabled]) DO_NOT_COMPILE="$DO_NOT_COMPILE plugins/icq" fi dnl ======================================================= dnl FILE: ./plugins/livejournal/configure.in.in dnl ======================================================= compile_plugin="no" if test "$have_ssl" != yes; then AC_MSG_WARN([OpenSSL library disabled. LiveJournal plugin is disabled]) DO_NOT_COMPILE="$DO_NOT_COMPILE plugins/livejournal" fi dnl ======================================================= dnl FILE: ./plugins/msn/configure.in.in dnl ======================================================= compile_plugin="no" if test "$have_ssl" != yes; then AC_MSG_WARN([OpenSSL library disabled. MSN plugin is disabled]) DO_NOT_COMPILE="$DO_NOT_COMPILE plugins/msn" fi dnl ======================================================= dnl FILE: ./plugins/ontop/configure.in.in dnl ======================================================= if test "$use_kde" != "yes" && test "$kde_use_qt_win" != "yes"; then DO_NOT_COMPILE="$DO_NOT_COMPILE plugins/ontop" fi dnl ======================================================= dnl FILE: ./plugins/remote/configure.in.in dnl ======================================================= compile_plugin="yes" if test "$kde_use_qt_win" = "yes"; then compile_plugin="no" fi if test "x$compile_plugin" = "xno"; then DO_NOT_COMPILE="$DO_NOT_COMPILE plugins/remote" fi dnl ======================================================= dnl FILE: ./plugins/shortcuts/configure.in.in dnl ======================================================= if test "$kde_use_qt_mac" = "yes" ; then DO_NOT_COMPILE="$DO_NOT_COMPILE plugins/shortcuts" fi dnl ======================================================= dnl FILE: ./plugins/spell/configure.in.in dnl ======================================================= compile_plugin="no" if test "$use_kde" != "yes" ; then AC_CHECK_HEADER(aspell.h, compile_plugin="yes") fi if test "x$compile_plugin" = "xyes"; then compile_plugin="no" AC_CHECK_LIB(aspell, get_aspell_dict_info_list, [compile_plugin="yes"; LIB_ASPELL="-laspell"]) AC_SUBST(LIB_ASPELL) fi if test "x$compile_plugin" = "xno"; then DO_NOT_COMPILE="$DO_NOT_COMPILE plugins/spell" fi if test "$kde_use_qt_win" = "yes"; then SPELL_OBJ=spellfind.lo AC_SUBST([SPELL_OBJ]) fi dnl ======================================================= dnl FILE: ./plugins/transparent/configure.in.in dnl ======================================================= compile_plugin="no" if test "$use_kde" = "yes"; then KDE_CHECK_HEADER(krootpixmap.h,[ AC_DEFINE(HAVE_KROOTPIXMAP_H,1,[Have krootpixmap.h]) compile_plugin="yes" TRANSPARENT_OBJ=transtop.lo AC_SUBST([TRANSPARENT_OBJ]) ]) fi if test "$kde_use_qt_win" = "yes"; then compile_plugin="yes" fi if test "x$compile_plugin" = "xno"; then DO_NOT_COMPILE="$DO_NOT_COMPILE plugins/transparent" fi dnl ======================================================= dnl FILE: ./plugins/windock/configure.in.in dnl ======================================================= compile_plugin="no" if test "$kde_use_qt_win" = "yes"; then compile_plugin="yes" fi if test "x$compile_plugin" = "xno"; then DO_NOT_COMPILE="$DO_NOT_COMPILE plugins/windock" fi dnl ======================================================= dnl FILE: ./plugins/yahoo/configure.in.in dnl ======================================================= compile_plugin="no" if test "$have_ssl" != yes; then AC_MSG_WARN([OpenSSL library disabled. Yahoo! plugin is disabled]) DO_NOT_COMPILE="$DO_NOT_COMPILE plugins/yahoo" fi KDE_CREATE_SUBDIRSLIST AC_CONFIG_FILES([ Makefile ]) AC_CONFIG_FILES([ po/Makefile ]) AC_CONFIG_FILES([ sim/Makefile ]) AC_CONFIG_FILES([ sim/png/Makefile ]) AC_CONFIG_FILES([ plugins/__homedir/Makefile ]) AC_CONFIG_FILES([ plugins/__migrate/Makefile ]) AC_CONFIG_FILES([ plugins/_core/Makefile ]) AC_CONFIG_FILES([ plugins/_core/GPL-Icons/Makefile ]) AC_CONFIG_FILES([ plugins/_core/additional/Makefile ]) AC_CONFIG_FILES([ plugins/_core/icq5/Makefile ]) AC_CONFIG_FILES([ plugins/_core/icq5.1/Makefile ]) AC_CONFIG_FILES([ plugins/_core/icqlite/Makefile ]) AC_CONFIG_FILES([ plugins/_core/jisp/Makefile ]) AC_CONFIG_FILES([ plugins/_core/pict/Makefile ]) AC_CONFIG_FILES([ plugins/_core/smiles/Makefile ]) AC_CONFIG_FILES([ plugins/_core/styles/Makefile ]) AC_CONFIG_FILES([ plugins/about/Makefile ]) AC_CONFIG_FILES([ plugins/action/Makefile ]) AC_CONFIG_FILES([ plugins/autoaway/Makefile ]) AC_CONFIG_FILES([ plugins/background/Makefile ]) AC_CONFIG_FILES([ plugins/dock/Makefile ]) AC_CONFIG_FILES([ plugins/filter/Makefile ]) AC_CONFIG_FILES([ plugins/floaty/Makefile ]) AC_CONFIG_FILES([ plugins/forward/Makefile ]) AC_CONFIG_FILES([ plugins/gpg/Makefile ]) AC_CONFIG_FILES([ plugins/icons/Makefile ]) AC_CONFIG_FILES([ plugins/icq/Makefile ]) AC_CONFIG_FILES([ plugins/icq/sounds/Makefile ]) AC_CONFIG_FILES([ plugins/jabber/Makefile ]) AC_CONFIG_FILES([ plugins/jabber/sounds/Makefile ]) AC_CONFIG_FILES([ plugins/livejournal/Makefile ]) AC_CONFIG_FILES([ plugins/logger/Makefile ]) AC_CONFIG_FILES([ plugins/msn/Makefile ]) AC_CONFIG_FILES([ plugins/navigate/Makefile ]) AC_CONFIG_FILES([ plugins/netmonitor/Makefile ]) AC_CONFIG_FILES([ plugins/ontop/Makefile ]) AC_CONFIG_FILES([ plugins/osd/Makefile ]) AC_CONFIG_FILES([ plugins/proxy/Makefile ]) AC_CONFIG_FILES([ plugins/remote/Makefile ]) AC_CONFIG_FILES([ plugins/replace/Makefile ]) AC_CONFIG_FILES([ plugins/shortcuts/Makefile ]) AC_CONFIG_FILES([ plugins/sms/Makefile ]) AC_CONFIG_FILES([ plugins/sms/sounds/Makefile ]) AC_CONFIG_FILES([ plugins/sound/Makefile ]) AC_CONFIG_FILES([ plugins/sound/sounds/Makefile ]) AC_CONFIG_FILES([ plugins/spell/Makefile ]) AC_CONFIG_FILES([ plugins/splash/Makefile ]) AC_CONFIG_FILES([ plugins/styles/Makefile ]) AC_CONFIG_FILES([ plugins/styles/metal/Makefile ]) AC_CONFIG_FILES([ plugins/styles/wood/Makefile ]) AC_CONFIG_FILES([ plugins/transparent/Makefile ]) AC_CONFIG_FILES([ plugins/weather/Makefile ]) AC_CONFIG_FILES([ plugins/weather/jisp/Makefile ]) AC_CONFIG_FILES([ plugins/windock/Makefile ]) AC_CONFIG_FILES([ plugins/yahoo/Makefile ]) AC_CONFIG_FILES([ plugins/zodiak/Makefile ]) AC_OUTPUT # 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 "$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 "" echo "Note for non-GNU systems users: in order to compile SIM, you need to use GNU make (gmake)" echo "" fi