AC_INIT(src/main.c) tmsnc_MAJOR=0 tmsnc_MINOR=3 tmsnc_MICRO=2 tmsnc_VERSION=$tmsnc_MAJOR.$tmsnc_MINOR.$tmsnc_MICRO AC_SUBST(tmsnc_VERSION) VERSION=$tmsnc_VERSION PACKAGE=tmsnc AM_INIT_AUTOMAKE($PACKAGE,$VERSION) AM_CONFIG_HEADER(src/config.h) AC_PROG_CC AC_PROG_INSTALL AC_PROG_MAKE_SET # Checks for header files. AC_HEADER_STDC # Checks for typedefs, structures, and compiler characteristics. AC_TYPE_PID_T AC_TYPE_SIZE_T AC_HEADER_TIME AC_STRUCT_TM AC_SEARCH_LIBS(gethostbyname, nsl socket resolv) AC_CHECK_FUNC(socket, , AC_CHECK_LIB(socket, socket, , AC_CHECK_LIB(nsl, socket))) AC_CHECK_CURSES if test "$has_curses" = false ; then AC_ERROR(You don't seem to have the curses headers installed) fi CURSES_LIBS="$CURSES_LIBS -lpanel -lform" AM_ICONV AC_SUBST(CURSES_LIBS) AC_SUBST(CURSES_INCLUDEDIR) dnl Checks for openssl AH_TEMPLATE(HAVE_OPENSSL, [openssl executable path]) AM_CONDITIONAL(OPENSSL, false) AC_MSG_CHECKING(for openssl) AC_ARG_WITH(openssl, AC_HELP_STRING(--with-openssl=DIR,use openssl in DIR), [ if test -f $withval/include/openssl/ssl.h; then SSLINC="-I$withval/include" SSLLIB="-L$withval/lib -lssl -lcrypto" AC_DEFINE(HAVE_OPENSSL, 1) AM_CONDITIONAL(OPENSSL, true) AC_MSG_RESULT($withval) elif test -f $withval/ssl/include/openssl/ssl.h; then SSLINC="-I$withval/ssl/include" SSLLIB="-L$withval/ssl/lib -lssl -lcrypto" AC_DEFINE(HAVE_OPENSSL, 1) AM_CONDITIONAL(OPENSSL, true) AC_MSG_RESULT($withval) else AC_MSG_RESULT(no) AC_MSG_ERROR([ssl.h not found in $withval]) fi ], [ if test -f /usr/include/openssl/ssl.h; then SSLLIB="-lssl -lcrypto" AC_DEFINE(HAVE_OPENSSL, 1) AM_CONDITIONAL(OPENSSL, true) AC_MSG_RESULT(yes) else AC_MSG_RESULT(no) AC_MSG_ERROR([ssl.h not found in $withval]) fi] ) AC_SUBST(SSLINC) AC_SUBST(SSLLIB) AH_TEMPLATE(HAVE_TALKFILTERS, [libtalkfilters]) AM_CONDITIONAL(TALKFILTERS, false) AC_CHECK_LIB(talkfilters, gtf_filter_warez, [ has_talkfilters=yes TFLIB="-ltalkfilters" AC_DEFINE(HAVE_TALKFILTERS, 1) AM_CONDITIONAL(TALKFILTERS, true) ], has_talkfilters=no) AC_SUBST(TFLIB) AC_OUTPUT(Makefile doc/Makefile src/Makefile autopackage/default.apspec) echo " Version: ${VERSION} Prefix: ${prefix} CFLAGS: ${CFLAGS} Talkfilter support: ${has_talkfilters} i18n support: ${am_cv_func_iconv} "