dnl dnl Process this file with autoconf dnl to build the configure script dnl AC_INIT(src/linkcheck.h) AM_CONFIG_HEADER(include/config.h) VERSION=`sed -e 's/^.*"\(.*\)";$/\1/' ${srcdir}/src/version.c` AM_INIT_AUTOMAKE(linkcheck, $VERSION) dnl dnl Define the utils directory dnl AC_CONFIG_AUX_DIR(utils) dnl dnl canonicalize the host dnl AC_CANONICAL_HOST AC_CANONICAL_TARGET PLATFORM="${host_vendor}-${host_cpu}-${host_os}" AC_SUBST(PLATFORM) dnl dnl Get the compiler dnl AC_PROG_CC dnl Check for perl AC_PATH_PROG( PERL, perl, false ) dnl Check for sh AC_PATH_PROG( SH, sh, false ) dnl Check for AIX AC_AIX if test -n "$auto_cflags"; then if test -n "$GCC"; then CFLAGS="$CFLAGS -g -O2 -Wall -Wno-implicit" else case "$host_os" in *hpux*) CFLAGS="$CFLAGS +O3" ;; *ultrix* | *osf*) CFLAGS="$CFLAGS -O -Olimit 2000" ;; *) CFLAGS="$CFLAGS -O" ;; esac fi fi AC_PROG_MAKE_SET AC_PROG_INSTALL dnl dnl with debugging dnl debugging="no" AC_ARG_WITH(debugging,dnl [ --with-debugging compile with program debugging], [ debugging="$withval" ]) if test "$debugging" != "no"; then AC_MSG_RESULT(checking for debugging level... one) AC_DEFINE(DEBUG) else AC_MSG_RESULT(checking for debugging level... zero) fi dnl Checks for header files. AC_HEADER_STDC AC_HEADER_SYS_WAIT AC_CHECK_HEADERS(memory.h) AC_CHECK_HEADERS(errno.h) AC_CHECK_HEADERS(netinet/in.h) AC_CHECK_HEADERS(sys/types.h) AC_CHECK_HEADERS(sys/socket.h) AC_CHECK_HEADERS(netdb.h) AC_CHECK_HEADERS(arpa/nameser.h) AC_CHECK_HEADERS(resolv.h) AC_CHECK_HEADERS(signal.h) dnl dnl Checks for typedefs, structures, and compiler characteristics. dnl AC_C_CONST AC_TYPE_SIZE_T dnl dnl Return type of signal-handlers dnl AC_TYPE_SIGNAL dnl dnl Checks for library functions. dnl AC_CHECK_FUNCS(strchr memcpy strstr strcmp strncmp strncpy strlen) AC_CHECK_FUNCS(strncasecmp strcasecmp strncmp) AC_CHECK_FUNCS(socket, [], [ AC_CHECK_LIB(socket, socket) ]) AC_CHECK_FUNCS(gethostbyname, [], [ AC_CHECK_LIB(nsl, gethostbyname) ]) dnl dnl Check for libraries dnl AC_CHECK_LIB(socket, socket) dnl resolve lib? AC_CHECK_LIB(resolv, res_query, [LINK_LIBS="-lresolv $LIBS"], , -lnsl) AC_SUBST(LINK_LIBS) dnl dnl Write platform to file for support reporting dnl AC_OUTPUT_COMMANDS([ outfile=PLATFORM tmpfile=${outfile} cat > $tmpfile << _EOF_ $PLATFORM _EOF_ ], [PLATFORM=$PLATFORM]) AC_OUTPUT(Makefile src/Makefile doc/Makefile include/Makefile utils/Makefile)