diff --git a/opensshlib/configure.ac b/opensshlib/configure.ac index 3961df4..6b3be12 100644 --- a/opensshlib/configure.ac +++ b/opensshlib/configure.ac @@ -1111,7 +1111,10 @@ mips-sony-bsd|mips-sony-newsos4) esac AC_MSG_CHECKING([compiler and flags for sanity]) -AC_RUN_IFELSE([AC_LANG_PROGRAM([[ #include ]], [[ exit(0); ]])], +AC_RUN_IFELSE([AC_LANG_PROGRAM([[ +#include +#include +]], [[ exit(0); ]])], [ AC_MSG_RESULT([yes]) ], [ AC_MSG_RESULT([no]) @@ -1349,6 +1352,7 @@ AC_MSG_CHECKING([whether struct dirent allocates space for d_name]) AC_RUN_IFELSE( [AC_LANG_PROGRAM([[ #include +#include #include ]], [[ struct dirent d; @@ -1849,6 +1853,9 @@ AC_CHECK_FUNCS([setresuid], [ AC_MSG_CHECKING([if setresuid seems to work]) AC_RUN_IFELSE( [AC_LANG_PROGRAM([[ +#ifdef HAVE_UNISTD_H +#include +#endif #include #include ]], [[ @@ -1874,6 +1881,9 @@ AC_CHECK_FUNCS([setresgid], [ [AC_LANG_PROGRAM([[ #include #include +#ifdef HAVE_UNISTD_H +#include +#endif ]], [[ errno=0; setresgid(0,0,0); @@ -1944,7 +1954,10 @@ AC_CHECK_FUNC([getpagesize], if test "x$ac_cv_func_snprintf" = "xyes" ; then AC_MSG_CHECKING([whether snprintf correctly terminates long strings]) AC_RUN_IFELSE( - [AC_LANG_PROGRAM([[ #include ]], + [AC_LANG_PROGRAM([[ +#include +#include +]], [[ char b[5]; snprintf(b,5,"123456789"); @@ -2035,6 +2048,9 @@ if test "x$ac_cv_func_mkdtemp" = "xyes" ; then AC_MSG_CHECKING([for (overly) strict mkstemp]) AC_RUN_IFELSE( [AC_LANG_PROGRAM([[ +#ifdef HAVE_UNISTD_H +#include +#endif #include ]], [[ char template[]="conftest.mkstemp-test"; @@ -2063,6 +2079,13 @@ if test ! -z "$check_for_openpty_ctty_bug"; then AC_RUN_IFELSE( [AC_LANG_PROGRAM([[ #include +#include +#ifdef HAVE_UNISTD_H +#include +#endif +#ifdef HAVE_PTY_H +#include +#endif #include #include #include @@ -2346,6 +2369,7 @@ if test "x$openssl" = "xyes" ; then AC_RUN_IFELSE( [AC_LANG_PROGRAM([[ #include + #include #include #include #define DATA "conftest.sslincver" @@ -2380,6 +2404,7 @@ if test "x$openssl" = "xyes" ; then AC_RUN_IFELSE( [AC_LANG_PROGRAM([[ #include + #include #include #define OPENSSL_API_COMPAT 0x10000000L #include @@ -3186,6 +3211,7 @@ if test -z "$have_llong_max"; then AC_RUN_IFELSE( [AC_LANG_PROGRAM([[ #include +#include /* Why is this so damn hard? */ #ifdef __GNUC__ # undef __GNUC__ @@ -3644,6 +3670,7 @@ dnl test snprintf (broken on SCO w/gcc) AC_RUN_IFELSE( [AC_LANG_SOURCE([[ #include +#include #include #ifdef HAVE_SNPRINTF main() @@ -3701,6 +3728,7 @@ AC_CHECK_MEMBER([struct __res_state.retrans], [], [AC_DEFINE([__res_state], [sta [Define if we don't have struct __res_state in resolv.h])], [[ #include +#include #if HAVE_SYS_TYPES_H # include #endif @@ -3744,6 +3772,7 @@ AC_CACHE_CHECK([for msg_accrights field in struct msghdr], #include #include #include +#include ]], [[ #ifdef msg_accrights #error "msg_accrights is a macro" @@ -3804,6 +3833,7 @@ AC_CACHE_CHECK([for msg_control field in struct msghdr], AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #include #include +#include #include ]], [[ #ifdef msg_control @@ -3825,7 +3855,7 @@ if test "x$ac_cv_have_control_in_msghdr" = "xyes" ; then fi AC_CACHE_CHECK([if libc defines __progname], ac_cv_libc_defines___progname, [ - AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], + AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include ]], [[ extern char *__progname; printf("%s", __progname); ]])], [ ac_cv_libc_defines___progname="yes" ], [ ac_cv_libc_defines___progname="no" @@ -3897,7 +3927,7 @@ if test "x$ac_cv_have_getopt_optreset" = "xyes" ; then fi AC_CACHE_CHECK([if libc defines sys_errlist], ac_cv_libc_defines_sys_errlist, [ - AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], + AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include ]], [[ extern const char *const sys_errlist[]; printf("%s", sys_errlist[0]);]])], [ ac_cv_libc_defines_sys_errlist="yes" ], [ ac_cv_libc_defines_sys_errlist="no" @@ -3910,7 +3940,7 @@ fi AC_CACHE_CHECK([if libc defines sys_nerr], ac_cv_libc_defines_sys_nerr, [ - AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], + AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include ]], [[ extern int sys_nerr; printf("%i", sys_nerr);]])], [ ac_cv_libc_defines_sys_nerr="yes" ], [ ac_cv_libc_defines_sys_nerr="no" @@ -4220,6 +4250,7 @@ AC_ARG_WITH([maildir], AC_RUN_IFELSE( [AC_LANG_PROGRAM([[ #include +#include #include #ifdef HAVE_PATHS_H #include @@ -4366,6 +4397,7 @@ if test -z "$disable_shadow" ; then AC_MSG_CHECKING([if the systems has expire shadow information]) AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #include +#include #include struct spwd sp; ]], [[ sp.sp_expire = sp.sp_lstchg = sp.sp_inact = 0; ]])], @@ -4464,6 +4496,7 @@ otherwise scp will not work.]) [AC_LANG_PROGRAM([[ /* find out what STDPATH is */ #include +#include #ifdef HAVE_PATHS_H # include #endif