dnl we need to check for cross compile tools for vxWorks here
AC_PROG_CC
-AC_PROG_CC_STDC
-dnl AC_PROG_CC_C89
-# make sure CC is *some* version of ANSI.
# Ralf Wildenhues: With per-target flags we need CC_C_O
-AC_PROG_CC_C_O
+# AM_PROG_CC_C_O supersets AC_PROG_CC_C_O
+AM_PROG_CC_C_O
+AC_PROG_CC_STDC
AC_PROG_CPP
# HMS: These need to be moved to AM_CPPFLAGS and/or AM_CFLAGS
;;
esac
-AC_CHECK_FUNC(gethostent, ,
- AC_CHECK_LIB(nsl, gethostent, , , $libxnet -lsocket))
-AC_CHECK_FUNC(openlog, ,
- AC_CHECK_LIB(gen, openlog, ,
- AC_CHECK_LIB(syslog, openlog, , , $libxnet -lsocket)))
-AC_CHECK_LIB(md5, MD5Init, ,
- AC_CHECK_LIB(md, MD5Init))
+AC_CHECK_FUNC([gethostent], ,
+ AC_SEARCH_LIBS([gethostent], [nsl], , , [$libxnet -lsocket]))
+AC_CHECK_FUNC([openlog], ,
+ AC_SEARCH_LIBS([openlog], [gen], ,
+ AC_SEARCH_LIBS([openlog], [syslog], , , [$libxnet -lsocket])))
+AC_SEARCH_LIBS([MD5Init], [md5 md])
AC_CHECK_FUNCS(MD5Init)
# following block becomes on 4.2.5: NTP_LINEEDITLIBS
dnl real-time library, so we don't want to use it.
case "$host" in
- *-*-linux*) ;;
+ *-*-*linux*) ;;
*)
AC_CHECK_LIB(rt, sched_setscheduler, ,
AC_CHECK_LIB(posix4, sched_setscheduler))
esac
AC_CHECK_FUNC(setsockopt, ,
- [AC_CHECK_LIB(socket, setsockopt)
- AC_CHECK_LIB(xnet, setsockopt)])
+ [AC_SEARCH_LIBS([setsockopt], [socket xnet])])
AC_HEADER_STDC
AC_CHECK_HEADERS(bstring.h)
AC_CONFIG_FILES(scripts/summary, [chmod +x scripts/summary])
AC_CONFIG_FILES(util/Makefile)
-dnl it is not safe to share configuration
-dnl cache with sntp as it uses different
-dnl headers in a different order and
-dnl tests for different libraries.
-dnl
-dnl AC_CONFIG_SUBDIRS(sntp)
+AC_CONFIG_SUBDIRS(sntp)
AC_OUTPUT
esac
# Checks for library functions.
-AC_FUNC_MEMCMP
+#AC_FUNC_MEMCMP dnl HMS: we don't have a memcmp.c to use here, so why bother?
AC_FUNC_SETVBUF_REVERSED
AC_TYPE_SIGNAL
AC_CHECK_FUNCS([alarm])
-AC_CHECK_FUNC(gethostent, , AC_CHECK_LIB(nsl, gethostent, , , -lsocket))
+AC_CHECK_FUNC([gethostent], , AC_SEARCH_LIBS([gethostent], [nsl], , , [-lsocket]))
AC_CHECK_FUNCS([gettimeofday inet_ntoa memset])
-AC_CHECK_FUNCS(socket, , AC_CHECK_LIB(socket, socket))
-AC_CHECK_FUNCS(sqrt, , AC_CHECK_LIB(m, sqrt))
+AC_CHECK_FUNCS([socket], , AC_SEARCH_LIBS([socket], [socket]))
+AC_CHECK_FUNCS([sqrt], , AC_SEARCH_LIBS([sqrt], [m]))
AC_CHECK_FUNCS([strrchr])
case "$host" in