@@ -113,6 +113,9 @@ AC_ARG_WITH([bugurl],
113113# or:
114114# options to configure: CFLAGS=-m64 LDFLAGS="-m64 -L/usr/local/lib/sparcv9"
115115#
116+ # Note for IBM (Mainfraime) on USS
117+ # options to configure: CC="xlc -q64" CFLAGS="-qlanglvl=extc1x" OBJECT_MODE=64 AR=ar NM=nm
118+ #
116119# Hack for AIX 64 bit (gcc)
117120# Required -
118121# options to configure: CC="gcc -maix64" / CC="xlc -q64"
@@ -465,14 +468,27 @@ AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
465468 AC_MSG_RESULT ( [ yes] ) ] ,
466469 [ AC_MSG_RESULT ( [ no] ) ] )
467470
468- AC_MSG_CHECKING ( [ for __xlc__] )
471+ AS_IF ( [ test "x$COB_USES_GCC$COB_USES_ICC_ONLY$COB_USES_CLANG_ONLY" = xnonono] , [
472+
473+ AC_MSG_CHECKING ( [ for __IBMC__] )
469474AC_COMPILE_IFELSE ( [ AC_LANG_SOURCE ( [ [
470- #ifndef __xlc__
475+ #ifndef __IBMC__
471476 # error macro not defined
472477 #endif] ] ) ] ,
473478 [ COB_USES_XLC_ONLY=yes
474479 AC_MSG_RESULT ( [ yes] ) ] ,
475- [ AC_MSG_RESULT ( [ no] ) ] )
480+ [
481+ AC_MSG_CHECKING ( [ for __xlc__] )
482+ AC_COMPILE_IFELSE ( [ AC_LANG_SOURCE ( [ [
483+ #ifndef __xlc__
484+ # error macro not defined
485+ #endif] ] ) ] ,
486+ [ COB_USES_XLC_ONLY=yes
487+ AC_MSG_RESULT ( [ yes] ) ] ,
488+ [ AC_MSG_RESULT ( [ no] ) ] )
489+ ] )
490+
491+ AS_IF ( [ test "x$COB_USES_XLC_ONLY" = xno] , [
476492
477493AC_MSG_CHECKING ( [ for __WATCOMC__] )
478494AC_COMPILE_IFELSE ( [ AC_LANG_SOURCE ( [ [
@@ -481,7 +497,7 @@ AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
481497 #endif] ] ) ] ,
482498 [ COB_USES_WATCOMC_ONLY=yes
483499 AC_MSG_RESULT ( [ yes] ) ] ,
484- [ AC_MSG_RESULT ( [ no] ) ] )
500+ [ AC_MSG_RESULT ( [ no] )
485501
486502AC_MSG_CHECKING ( [ for __SUNPRO_C] )
487503AC_COMPILE_IFELSE ( [ AC_LANG_SOURCE ( [ [
@@ -491,6 +507,13 @@ AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
491507 [ COB_USES_SUNPRO_C_ONLY=yes
492508 AC_MSG_RESULT ( [ yes] ) ] ,
493509 [ AC_MSG_RESULT ( [ no] ) ] )
510+ ] )
511+
512+ ] )
513+
514+ ] )
515+
516+
494517
495518curr_cflags="$CFLAGS"
496519AC_CACHE_CHECK ( [ how to error on warnings during configure checks] , gc_cv_err_warn , [
@@ -674,9 +697,9 @@ AC_DEFINE_UNQUOTED([COB_KEYWORD_INLINE], [$gc_cv_keyword_inline])
674697
675698# Checks for library functions.
676699AC_FUNC_VPRINTF
677- AC_CHECK_FUNCS ( [ memmove memset setlocale fcntl strerror strcasecmp \
678- strchr strrchr strdup strstr strtol gettimeofday localeconv \
679- getexecname canonicalize_file_name popen raise readlink realpath \
700+ AC_CHECK_FUNCS ( [ memmove memset setlocale fcntl strerror strcasecmp
701+ strchr strrchr strdup strstr strtol gettimeofday localeconv
702+ getexecname canonicalize_file_name popen raise readlink realpath
680703 setenv strcoll flockfile] )
681704
682705# more things to save...
0 commit comments