AC_INIT(src/centericq.cc) AM_INIT_AUTOMAKE(centericq, 4.9.4) AC_CANONICAL_HOST AC_PROG_CC AC_PROG_CXX AC_PROG_CPP AC_PROG_RANLIB AM_CONFIG_HEADER(config.h) ### AM_PATH_GLIB(1.2.0, [ CXXFLAGS="$CXXFLAGS $GLIB_CFLAGS" ], AC_MSG_ERROR([glib is required in order to compile centericq - download it from ftp://ftp.gtk.org/pub/gtk])) AC_LANG_SAVE AC_LANG_CPLUSPLUS ### use option --enable-locales-fix to fix problems with double-byte ### encodings on systems with broken locale, iscntrl() AC_ARG_ENABLE(locales-fix, [ --enable-locales-fix enables workaround for broken locales. use this option if some of characters in your texts in Chinese or Japanese diappear]) ### use option --with-fribidi to compile with fribidi support AC_ARG_WITH(fribidi, [ --with-fribidi=[DIR] enable Hebrew and Arabic support using fribidi library in DIR], [with_fribidi=$withval], [with_fribidi=no]) if test "$with_fribidi" = "yes"; then for ac_dir in /usr/local /usr; do if test -f "$ac_dir/include/fribidi/fribidi.h"; then with_fribidi=$ac_dir break; fi done fi if test -n "$with_fribidi" -a "$with_fribidi" != "no"; then if test "$with_fribidi" = "yes"; then with_fribidi="/usr"; fi if test -r $with_fribidi/include/fribidi/fribidi.h; then LIBS="$LIBS `$with_fribidi/bin/fribidi-config --libs`" AC_DEFINE(USE_FRIBIDI) fi fi ### FriBiDi check end ### ### SSL libs ### AC_ARG_WITH(ssl, [ --with-ssl enable SSL secured connections using either OpenSSL or GnuTLS], [with_ssl=$withval]) if test "$with_ssl" != "no"; then AC_ARG_WITH(openssl, [ --with-openssl=[DIR] enable SSL secured connections using the OpenSSL library in DIR (optional)], [with_openssl=$withval]) if test -z "$with_openssl"; then for ac_dir in /usr/local /usr; do if test -f "$ac_dir/include/openssl/ssl.h"; then with_openssl=$ac_dir break; fi done fi AC_MSG_CHECKING(for OpenSSL) if test -n "$with_openssl" -a "$with_openssl" != "no"; then if test "$with_openssl" = "yes"; then with_openssl="/usr"; fi CFLAGS="$CFLAGS -I${with_openssl}" AC_DEFINE(HAVE_OPENSSL) AC_MSG_RESULT([found in $with_openssl]) AC_CHECK_LIB(crypto, main) AC_CHECK_LIB(ssl, main) else AC_MSG_RESULT([not found or disabled]) AM_PATH_LIBGNUTLS_EXTRA(0.0.1, [ CXXFLAGS="$CXXFLAGS $LIBGNUTLS_CFLAGS" LIBS="$LIBS $LIBGNUTLS_LIBS -lgnutls-extra" AC_DEFINE(HAVE_GNUTLS) ]) fi fi ### SSL end AC_CHECK_HEADERS([vector iostream fstream string algorithm list memory iterator exception utility],, AC_MSG_ERROR([You need to have the libstdc++ headers installed])) AC_CHECK_HEADERS([hash_map strstream ext/hash_map sstream],,) AC_CHECK_HEADERS(ext/hash_map,, AC_CHECK_HEADERS(hash_map,, AC_MSG_ERROR([Your libstdc++ installation does not have the extra hash classes]))) AC_CHECK_HEADERS(sstream,, AC_CHECK_HEADERS(strstream,, AC_MSG_ERROR([Your libstdc++ doesn't have the sstream or strstream classes]))) AC_CHECK_HEADERS(iconv.h) AC_CHECK_LIB(iconv, iconv,, [AC_CHECK_LIB(c, iconv,, AC_MSG_WARN(libiconv not found - Russian codepages translation in MSN and Jabber will not work))]) AC_CHECK_LIB(socket, socket) AC_CHECK_LIB(nsl, gethostbyname) AC_CHECK_LIB(ncurses, initscr,, [AC_CHECK_LIB(curses, initscr,, AC_MSG_ERROR(The ncurses terminal library is required in order to build the program))]) AC_LANG_RESTORE case "$host_os" in darwin*) LIBS="$LIBS -flat_namespace" ### CXXFLAGS="$CXXFLAGS $GLIB_CFLAGS -I/sw/include" ;; esac ALL_LINGUAS="zh_TW.Big5 uk sv ru ro pt_BR pl nl ms it hu fr es de cs" AM_GNU_GETTEXT AC_CONFIG_SUBDIRS(blip-0.1 firetalk-0.1 kkconsui-0.1 kkstrtext-0.1 libicq2000-0.1 libjabber-0.1 libyahoo2-0.1 kksystr-0.1 connwrap-0.1) AC_OUTPUT(Makefile contrib/Makefile contrib/spanish/Makefile misc/Makefile share/Makefile src/Makefile src/hooks/Makefile po/Makefile.in intl/Makefile)