diff options
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 156 |
1 files changed, 147 insertions, 9 deletions
@@ -633,6 +633,8 @@ GAWKLIBEXT LIBMPFR LIBREADLINE SOCKET_LIBS +ENABLE_EXTENSIONS_FALSE +ENABLE_EXTENSIONS_TRUE LIBSIGSEGV_PREFIX LTLIBSIGSEGV LIBSIGSEGV @@ -5863,17 +5865,95 @@ pkgextensiondir='${pkglibdir}' { $as_echo "$as_me:${as_lineno-$LINENO}: checking for z/OS USS compilation" >&5 $as_echo_n "checking for z/OS USS compilation... " >&6; } +if ${ac_cv_zos_uss+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "OS/390" = "`uname`" then - CFLAGS="$CFLAGS -D_ALL_SOURCE -DZOS_USS -DUSE_EBCDIC" - # Must rebuild awkgram.c and command.c from Bison for EBCDIC - rm -f awkgram.c command.c ac_cv_zos_uss=yes else ac_cv_zos_uss=no fi + +fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_cv_zos_uss}" >&5 $as_echo "${ac_cv_zos_uss}" >&6; } +if test "x$ac_cv_zos_uss" = "xyes" +then + ac_zos_uss_cc_id=unknown + echo " $CC " | $EGREP ' (/bin/)?c89 |_' >/dev/null && ac_zos_uss_cc_id=c89 + echo " $CC " | $EGREP ' (/bin/)?c99 |_' >/dev/null && ac_zos_uss_cc_id=xlc + echo " $CC " | $EGREP ' (/bin/)?cc |_' >/dev/null && ac_zos_uss_cc_id=cc + echo " $CC " | $EGREP ' (/bin/)?xlc |_' >/dev/null && ac_zos_uss_cc_id=xlc + echo " $CC " | $EGREP ' (/bin/)?xlC |_' >/dev/null && ac_zos_uss_cc_id=xlc++ + echo " $CC " | $EGREP ' (/bin/)?xlc\+\+ |_' >/dev/null && ac_zos_uss_cc_id=xlc++ + test "x$GCC" = "xyes" && ac_zos_uss_cc_id=gcc + CPPFLAGS="$CPPFLAGS -D_ALL_SOURCE" + test "$ac_zos_uss_cc_id" != xlc++ && CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=600" + case "$ac_zos_uss_cc_id" in + c89) + if test -n "$_C89_OPTIONS" + then + { $as_echo "$as_me:${as_lineno-$LINENO}: CC = $CC" >&5 +$as_echo "$as_me: CC = $CC" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: _C89_OPTIONS = $_C89_OPTIONS" >&5 +$as_echo "$as_me: _C89_OPTIONS = $_C89_OPTIONS" >&6;} + else + as_fn_error $? "c89-setup-required +To build GNU Awk using \"c89\", please set + + _C89_OPTIONS=\"-W c,langlvl(stdc99,libext),haltonmsg(CCN3296)\" + +in your environment, and reconfigure. (The above flags cannot be specified +in CFLAGS/CPPFLAGS, due to the parentheses.)" "$LINENO" 5 + fi + ;; + gcc) + ;; + cc) + as_fn_error $? "cc-invalid +The z/OS \"cc\" compiler does not build GNU Awk correctly. + +If the \"xlc\" or \"c89\" compiler is available, please set CC accordingly +and reconfigure. (\"xlc\" is the recommended compiler on z/OS.)" "$LINENO" 5 + ;; + xlc*) + CFLAGS="$CFLAGS -qlanglvl=stdc99:libext" + cat >zos-cc <<EOF +#!/bin/sh +# +# This wrapper script addresses two annoying peculiarities of the IBM +# xlc/c99 compiler on z/OS: +# +# 1. Missing header files are considered warnings by default rather +# than fatal errors; +# +# 2. Include directories specified with -I are searched _after_ the +# system include directories (for #include<> directives) rather +# than before. +# +# This script allows the code and the build system to assume standard +# compiler behavior. +# + +PS4='zos-cc: ' +REAL_CC="$CC" + +set -x +\$REAL_CC -qhaltonmsg=CCN3296 -qnosearch "\$@" -qsearch=/usr/include +EOF + chmod +x zos-cc + { $as_echo "$as_me:${as_lineno-$LINENO}: wrapping $CC with zos-cc to obtain standard behavior" >&5 +$as_echo "$as_me: wrapping $CC with zos-cc to obtain standard behavior" >&6;} + CC="`pwd`/zos-cc" + ;; + *) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized compiler environment" >&5 +$as_echo "$as_me: WARNING: unrecognized compiler environment" >&2;} + ;; + esac +fi # ac_cv_zos_uss = yes { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing strerror" >&5 $as_echo_n "checking for library containing strerror... " >&6; } @@ -6177,6 +6257,28 @@ fi $as_echo "${gawk_cv_linux_alpha_hack}" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we are using EBCDIC" >&5 +$as_echo_n "checking if we are using EBCDIC... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#if 'a' == 0x81 +gnu_gawk_in_ebcdic +#endif +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "gnu_gawk_in_ebcdic" >/dev/null 2>&1; then : + +$as_echo "#define USE_EBCDIC 1" >>confdefs.h + + use_ebcdic=yes +else + use_ebcdic=no +fi +rm -f conftest* + +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $use_ebcdic" >&5 +$as_echo "$use_ebcdic" >&6; } + if test "$ISC" = 1 # will be set by test for ISC then CFLAGS="$CFLAGS -D_SYSV3" @@ -8401,7 +8503,7 @@ $as_echo "#define HAVE_LC_MESSAGES 1" >>confdefs.h for ac_header in arpa/inet.h fcntl.h limits.h locale.h libintl.h mcheck.h \ netdb.h netinet/in.h stdarg.h stddef.h string.h \ - sys/ioctl.h sys/param.h sys/socket.h sys/time.h unistd.h \ + sys/ioctl.h sys/param.h sys/select.h sys/socket.h sys/time.h unistd.h \ termios.h stropts.h wchar.h wctype.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` @@ -10307,7 +10409,7 @@ $as_echo "$LIBSIGSEGV" >&6; } esac # Need the check for mkstemp and tmpfile for missing_d/snprintf.c. -for ac_func in atexit btowc fmod getgrent getgroups grantpt \ +for ac_func in __etoa_l atexit btowc fmod getgrent getgroups grantpt \ isascii iswctype iswlower iswupper mbrlen \ memcmp memcpy memcpy_ulong memmove memset \ memset_ulong mkstemp posix_openpt setenv setlocale setsid sigprocmask \ @@ -10374,10 +10476,6 @@ if test "x$enable_extensions" != "xno"; then case $host_os in mirbsd* | openedition*) # OS/390 z/OS POSIX layer - cat << \EOF > extension/Makefile -all dist check clean distclean install uninstall distcheck: - @exit 0 -EOF ;; *) ac_fn_c_check_header_mongrel "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default" @@ -10472,6 +10570,14 @@ fi as_fn_error $? "extension support requested, but unavailable" "$LINENO" 5 fi enable_extensions=$extensions_supported + if test "x$enable_extensions" = "xyes"; then + ENABLE_EXTENSIONS_TRUE= + ENABLE_EXTENSIONS_FALSE='#' +else + ENABLE_EXTENSIONS_TRUE='#' + ENABLE_EXTENSIONS_FALSE= +fi + fi case $host_os in @@ -10992,6 +11098,34 @@ _ACEOF fi +ac_fn_c_check_member "$LINENO" "struct passwd" "pw_passwd" "ac_cv_member_struct_passwd_pw_passwd" " +#include <sys/types.h> +#include <pwd.h> + +" +if test "x$ac_cv_member_struct_passwd_pw_passwd" = xyes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_PASSWD_PW_PASSWD 1 +_ACEOF + + +fi + +ac_fn_c_check_member "$LINENO" "struct group" "gr_passwd" "ac_cv_member_struct_group_gr_passwd" " +#include <sys/types.h> +#include <grp.h> + +" +if test "x$ac_cv_member_struct_group_gr_passwd" = xyes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_GROUP_GR_PASSWD 1 +_ACEOF + + +fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5 $as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; } if ${ac_cv_struct_tm+:} false; then : @@ -11485,6 +11619,10 @@ if test -z "${TEST_CROSS_COMPILE_TRUE}" && test -z "${TEST_CROSS_COMPILE_FALSE}" as_fn_error $? "conditional \"TEST_CROSS_COMPILE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi +if test -z "${ENABLE_EXTENSIONS_TRUE}" && test -z "${ENABLE_EXTENSIONS_FALSE}"; then + as_fn_error $? "conditional \"ENABLE_EXTENSIONS\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi : "${CONFIG_STATUS=./config.status}" ac_write_fail=0 |