diff --git a/ChangeLog b/ChangeLog index ba0982684..6f93ba93b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,7 +1,7 @@ 2023-02-25 Ron Norman - * configure.ac: Add check for sys/time.h + * configure.ac: Add check for sys/time.h 2023-02-09 Simon Sobisch @@ -12,6 +12,10 @@ * configure.ac, NEWS, gnucobol.spec: updated for 3.2rc-1 +2023-01-16 Simon Sobisch + + * configure.ac: adjusted hack for AIX 64bit OBJECT_MODE + 2023-01-14 Simon Sobisch * configure.ac: fix to use pdcurses when libcurses was verified diff --git a/build_aux/pre-inst-env.in b/build_aux/pre-inst-env.in index a99fc9dd4..b54f4dc5e 100644 --- a/build_aux/pre-inst-env.in +++ b/build_aux/pre-inst-env.in @@ -67,7 +67,7 @@ export COB_LIBRARY_PATH # ensure we don't execute windows paths within programs generated by cygwin # by passing a hint -if test "$OSTYPE" == "cygwin"; then +if test "$OSTYPE" = "cygwin"; then COB_ON_CYGWIN=1 export COB_ON_CYGWIN fi diff --git a/build_windows/config.h.in b/build_windows/config.h.in index 653e52705..2ecd8b1a9 100644 --- a/build_windows/config.h.in +++ b/build_windows/config.h.in @@ -589,6 +589,15 @@ /* #undef HAVE_ISFINITE */ #endif +/* Define to 1 if you have the header file. */ +#if CONFIGURED_JSON == JSON_C +#define HAVE_JSON_C_JSON_H 1 +#else + /*#undef HAVE_JSON_C_JSON_H */ +#endif +/* Define to 1 if you have the header file. */ + /*#undef HAVE_JSON_H */ + /* Define to 1 if you have the header file. */ #if CONFIGURED_ISAM == DISAM #define HAVE_ISINTSTD_H 1 @@ -789,13 +798,6 @@ /* Define to 1 if you have the header file. */ #define HAVE_SYS_TYPES_H 1 -/* Define to 1 if you have the header file. */ -#if defined(__ORANGEC__) -#define HAVE_SYS_WAIT_H 1 -#else -/* #undef HAVE_SYS_WAIT_H */ -#endif - /* Has timezone variable */ /* note: MSC and ORANGEC have it as _timezone */ #define HAVE_TIMEZONE 1 diff --git a/configure.ac b/configure.ac index 3d58732e5..41f4ec440 100644 --- a/configure.ac +++ b/configure.ac @@ -54,25 +54,71 @@ AC_CONFIG_FILES([tests/atlocal], [chmod +x tests/atlocal]) AC_CONFIG_FILES([tests/run_prog_manual.sh], [chmod +x tests/run_prog_manual.sh]) +# In general: don't export/setenv but pass as option to configure +# this has the benefit that re-runs will take the same and "sudo" +# or later "make" (possibly as different user) will use the same +# set of tools # Note for SUN Solaris (gcc) -# option to configure/export/setenv: CC=gcc -m64 --libdir=/usr/local/lib/sparcv9 +# options to configure: CC="gcc -m64" --libdir=/usr/local/lib/sparcv9 # or: -# option to configure/export/setenv: CFLAGS=-m64 and LDFLAGS="-m64 -L/usr/local/lib/sparcv9" +# options to configure: CFLAGS=-m64 and LDFLAGS="-m64 -L/usr/local/lib/sparcv9" # # Hack for AIX 64 bit (gcc) # Required - -# option to configure/export/setenv: CC=gcc -maix64 +# options to configure: CC="gcc -maix64" / CC="xlc -q64" # or: -# option to configure/export/setenv: CFLAGS=-maix64 and LDFLAGS=-maix64 +# options to configure: CFLAGS=-maix64 and LDFLAGS=-maix64 # Note: AIX commonly uses -Lpath like GNU/Linux would use -Lpath -Rpath -if echo "$CC$CFLAGS" | grep 'aix64' 1>/dev/null 2>&1; then - if test -f /usr/ccs/bin/ar; then - AR="/usr/ccs/bin/ar -X64" - else - AR="ar -X64" - fi - NM="/usr/ccs/bin/nm -X64 -B" +if test "x$OBJECT_MODE" = x; then + echo "$CC $CFLAGS" | grep ' -maix32' 1>/dev/null 2>&1 + check1=$? + echo "$CC $CFLAGS" | grep ' -q32' 1>/dev/null 2>&1 + check2=$? + if test $check1 -eq 0 -o $check2 -eq 0; then + OBJECT_MODE=32 # for libtool + fi + echo "$CC $CFLAGS" | grep ' -maix64' 1>/dev/null 2>&1 + check1=$? + echo "$CC $CFLAGS" | grep ' -q64' 1>/dev/null 2>&1 + check2=$? + if test $check1 -eq 0 -o $check2 -eq 0; then + OBJECT_MODE=64 # for libtool + fi + unset check1 + unset check2 +fi + +if test "$OBJECT_MODE" = "64"; then + if test "x$AR" = x; then + if test -f /usr/ccs/bin/ar; then + AR="/usr/ccs/bin/ar -X64" + else + AR="ar -X64" + fi + fi + if test "x$NM" = x; then + if test -f /usr/ccs/bin/nm; then + NM="/usr/ccs/bin/nm -X64 -B" + else + NM="nm -X64 -B" + fi + fi +elif test "$OBJECT_MODE" = "32"; then + if test "x$AR" = x; then + if test -f /usr/ccs/bin/ar; then + AR="/usr/ccs/bin/ar -X32" + else + AR="ar -X32" + fi + fi + if test "x$NM" = x; then + if test -f /usr/ccs/bin/nm; then + NM="/usr/ccs/bin/nm -X32 -B" + else + NM="nm -X32 -B" + fi + fi fi dnl We don't want to have the full list of automatic defines from automake, diff --git a/tests/atlocal.in b/tests/atlocal.in index 3e65d8a8a..585cbaea8 100644 --- a/tests/atlocal.in +++ b/tests/atlocal.in @@ -140,7 +140,7 @@ _return_path () { # ensure we don't execute windows paths within programs generated by cygwin # by passing a hint -if test "$OSTYPE" == "cygwin"; then +if test "$OSTYPE" = "cygwin"; then COB_ON_CYGWIN=1 export COB_ON_CYGWIN fi