dnl Process this file with autoconf to produce a configure script. AC_INIT(src/in.fingerd.c) AM_CONFIG_HEADER(config.h) AM_INIT_AUTOMAKE(pfinger, 0.7.10) AM_ACLOCAL_INCLUDE(macros) AC_CANONICAL_HOST AC_ISC_POSIX dnl Check for arguments AC_ARG_WITH(server, [ --with-server Only build the server], [case "${withval}" in yes) SERVER="in.fingerd fingerd" ;; no) SERVER="" ;; *) AC_MSG_ERROR(bad value ${withval} for --with-server) ;; esac], [SERVER="in.fingerd fingerd"]) AC_SUBST(SERVER) AC_ARG_WITH(client, [ --with-client Only build the server], [case "${withval}" in yes) PFINGER="pfinger" pfinger=yes ;; no) PFINGER="" pfinger=no;; *) AC_MSG_ERROR(bad value ${withval} for --with-client) ;; esac], [PFINGER="pfinger" pfinger=yes]) AC_SUBST(PFINGER) dnl Checks for programs. AC_PROG_CC AC_PROG_CPP dnl Checks for libraries. dnl Replace `main' with a function in -libs: AC_CHECK_LIB(ibs, main) AC_CHECK_LIB(xnet, getpeername) AC_CHECK_LIB(crypt, crypt) dnl Test if GTK is available dnl Dont make the client if not if test $pfinger = yes; then AM_PATH_GTK(1.0.0, PFINGER="pfinger", PFINGER="") AC_SUBST(PFINGER) fi dnl Checks for header files. AC_STDC_HEADERS AC_HEADER_SYS_WAIT AC_CHECK_HEADERS(fcntl.h limits.h malloc.h paths.h strings.h syslog.h unistd.h utmpx.h) dnl Checks for typedefs, structures, and compiler characteristics. AC_C_CONST AC_C_INLINE AC_TYPE_PID_T AC_TYPE_SIZE_T dnl on older systems getopt is not declared in unistd.h AC_MSG_CHECKING([for getopt declaration]) AC_EGREP_HEADER(getopt, unistd.h, getopt=yes, AC_EGREP_HEADER(getopt, stdlib.h, getopt=yes, getopt=no)) if test $getopt = yes; then AC_DEFINE(HAVE_GETOPT_DECL) AC_MSG_RESULT(yes) else AC_MSG_RESULT(no) fi dnl utmp is really funny thingie AC_MSG_CHECKING([for ut_type in utmp.h]) AC_HEADER_EGREP(ut_type, utmp.h, ut_type=yes, ut_type=no) if test $ut_type = yes; then AC_DEFINE(HAVE_UT_TYPE) AC_MSG_RESULT(yes) else AC_MSG_RESULT(no) fi AC_MSG_CHECKING([for ut_user in utmp.h]) AC_HEADER_EGREP(ut_user, utmp.h, ut_user=yes, ut_user=no) if test $ut_user = yes; then AC_DEFINE(HAVE_UT_USER) AC_MSG_RESULT([yes]) else AC_MSG_RESULT(no) fi AC_MSG_CHECKING([for ut_host in utmp.h]) AC_HEADER_EGREP(ut_host, utmp.h, ut_host=yes, ut_host=no) if test $ut_host = yes; then AC_DEFINE(HAVE_UT_HOST) AC_MSG_RESULT([yes]) else AC_MSG_RESULT(no) fi dnl Checks for library functions. AC_FUNC_STRFTIME AC_TYPE_SIGNAL dnl AC_FUNC_SETVBUF_REVERSED AC_CHECK_FUNCS(flock getcwd getdomainname gethostname getwd putenv socket strdup strstr strsep setutent snprintf vsnprintf inet_ntoa setsid) dnl ## host specific testing dnl ## inet_ntoa seems to be broken on some systems case "$host" in *-*-irix5*) AC_DEFINE(BROKEN_INET_NTOA) ;; *-*-irix6*) AC_DEFINE(BROKEN_INET_NTOA) ;; *-next-*) AC_DEFINE(BROKEN_INET_NTOA) ;; esac dnl ## internationalization support dnl ALL_LINGUAS="de" dnl AM_GNOME_GETTEXT dnl AC_CHECK_FUNC(gettext, dnl , dnl AC_CHECK_LIB(intl, gettext) dnl ) dnl AC_LINK_FILES($nls_cv_header_libgt, $nls_cv_header_intl) dnl GTK_LIBS="`gtk-config --libs`" dnl GTK_INCLUDES="`gtk-config --cflags`" AC_SUBST(GTK_LIBS) AC_SUBST(GTK_CFLAGS) AC_OUTPUT(Makefile src/Makefile doc/Makefile test/Makefile) dnl po/Makefile.in dnl intl/Makefile dnl intl/Makefile)