1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60
|
# Process this file with autoconf to produce a configure script.
AC_INIT(wuzzah, 0.53, /dev/null)
AC_CONFIG_SRCDIR([wuzzah.c])
AM_CONFIG_HEADER(config.h)
AM_INIT_AUTOMAKE(wuzzah, 0.53, [gnu])
# uncomment this when testing on allspice
AM_MAINTAINER_MODE
# Checks for programs.
AC_PROG_AWK
AC_PROG_CC
AC_PROG_INSTALL
AC_PROG_LN_S
AC_PROG_RANLIB
# Checks for libraries.
AC_SEARCH_LIBS([gethostbyname], [nsl])
AC_SEARCH_LIBS([inet_ntoa], [nsl],,,[socket])
# Checks for header files.
AC_HEADER_STDC
AC_HEADER_SYS_WAIT
AC_CHECK_HEADERS([stdlib.h string.h unistd.h utmpx.h libgen.h time.h])
AC_CHECK_HEADERS([fcntl.h paths.h libintl.h errno.h sys/types.h pwd.h])
AC_CHECK_HEADERS([getopt.h utmp.h netdb.h sys/socket.h netinet/in.h])
AC_CHECK_HEADERS([arpa/inet.h])
# Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_STRUCT_TM
AC_TYPE_PID_T
AC_CHECK_MEMBERS([struct utmpx.ut_user],,, [#include <utmpx.h>])
AC_CHECK_MEMBERS([struct utmpx.ut_type],,, [#include <utmpx.h>])
AC_CHECK_MEMBERS([struct utmpx.ut_host],,, [#include <time.h>
#include <utmpx.h>])
AC_CHECK_MEMBERS([struct utmpx.ut_syslen],,, [#include <utmpx.h>])
AC_CHECK_MEMBERS([struct utmp.ut_user],,, [#include <utmp.h>])
AC_CHECK_MEMBERS([struct utmp.ut_type],,, [#include <utmp.h>])
AC_CHECK_MEMBERS([struct utmp.ut_host],,, [#include <time.h>
#include <utmp.h>])
AC_CHECK_MEMBERS([struct utmp.ut_syslen],,, [#include <utmp.h>])
AC_CHECK_MEMBERS([struct passwd.pw_name],,, [#include <pwd.h>])
# Checks for library functions.
AC_FUNC_MALLOC
AC_FUNC_FORK
AC_FUNC_REALLOC
AC_CHECK_FUNCS([memset strcspn strerror strdup basename gethostbyname])
AC_CHECK_FUNCS([inet_ntoa memchr strspn setpwent getpwent endpwent])
AC_CHECK_FUNCS([setutxent getutxent endutxent],AC_SUBST(utmpx_wrapper),
AC_SUBST(utmpx_wrapper,"utmpx/libutmpxwrapper.a"))
AC_CHECK_FUNCS([getopt_long],AC_SUBST(do_we_need_getopt),
AC_SUBST(do_we_need_getopt,"getopt/libgetopt.a"))
AC_CONFIG_FILES([Makefile
getopt/Makefile
hashtable/Makefile
man/Makefile
utmpx/Makefile])
AC_OUTPUT
|