84
84
# HMS: These need to be moved to AM_CPPFLAGS and/or AM_CFLAGS
87
CFLAGS="$CFLAGS -Dfork=vfork -DSYS_AMIGA"
89
*-*-hpux10.*) # at least for hppa2.0-hp-hpux10.20
93
*) CFLAGS="$CFLAGS -Wp,-H18816"
98
87
CFLAGS="$CFLAGS -DSYS_CYGWIN32"
224
213
AC_MSG_RESULT($use_binsubdir)
225
215
BINSUBDIR=$use_binsubdir
226
216
AC_SUBST(BINSUBDIR)
217
AM_CONDITIONAL(NTP_BINSUBDIR_IS_BIN, test "bin" = "$BINSUBDIR")
228
AC_MSG_CHECKING([if we want to use arlib])
230
AC_HELP_STRING([--with-arlib], [- Compile the async resolver library?]),
219
AC_MSG_CHECKING([for deprecated --with-arlib])
221
AC_HELP_STRING([--with-arlib], [- deprecated, arlib not distributed]),
231
222
[ans=$withval], [ans=no])
232
223
AC_MSG_RESULT([$ans])
234
if test -d $srcdir/arlib
239
AC_CONFIG_SUBDIRS(arlib)
227
AC_MSG_WARN([Please do not use --with-arlib, arlib is no longer included. In the future, --with-arlib will not be recognized.])
245
230
AC_ARG_WITH(rpath,
246
231
AC_HELP_STRING([--without-rpath], [s Disable auto-added -R linker paths]),
282
# Quick and dirty sanity check
284
'') AC_MSG_ERROR(Please follow the directions in html/build/hints/vxworks.html!)
287
CFLAGS="$CFLAGS -DSYS_VXWORKS"
293
262
dnl we need to check for cross compile tools for vxWorks here
319
288
CFLAGS="$CFLAGS -Wstrict-overflow"
321
# if building with OpenSSL, -Wno-strict-prototypes is added later
326
CFLAGS="$CFLAGS -posix"
328
dnl This is currently commented out by bor.
329
dnl The new versions of ReliantUNIX round adjtime() interval down
330
dnl to 1/100s (system tick). This makes tickadj actually useless.
331
dnl So, I'd better not use additional flags.
332
dnl I leave it here just in case anybody has better idea
333
dnl mips-sni-sysv4* )
335
dnl # Add flags for 64 bit file access to enable tickadj to access /dev/kmem
337
dnl if getconf _LFS_CFLAGS > /dev/null 2>&1 ; then
338
dnl CFLAGS="$CFLAGS `getconf _LFS_CFLAGS`"
290
# -W[no-]strict-prototypes is added later depending on OpenSSL
343
293
ac_busted_vpath_in_make=no
457
407
AC_SEARCH_LIBS([setsockopt], [socket xnet])
458
408
AC_SEARCH_LIBS([res_init], [resolv], , , [-lsocket -lnsl])
411
AC_CHECK_LIB([resolv],[res_9_init])
459
415
AC_CHECK_FUNCS(res_init __res_init)
2175
2144
yes) AC_DEFINE(PPS, 1, [Do we have the ppsclock streams module?]) ;;
2178
AC_CACHE_CHECK([for kernel multicast support], ac_cv_var_mcast,
2181
i386-sequent-sysv4) ;;
2182
*) AC_EGREP_CPP(yes,
2183
[#include <netinet/in.h>
2184
#ifdef IP_ADD_MEMBERSHIP
2187
], ac_cv_var_mcast=yes) ;;
2189
case "$ac_cv_var_mcast" in
2148
[for multicast IP support],
2159
#ifdef HAVE_NETINET_IN_H
2160
#include <netinet/in.h>
2164
struct ip_mreq ipmr;
2165
ipmr.imr_interface.s_addr = 0;
2168
[ntp_cv_multicast=yes],
2175
case "$ntp_cv_multicast" in
2191
AC_DEFINE(MCAST, 1, [Does the kernel support multicasting IP?])
2192
AC_CACHE_CHECK([[arg type needed for IP*_MULTICAST_LOOP for setsockopt()]],
2193
ac_cv_var_typeof_ip_multicast_loop,
2195
*-*-netbsd*|*-*-*linux*)
2196
ac_cv_var_typeof_ip_multicast_loop=u_int
2199
ac_cv_var_typeof_ip_multicast_loop=BOOL
2201
*) ac_cv_var_typeof_ip_multicast_loop=u_char
2204
AC_DEFINE_UNQUOTED(TYPEOF_IP_MULTICAST_LOOP,
2205
$ac_cv_var_typeof_ip_multicast_loop,
2206
[What type to use for setsockopt])
2177
AC_DEFINE(MCAST, 1, [Does the target support multicast IP?])
2179
[[arg type needed for setsockopt() IP*_MULTICAST_LOOP]],
2180
ntp_cv_typeof_ip_multicast_loop,
2183
*-*-netbsd*|*-*-*linux*)
2184
ntp_cv_typeof_ip_multicast_loop=u_int
2187
ntp_cv_typeof_ip_multicast_loop=BOOL
2190
ntp_cv_typeof_ip_multicast_loop=u_char
2194
AC_DEFINE_UNQUOTED([TYPEOF_IP_MULTICAST_LOOP],
2195
$ntp_cv_typeof_ip_multicast_loop,
2196
[What type to use for setsockopt]
2210
2200
AC_CACHE_CHECK([[availability of ntp_{adj,get}time()]], ac_cv_var_ntp_syscalls,
3371
# OpenSSL has a number of callback prototypes inside other function
3372
# prototypes which trigger copious warnings with -Wstrict-prototypes,
3373
# (which is included in -Wall).
3361
# Older OpenSSL headers have a number of callback prototypes inside
3362
# other function prototypes which trigger copious warnings with gcc's
3363
# -Wstrict-prototypes, which is included in -Wall.
3377
3367
# int i2d_RSA_NET(const RSA *a, unsigned char **pp,
3378
# int (*cb)(), int sgckey);
3381
# The OpenSSL headers probably haven't been fixed in this regard
3382
# due to the hoops you have to jump through to stay compatible with
3368
# int (*cb)(), int sgckey);
3373
openssl_triggers_warnings=unknown
3374
SAVED_CFLAGS="$CFLAGS"
3385
3376
case "$GCC$ntp_openssl" in
3387
CFLAGS="$CFLAGS -Wno-strict-prototypes"
3378
CFLAGS="$CFLAGS -Werror"
3380
AC_LANG_SOURCE([[ /* see if -Werror breaks gcc */ ]]),
3381
[gcc_handles_Werror=yes],
3382
[gcc_handles_Werror=no]
3384
case "$gcc_handles_Werror" in
3386
# if this gcc doesn't do -Werror go ahead and use
3387
# -Wstrict-prototypes.
3388
openssl_triggers_warnings=yes
3391
CFLAGS="$CFLAGS -Wstrict-prototypes"
3395
#include "openssl/asn1_mac.h"
3396
#include "openssl/bn.h"
3397
#include "openssl/err.h"
3398
#include "openssl/evp.h"
3399
#include "openssl/pem.h"
3400
#include "openssl/rand.h"
3401
#include "openssl/x509v3.h"
3403
[[ /* empty body */ ]]
3405
[openssl_triggers_warnings=no],
3406
[openssl_triggers_warnings=yes]
3409
case "$openssl_triggers_warnings" in
3411
CFLAGS="$SAVED_CFLAGS -Wno-strict-prototypes"
3414
CFLAGS="$SAVED_CFLAGS -Wstrict-prototypes"
3418
# gcc without OpenSSL
3419
CFLAGS="$SAVED_CFLAGS -Wstrict-prototypes"
3390
3422
AC_MSG_CHECKING([if we want to compile with ElectricFence])