# Process this file with autoconf to produce a configure script. AC_INIT(ircfs, 2-pre-alpha-m3-pre2, zaf@nrc.co.nz) AM_INIT_AUTOMAKE(ircfs, 2-pre-alpha-m3-pre2) AC_CONFIG_SRCDIR(src/runtime.c) AM_CONFIG_HEADER(src/config.h) AC_CONFIG_AUX_DIR(config) AC_ARG_ENABLE(debug, AC_HELP_STRING([--enable-debug],[Enable some extra debugging functions]), [ AC_DEFINE(ENABLE_DEBUG,[],[Enable some extra debugging stuff]) my_debug_enabled=yes ],[ my_debug_enabled=no ]) # Checks for programs. CFLAGS="-Wall -g" AC_PROG_CC AC_PROG_INSTALL AC_PROG_RANLIB AC_CHECK_PROG(M4, [m4], [m4]) # Checks for libraries. AC_CHECK_LIB(readline,readline) # Checks for header files. AC_HEADER_STDC AC_CHECK_HEADERS([arpa/inet.h netinet/in.h stdlib.h string.h sys/socket.h sys/time.h unistd.h sys/resource.h sys/utsname.h]) AC_HEADER_TIME # Checks for typedefs, structures, and compiler characteristics. AC_C_CONST AC_C_INLINE AC_TYPE_SIZE_T # Checks for library functions. AC_FUNC_ERROR_AT_LINE AC_FUNC_MEMCMP AC_FUNC_SELECT_ARGTYPES AC_FUNC_STAT AC_FUNC_MALLOC AC_FUNC_SELECT_ARGTYPES AC_CHECK_FUNCS([gettimeofday select socket strcasecmp inet_aton strcpy memcpy sigaction], ,[AC_MSG_ERROR([do not have a required function. Please email author with details of your system and the name of the missing function])]) AC_CHECK_FUNCS([strsignal getrlimit setrlimit uname getrusage]) AC_CHECK_FUNCS([backtrace],[ LDFLAGS="$LDFLAGS -rdynamic" ]) if test "$my_debug_enabled" = yes; then AC_MSG_NOTICE([Debugging is enabled]); fi saveprefix=$prefix test "x$prefix" = xNONE && prefix=$ac_default_prefix eval sysconftmp=$sysconfdir AC_DEFINE_UNQUOTED([SYSCONFDIR],"$sysconftmp",[The system config dir]) prefix=$saveprefix AC_CONFIG_FILES([Makefile src/Makefile doc/Makefile src/appconf/Makefile \ doc/website/Makefile]) AC_OUTPUT