AC_INIT(tcd, 2.1.1) AM_INIT_AUTOMAKE(tcd, 2.1.1) AC_PROG_CC() # the following ncurses detection code comes from the mtr project. # # We don't refer to any symbols in termcap, but -lcurses on SunOS does. # We have to trust the linker not to mess things up... (It should not # pull in anything if we don't refer to anything in the lib). AC_CHECK_LIB(termcap, tgetent) AC_CHECK_FUNC(initscr, , AC_CHECK_LIB(ncurses, initscr, , AC_CHECK_LIB(curses, initscr, , AC_CHECK_LIB(cursesX, initscr, , AC_ERROR(No curses library found.))))) AC_CHECK_FUNCS(attron herror strerror seteuid) AC_CHECK_HEADERS(ncurses.h ncurses/curses.h curses.h cursesX.h sys/types.h) AM_CONFIG_HEADER(src/config.h) if test "$GCC" = yes -a "$ac_enc_CFLAGS_set" != set; then ac_gcc_version=`echo __GNUC__ | $CC -E - | grep -v ^\#` ac_gcc_minor_version=`echo __GNUC_MINOR__ | $CC -E - | grep -v ^\#` # don't confuse ./configure by setting the CFLAGS too early. if test "$ac_gcc_version" = 3 -a "$ac_gcc_minor_version" = 3; then CFLAGS="$CFLAGS -W -Wall -Wstrict-prototypes -Wmissing-prototypes" CFLAGS="$CFLAGS -Wfloat-equal -Wundef -Wendif-labels" CFLAGS="$CFLAGS -Wshadow -Wpointer-arith -Wbad-function-cast" CFLAGS="$CFLAGS -Wcast-qual -Wcast-align -Wwrite-strings" CFLAGS="$CFLAGS -Wsign-compare -Wmissing-declarations" CFLAGS="$CFLAGS -Wredundant-decls -Wnested-externs" CFLAGS="$CFLAGS -Werror -std=c99" elif test "$ac_gcc_version" = 3; then CFLAGS="$CFLAGS -W -Wall -Werror -std=c99" elif test "$ac_gcc_version" = 2 -a "$ac_gcc_minor_version" -ge 95; then CFLAGS="$CFLAGS -W -Wall -Werror" fi echo "setting CFLAGS to \"$CFLAGS\" for gcc-$ac_gcc_version.$ac_gcc_minor_version." >&6 fi AC_OUTPUT(Makefile src/Makefile)