# Process this file with autoconf to produce a configure script. AC_INIT(ickle/main.cpp) # # Version information # ICKLE_MAJOR_VERSION=0 ICKLE_MINOR_VERSION=3 ICKLE_MICRO_VERSION=2 ICKLE_VERSION=$ICKLE_MAJOR_VERSION.$ICKLE_MINOR_VERSION.$ICKLE_MICRO_VERSION AC_DEFINE_UNQUOTED(ICKLE_MAJOR_VERSION, "$ICKLE_MAJOR_VERSION", [Major version of ickle]) AC_DEFINE_UNQUOTED(ICKLE_MINOR_VERSION, "$ICKLE_MINOR_VERSION", [Minor version of ickle]) AC_DEFINE_UNQUOTED(ICKLE_MICRO_VERSION, "$ICKLE_MICRO_VERSION", [Micro version of ickle]) AC_DEFINE_UNQUOTED(ICKLE_VERSION, "$ICKLE_VERSION", [Full version of ickle]) AM_INIT_AUTOMAKE(ickle,0.3.2) AM_ACLOCAL_INCLUDE(macros) AM_CONFIG_HEADER(config.h) # Checks for programs. AC_PROG_CC AC_PROG_CPP AC_PROG_CXX # Compiler debug flag # by default (if no --enable/disable-debug option is given) then it # will only filter out the -g if no specific compiler flags are given # as CXXFLAGS env variable. AC_ARG_ENABLE(debug, [ --enable-debug creates debugging code], [ ickle_use_debug="$enableval"], [ickle_use_debug="no"]) if test "$ickle_use_debug" = "no"; then CXXFLAGS="`echo $CXXFLAGS | sed s/-g//`" CFLAGS="`echo $CFLAGS | sed s/-g//`" fi AC_PROG_INSTALL AC_PROG_LN_S AC_PROG_MAKE_SET AC_PROG_AWK AM_PROG_LIBTOOL # Checks for header files. AC_HEADER_STDC AC_CHECK_HEADERS([errno.h stdlib.h string.h ctype.h sys/time.h sys/types.h sys/wait.h unistd.h],, AC_MSG_ERROR([Required header not found]) ) # doesn't matter if getopt is missing it's a gnu thing AC_CHECK_HEADERS([getopt.h]) dnl optional GNOME support ICKLE_GNOME_INIT(applets) if test "x$want_gnome" = xyes; then ICKLE_PROGRAM=ickle_applet ICKLE_MANPAGES=ickle_applet.1 CORBA_FILES=ickle_applet.gnorba DESKTOP_FILES=ickle_applet.desktop AC_DEFINE(GNOME_ICKLE,,[Define if GNOME applet should be built]) else ICKLE_PROGRAM=ickle ICKLE_MANPAGES=ickle.1 fi AC_SUBST(ICKLE_PROGRAM) AC_SUBST(ICKLE_MANPAGES) AC_SUBST(CORBA_FILES) AC_SUBST(DESKTOP_FILES) dnl ickle_control AC_ARG_WITH(ickle_control, [ --without-ickle-control don't build ickle_control], ickle_control=$withval, ickle_control=yes) AC_MSG_CHECKING([whether ickle_control should be built]) if test "x$ickle_control" = xyes; then AC_DEFINE(CONTROL_SOCKET,,[Define if the control socket should be enabled]) ICKLE_CONTROL="ickle_control" ICKLE_CONTROL_MANPAGES="ickle_control.1" LIBICKLE_CTRLSOCKET="libickle_ctrlsocket.a" LIBICKLE_CTRLSOCKET_FLAG="-lickle_ctrlsocket" LIBICKLE_CTRLSOCKET_DEP="\$(top_builddir)/ctrlsocket/libickle_ctrlsocket.a" fi AC_MSG_RESULT($ickle_control) AC_SUBST(ICKLE_CONTROL) AC_SUBST(ICKLE_CONTROL_MANPAGES) AC_SUBST(LIBICKLE_CTRLSOCKET) AC_SUBST(LIBICKLE_CTRLSOCKET_FLAG) AC_SUBST(LIBICKLE_CTRLSOCKET_DEP) # Switch to C++ mode and check for needed C++ headers AC_LANG_SAVE AC_LANG_CPLUSPLUS AC_CHECK_HEADERS([vector iostream fstream string algorithm list memory iterator exception utility],, AC_MSG_ERROR([You need to have the libstdc++ headers installed])) sstream=no AC_CHECK_HEADERS(sstream,sstream=yes) AC_CHECK_HEADERS(strstream,sstream=yes) if test $sstream != yes ; then AC_MSG_ERROR([Your libstdc++ installation does not have the sstream or strstream classes]) fi AC_LANG_RESTORE # Checks for libraries. AM_PATH_SIGC(1.0.0, [], [AC_MSG_ERROR([You need to have the libsigc++ libraries installed - see the README for more information])]) AM_PATH_GTKMM(1.2.5, [], [AC_MSG_ERROR([You need to have the gtkmm libraries installed of at least version 1.2.5 and above - see the README for more information])]) # libicq2000 checks AM_PATH_LIBICQ2000(0.3.2, [], [AC_MSG_ERROR([You need to have the libicq2000 library installed. You can get libicq2000 from http://libicq2000.sourceforge.net/. A link to the sourceforge mirror selection page is: http://prdownloads.sourceforge.net/libicq2000/libicq2000-0.3.2.tar.gz - see the README for more information])]) # Switch to C++ mode - on some systems with the gtkmm libs they need libstdc++ AC_LANG_SAVE AC_LANG_CPLUSPLUS # Check for XScreenSaver support, adapted from gnomeicu xss_ldflags="" AC_ARG_WITH(xss, [ --with-xss=PREFIX Enable XScreenSaver support (default: check for it)], if test "x$withval" != "xno"; then want_xss=yes if test "x$withval" != "xyes" && test -d "$withval/lib"; then xss_ldflags="-L$withval/lib" fi else want_xss=no fi, want_xss=yes) if test "x$want_xss" = xyes; then AC_CHECK_LIB(Xext, XextCreateExtension, have_xext=yes, have_xext=no, $GTKMM_LIBS) AC_CHECK_LIB(Xss, XScreenSaverRegister, have_xss=yes, have_xss=no, $GTKMM_LIBS $xss_ldflags) if test "x$have_xext" = xyes && test "x$have_xss" = xyes; then XSS_LIBS="$XSS_LIBS $xss_ldflags -lXext -lXss" AC_SUBST(XSS_LIBS) AC_DEFINE(USE_XSCREENSAVER,,[Whether the XScreenSaver extension should be used]) fi fi AC_LANG_RESTORE # Checks for typedefs, structures, and compiler characteristics. AC_C_CONST AC_TYPE_SIZE_T AC_STRUCT_TM AC_C_INLINE AC_HEADER_TIME # Checks for library functions. AC_FUNC_STRFTIME AC_CHECK_FUNCS([mktime stat mkdir strerror],,AC_MSG_ERROR([You do not have one of the standard C functions required - check you have libc installed properly])) AC_OUTPUT([Makefile ickle/Makefile share/Makefile \ control/Makefile ctrlsocket/Makefile \ share/icons/Makefile share/icons/ickle/Makefile \ share/icons/doors/Makefile share/icons/icq/Makefile \ share/icons/new/Makefile share/icons/gnomeicu/Makefile \ share/icons/eureka/Makefile share/translations/Makefile \ share/icons/kit/Makefile macros/Makefile pixmaps/Makefile]) $ECHO $ECHO "-----------------------------------------------------------------" if test "x$want_gnome" = xyes; then $ECHO "Ickle will be built with the GNOME applet." $ECHO "After installing, run ickle by rightclicking the" $ECHO "panel and choosing Applets->Network->Ickle ICQ." $ECHO "If you would rather ickle is not built as an applet," $ECHO "for example if you don't use the GNOME desktop enviroment," $ECHO "then re-run configure with the option --with-gnome=no" else $ECHO "Ickle will be built without the GNOME applet." $ECHO "After installing, run ickle by typing 'ickle' at the prompt." fi $ECHO "-----------------------------------------------------------------" $ECHO