diff --git a/configure.ac b/configure.ac index 79b191f..98e4896 100755 --- a/configure.ac +++ b/configure.ac @@ -137,15 +137,35 @@ dnl -------------- dnl Check programs dnl -------------- AC_PROG_INSTALL +AC_PROG_LN_S AC_PROG_MAKE_SET AC_CHECK_TOOL(AR, ar) -AC_CHECK_TOOL(RANLIB, ranlib, :) dnl --------- dnl AIX check dnl --------- AC_AIX +dnl --------------------------- +dnl We, perhaps unfortunately, +dnl depend on GNU Make specific +dnl constructs. +dnl Give the user a warning if +dnl not GNU Make. +dnl --------------------------- +AC_CACHE_CHECK([if ${MAKE-make} is GNU make], [quagga_cv_gnu_make], + [quagga_cv_gnu_make=no + if ${MAKE-make} --version 2>/dev/null | \ + grep '^GNU Make ' >/dev/null ; then + quagga_cv_gnu_make=yes; + fi]) +if test $quagga_cv_gnu_make != "yes"; then + echo " **Warning**: Note that GNU Make is required." + echo " You may wish to run configure with MAKE=gmake, ala:" + echo " ./configure MAKE=gmake ...." + echo " alternatively, ensure you use GNU make to build" +fi + dnl ------- dnl libtool dnl ------- @@ -340,11 +360,28 @@ changequote([, ])dnl AC_SUBST(MULTIPATH_NUM) -dnl ------------------- -dnl Check header files. -dnl ------------------- +dnl ------------------------------------ +dnl Check C keywords and standard types +dnl ------------------------------------ +AC_C_CONST +AC_C_INLINE +AC_C_RESTRICT +AC_C_VOLATILE AC_HEADER_STDC -AC_CHECK_HEADERS([string.h stropts.h sys/conf.h sys/ksym.h sys/time.h \ +AC_HEADER_STDBOOL +AC_HEADER_TIME +AC_HEADER_SYS_WAIT +dnl AC_TYPE_PID_T +AC_TYPE_UID_T +AC_TYPE_MODE_T +AC_TYPE_SIZE_T +AC_TYPE_SIGNAL +AC_STRUCT_TM + +dnl ------------------------- +dnl Check other header files. +dnl ------------------------- +AC_CHECK_HEADERS([stropts.h sys/conf.h sys/ksym.h \ sys/times.h sys/select.h sys/sysctl.h sys/sockio.h \ sys/types.h linux/version.h kvm.h netdb.h asm/types.h \ sys/param.h libutil.h limits.h stdint.h]) @@ -353,12 +390,10 @@ AC_CHECK_HEADERS([sys/socket.h netinet/i net/if_dl.h net/netopt.h inet/nd.h net/route.h \ net/if.h net/if_var.h netinet/in_var.h]) -dnl V6 headers are checked below, after we check for v6 +AC_CHECK_HEADERS([arpa/inet.h fcntl.h libintl.h stddef.h sys/ioctl.h \ + syslog.h wchar.h wctype.h]) -dnl check some types -AC_C_CONST -dnl AC_TYPE_PID_T -AC_TYPE_SIGNAL +dnl V6 headers are checked below, after we check for v6 dnl Some systems (Solaris 2.x) require libnsl (Network Services Library) case "$host" in @@ -520,9 +555,30 @@ dnl AC_CHECK_SIZEOF(long) dnl ---------------------------- dnl check existance of functions dnl ---------------------------- -AC_CHECK_FUNCS(memset memcpy strerror inet_aton daemon snprintf vsnprintf \ - strlcat strlcpy if_nametoindex if_indextoname getifaddrs \ - fcntl strnlen strndup) +AC_FUNC_CHOWN +AC_FUNC_FNMATCH +AC_FUNC_FORK +AC_FUNC_MALLOC +AC_FUNC_MEMCMP +AC_FUNC_MKTIME +AC_FUNC_STRFTIME +AC_FUNC_REALLOC +AC_FUNC_STAT +AC_FUNC_SELECT_ARGTYPES +AC_FUNC_STRFTIME +AC_FUNC_STRNLEN +AC_FUNC_VPRINTF + +AC_CHECK_FUNCS(dup2 ftruncate getcwd gethostbyname getpagesize gettimeofday \ + inet_ntoa \ + memchr memmove memset pow select socket \ + strcasecmp strchr strcspn strdup strerror \ + strncasecmp strndup strrchr strspn strstr \ + strtol strtoul strlcat strlcpy \ + daemon snprintf vsnprintf \ + if_nametoindex if_indextoname getifaddrs \ + uname fcntl) + AC_CHECK_FUNCS(setproctitle, , [AC_CHECK_LIB(util, setproctitle, [LIBS="$LIBS -lutil" @@ -1363,6 +1419,7 @@ host operationg system : ${host_os} source code location : ${srcdir} compiler : ${CC} compiler flags : ${CFLAGS} +make : ${MAKE-make} includes : ${INCLUDES} ${SNMP_INCLUDES} linker flags : ${LDFLAGS} ${LIBS} ${LIBCAP} ${LIBREADLINE} state file directory : ${quagga_statedir} @@ -1375,5 +1432,10 @@ config file mask : ${enable_confi log file mask : ${enable_logfile_mask} The above user and group must have read/write access to the state file -directory and to the config files in the config file directory. -" +directory and to the config files in the config file directory." + +if test x"$quagga_cv_gnu_make" = x"no"; then echo " +Warning: The detected ${MAKE-make} programme in your path is not GNU +Make, which is required to build certain parts of Quagga. GNU Make is +installed as 'gmake' on some systems." +fi