From abffe70054141d76a86e2d69822f495d40c19646 Mon Sep 17 00:00:00 2001 From: Harlan Stenn Date: Thu, 5 Mar 2015 10:17:02 +0000 Subject: [PATCH] [Bug 2783] Quiet autoconf warnings about missing AC_LANG_SOURCE bk: 54f82d1eagoTAeVHjXjWnJDuUfPQHQ --- ChangeLog | 1 + configure.ac | 46 ++++++++++++++++++++------------------ sntp/libopts/m4/libopts.m4 | 24 ++++++++++---------- sntp/m4/ntp_libntp.m4 | 8 +++---- 4 files changed, 41 insertions(+), 38 deletions(-) diff --git a/ChangeLog b/ChangeLog index 18b025751..9030d8012 100644 --- a/ChangeLog +++ b/ChangeLog @@ -12,6 +12,7 @@ * [Bug 2771] nonvolatile value is documented in wrong units. * [Bug 2773] Early leap announcement from Palisade/Thunderbolt * [Bug 2775] ntp-keygen.c fails to compile under Windows. +* [Bug 2783] Quiet autoconf warnings about missing AC_LANG_SOURCE. --- (4.2.8p1) 2015/02/04 Released by Harlan Stenn diff --git a/configure.ac b/configure.ac index 7916548ff..11881775b 100644 --- a/configure.ac +++ b/configure.ac @@ -1500,12 +1500,13 @@ AC_CACHE_CHECK( ;; *) AC_PREPROC_IFELSE( - [ - #include - #if !defined(SYS_ntp_gettime) || !defined(SYS_ntp_adjtime) - # error - #endif - ], + [AC_LANG_SOURCE( + [ + #include + #if !defined(SYS_ntp_gettime) || !defined(SYS_ntp_adjtime) + # error + #endif + ])], [ntp_cv_var_ntp_syscalls=kernel] ) ;; @@ -1527,12 +1528,13 @@ AC_CACHE_CHECK( [if sys/timex.h has STA_FLL], [ntp_cv_var_sta_fll], [AC_PREPROC_IFELSE( - [ - #include - #ifndef STA_FLL - # error - #endif - ], + [AC_LANG_SOURCE( + [ + #include + #ifndef STA_FLL + # error + #endif + ])], [ntp_cv_var_sta_fll=yes], [ntp_cv_var_sta_fll=no] )] @@ -1587,12 +1589,12 @@ AC_MSG_CHECKING([for TTY PPS ioctl TIOCGPPSEV]) case "$ac_cv_header_termios_h" in yes) AC_PREPROC_IFELSE( - [ + [AC_LANG_SOURCE([ #include #ifndef TIOCGPPSEV # error #endif - ], + ])], [ntp_ok=yes], [ntp_ok=no] ) @@ -1613,12 +1615,12 @@ AC_MSG_CHECKING([for TTY PPS ioctl TIOCSPPS]) case "$ac_cv_header_termios_h" in yes) AC_PREPROC_IFELSE( - [ + [AC_LANG_SOURCE([ #include #ifndef TIOCSPPS # error #endif - ], + ])], [ntp_ok=yes], [ntp_ok=no] ) @@ -1639,12 +1641,12 @@ AC_MSG_CHECKING([for TTY PPS ioctl CIOGETEV]) case "$ac_cv_header_sys_ppsclock_h" in yes) AC_PREPROC_IFELSE( - [ + [AC_LANG_SOURCE([ #include #ifndef CIOGETEV # error #endif - ], + ])], [ntp_ok=yes], [ntp_ok=no] ) @@ -1690,7 +1692,7 @@ case "$ac_cv_header_sys_ppsclock_h$ac_cv_header_linux_serial_h" in yesyes) AC_MSG_CHECKING([ioctl TIOCGSERIAL, TIOCSSERIAL, ASYNC_PPS_CD_POS, ASYNC_PPS_CD_NEG]) AC_PREPROC_IFELSE( - [ + [AC_LANG_SOURCE([ #include typedef int u_int; #include @@ -1711,7 +1713,7 @@ case "$ac_cv_header_sys_ppsclock_h$ac_cv_header_linux_serial_h" in #ifndef CIOGETEV # error #endif - ], + ])], [ntp_ok=yes], [ntp_ok=no] ) @@ -4265,14 +4267,14 @@ AC_CACHE_CHECK( [for interface list sysctl], [ntp_cv_iflist_sysctl], [AC_PREPROC_IFELSE( - [ + [AC_LANG_SOURCE([ #include #include #include #ifndef NET_RT_IFLIST # error #endif - ], + ])], [ntp_cv_iflist_sysctl=yes], [ntp_cv_iflist_sysctl=no] )] diff --git a/sntp/libopts/m4/libopts.m4 b/sntp/libopts/m4/libopts.m4 index 4a4ca181b..352098b80 100644 --- a/sntp/libopts/m4/libopts.m4 +++ b/sntp/libopts/m4/libopts.m4 @@ -216,7 +216,7 @@ AC_DEFUN([LIBOPTS_WITHLIB_REGEX],[ LIBREGEX_LIBS="" AC_MSG_CHECKING([whether libregex functions properly]) AC_CACHE_VAL([libopts_cv_with_libregex],[ - AC_RUN_IFELSE([@%:@include + AC_RUN_IFELSE([AC_LANG_SOURCE([@%:@include @%:@include @%:@include @%:@include REGEX_HEADER @@ -235,7 +235,7 @@ int main() { fputs( "error: regex -->.<-- did not match\n", stderr ); return 1; } - return 0; }], + return 0; }])], [libopts_cv_with_libregex=yes], [libopts_cv_with_libregex=no], [libopts_cv_with_libregex=no]) # end of AC_RUN_IFELSE ]) # end of AC_CACHE_VAL for libopts_cv_with_libregex @@ -260,12 +260,12 @@ libopts_cv_with_libregex=no AC_DEFUN([LIBOPTS_RUN_PATHFIND],[ AC_MSG_CHECKING([whether pathfind(3) works]) AC_CACHE_VAL([libopts_cv_run_pathfind],[ - AC_RUN_IFELSE([@%:@include + AC_RUN_IFELSE([AC_LANG_SOURCE([@%:@include @%:@include int main (int argc, char** argv) { char* pz = pathfind( getenv( "PATH" ), "sh", "x" ); return (pz == 0) ? 1 : 0; -}], +}])], [libopts_cv_run_pathfind=yes],[libopts_cv_run_pathfind=no],[libopts_cv_run_pathfind=no] ) # end of RUN_IFELSE ]) # end of AC_CACHE_VAL for libopts_cv_run_pathfind @@ -303,7 +303,7 @@ echo ${dzero}` AC_DEFUN([LIBOPTS_RUN_REALPATH],[ AC_MSG_CHECKING([whether we have a functional realpath(3C)]) AC_CACHE_VAL([libopts_cv_run_realpath],[ - AC_RUN_IFELSE([@%:@include + AC_RUN_IFELSE([AC_LANG_SOURCE([@%:@include @%:@include int main (int argc, char** argv) { @%:@ifndef PATH_MAX @@ -313,7 +313,7 @@ choke me!! @%:@endif char *pz = realpath(argv@<:@0@:>@, zPath); return (pz == zPath) ? 0 : 1; -}], +}])], [libopts_cv_run_realpath=yes],[libopts_cv_run_realpath=no],[libopts_cv_run_realpath=no] ) # end of RUN_IFELSE ]) # end of AC_CACHE_VAL for libopts_cv_run_realpath @@ -330,7 +330,7 @@ choke me!! AC_DEFUN([LIBOPTS_RUN_STRFTIME],[ AC_MSG_CHECKING([whether strftime() works]) AC_CACHE_VAL([libopts_cv_run_strftime],[ - AC_RUN_IFELSE([@%:@include + AC_RUN_IFELSE([AC_LANG_SOURCE([@%:@include @%:@include char t_buf@<:@ 64 @:>@; int main() { @@ -346,7 +346,7 @@ int main() { tm.tm_yday = 239; /* days since January 1 @<:@0, 365@:>@ */ tm.tm_isdst = 1; /* flag for daylight savings time */ strftime( t_buf, sizeof( t_buf ), "%A %b %d %j", &tm ); - return (strcmp( t_buf, z ) != 0); }], + return (strcmp( t_buf, z ) != 0); }])], [libopts_cv_run_strftime=yes],[libopts_cv_run_strftime=no],[libopts_cv_run_strftime=no] ) # end of RUN_IFELSE ]) # end of AC_CACHE_VAL for libopts_cv_run_strftime @@ -363,10 +363,10 @@ int main() { AC_DEFUN([LIBOPTS_RUN_FOPEN_BINARY],[ AC_MSG_CHECKING([whether fopen accepts "b" mode]) AC_CACHE_VAL([libopts_cv_run_fopen_binary],[ - AC_RUN_IFELSE([@%:@include + AC_RUN_IFELSE([AC_LANG_SOURCE([@%:@include int main (int argc, char** argv) { FILE* fp = fopen("conftest.@S|@ac_ext", "rb"); -return (fp == NULL) ? 1 : fclose(fp); }], +return (fp == NULL) ? 1 : fclose(fp); }])], [libopts_cv_run_fopen_binary=yes],[libopts_cv_run_fopen_binary=no],[libopts_cv_run_fopen_binary=no] ) # end of RUN_IFELSE ]) # end of AC_CACHE_VAL for libopts_cv_run_fopen_binary @@ -386,10 +386,10 @@ return (fp == NULL) ? 1 : fclose(fp); }], AC_DEFUN([LIBOPTS_RUN_FOPEN_TEXT],[ AC_MSG_CHECKING([whether fopen accepts "t" mode]) AC_CACHE_VAL([libopts_cv_run_fopen_text],[ - AC_RUN_IFELSE([@%:@include + AC_RUN_IFELSE([AC_LANG_SOURCE([@%:@include int main (int argc, char** argv) { FILE* fp = fopen("conftest.@S|@ac_ext", "rt"); -return (fp == NULL) ? 1 : fclose(fp); }], +return (fp == NULL) ? 1 : fclose(fp); }])], [libopts_cv_run_fopen_text=yes],[libopts_cv_run_fopen_text=no],[libopts_cv_run_fopen_text=no] ) # end of RUN_IFELSE ]) # end of AC_CACHE_VAL for libopts_cv_run_fopen_text diff --git a/sntp/m4/ntp_libntp.m4 b/sntp/m4/ntp_libntp.m4 index 8842c4a81..3aa3dff56 100644 --- a/sntp/m4/ntp_libntp.m4 +++ b/sntp/m4/ntp_libntp.m4 @@ -878,13 +878,13 @@ AC_CACHE_CHECK( [for SIGIO], [ntp_cv_hdr_def_sigio], [AC_PREPROC_IFELSE( - [ + [AC_LANG_SOURCE([ #include #ifndef SIGIO # error #endif - ], + ])], [ntp_cv_hdr_def_sigio=yes], [ntp_cv_hdr_def_sigio=no] )] @@ -947,13 +947,13 @@ AC_CACHE_CHECK( [for SIGPOLL], [ntp_cv_hdr_def_sigpoll], [AC_PREPROC_IFELSE( - [ + [AC_LANG_SOURCE([ #include #ifndef SIGPOLL # error #endif - ], + ])], [ntp_cv_hdr_def_sigpoll=yes], [ntp_cv_hdr_def_sigpoll=no] )] -- 2.47.3