summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xc++/configure104
-rw-r--r--c++/configure.in41
-rwxr-xr-xconfigure11
-rw-r--r--configure.in13
-rwxr-xr-xfortran/configure144
-rw-r--r--fortran/configure.in69
6 files changed, 196 insertions, 186 deletions
diff --git a/c++/configure b/c++/configure
index 98c0147..f8e3e64 100755
--- a/c++/configure
+++ b/c++/configure
@@ -7747,6 +7747,17 @@ case "X-$enable_production" in
X-yes)
echo "$as_me:$LINENO: result: \"production\"" >&5
echo "${ECHO_T}\"production\"" >&6
+
+ CXXFLAGS_temp=""
+ if test -n "$CXXFLAGS"; then
+ for d in $CXXFLAGS ; do
+ if test "X$d" != "X-g"; then
+ CXXFLAGS_temp="$CXXFLAGS_temp $d"
+ fi
+ done
+ CXXFLAGS=$CXXFLAGS_temp
+ fi
+
CONFIG_MODE=production
CXXFLAGS="$CXXFLAGS $PROD_CXXFLAGS"
CPPFLAGS="$CPPFLAGS $PROD_CPPFLAGS"
@@ -7797,108 +7808,37 @@ if test "${enable_linux_lfs+set}" = set; then
fi;
+ LINUX_LFS="no"
case "X-$enable_linux_lfs" in
X-yes)
LINUX_LFS=yes
;;
X-no)
- LINUX_LFS=no
;;
X-|*)
- LINUX_LFS=no
-
-for ac_func in getdents64
-do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
-if eval "test \"\${$as_ac_var+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-#include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func (); below. */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func ();
-char (*f) ();
-
-#ifdef F77_DUMMY_MAIN
-# ifdef __cplusplus
- extern "C"
-# endif
- int F77_DUMMY_MAIN() { return 1; }
-#endif
-int
-main ()
-{
-/* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-f = $ac_func;
-#endif
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- eval "$as_ac_var=yes"
-else
- echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
-eval "$as_ac_var=no"
-fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
-if test `eval echo '${'$as_ac_var'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
- LINUX_LFS=yes
-fi
-done
+ MAJOR_VER="`uname -r | cut -d '.' -f1`"
+ MINOR_VER="`uname -r | cut -d '.' -f2`"
+ if test ${MAJOR_VER} -gt 2 -o ${MAJOR_VER} -eq 2 -a ${MINOR_VER} -ge 4; then
+ LINUX_LFS="yes"
+ fi
;;
esac
- echo "$as_me:$LINENO: checking for large file support on linux mode" >&5
-echo $ECHO_N "checking for large file support on linux mode... $ECHO_C" >&6
+ echo "$as_me:$LINENO: checking for large file support mode on Linux" >&5
+echo $ECHO_N "checking for large file support mode on Linux... $ECHO_C" >&6
if test "X$LINUX_LFS" = "Xyes"; then
echo "$as_me:$LINENO: result: enabled" >&5
echo "${ECHO_T}enabled" >&6
- CXXFLAGS="-D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE ${CXXFLAGS}"
+ CPPFLAGS="-D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE $CPPFLAGS"
else
echo "$as_me:$LINENO: result: disabled" >&5
echo "${ECHO_T}disabled" >&6
fi
- CXXFLAGS="-D_POSIX_SOURCE ${CXXFLAGS}"
+ CPPFLAGS="-D_POSIX_SOURCE $CPPFLAGS"
- CXXFLAGS="-D_BSD_SOURCE ${CXXFLAGS}"
+ CPPFLAGS="-D_BSD_SOURCE $CPPFLAGS"
;;
esac
diff --git a/c++/configure.in b/c++/configure.in
index 1b3d73f..0c83165 100644
--- a/c++/configure.in
+++ b/c++/configure.in
@@ -242,6 +242,19 @@ AC_ARG_ENABLE(production,
case "X-$enable_production" in
X-yes)
AC_MSG_RESULT("production")
+
+ dnl Remove the "-g" flag from CXXFLAGS if it's in there.
+ dnl
+ CXXFLAGS_temp=""
+ if test -n "$CXXFLAGS"; then
+ for d in $CXXFLAGS ; do
+ if test "X$d" != "X-g"; then
+ CXXFLAGS_temp="$CXXFLAGS_temp $d"
+ fi
+ done
+ CXXFLAGS=$CXXFLAGS_temp
+ fi
+
CONFIG_MODE=production
CXXFLAGS="$CXXFLAGS $PROD_CXXFLAGS"
CPPFLAGS="$CPPFLAGS $PROD_CPPFLAGS"
@@ -281,37 +294,41 @@ else
fi
AC_SUBST(LT_STATIC_EXEC)
+dnl ----------------------------------------------------------------------
+dnl Test for 64bit stuff before the data types and their sizes. The
+dnl result could effect the outcome of the sizeof macros below.
+dnl
case "$host_cpu-$host_vendor-$host_os" in
*linux*)
dnl ----------------------------------------------------------------------
dnl Enable large file support on linux? Store the result in the LINUX_LFS
dnl variable for posterity
- AC_ARG_ENABLE(linux-lfs,
+ AC_ARG_ENABLE([linux-lfs],
[AC_HELP_STRING([--enable-linux-lfs],
[Enable support for large (64-bit)
files on Linux. [default=check]])])
+ LINUX_LFS="no"
case "X-$enable_linux_lfs" in
X-yes)
LINUX_LFS=yes
;;
X-no)
- LINUX_LFS=no
;;
X-|*)
- LINUX_LFS=no
- AC_CHECK_FUNCS([getdents64],
- dnl Add the large file support flags to the CXXFLAGS macro if
- dnl we're on a Linux system which austensibly supports LFS. (We
- dnl think it does if it has the `getdents64' syscall).
- [LINUX_LFS=yes])
+ MAJOR_VER="`uname -r | cut -d '.' -f1`"
+ MINOR_VER="`uname -r | cut -d '.' -f2`"
+
+ if test ${MAJOR_VER} -gt 2 -o ${MAJOR_VER} -eq 2 -a ${MINOR_VER} -ge 4; then
+ LINUX_LFS="yes"
+ fi
;;
esac
- AC_MSG_CHECKING([for large file support on linux mode])
+ AC_MSG_CHECKING([for large file support mode on Linux])
if test "X$LINUX_LFS" = "Xyes"; then
AC_MSG_RESULT([enabled])
- CXXFLAGS="-D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE ${CXXFLAGS}"
+ CPPFLAGS="-D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE $CPPFLAGS"
else
AC_MSG_RESULT([disabled])
fi
@@ -319,13 +336,13 @@ case "$host_cpu-$host_vendor-$host_os" in
dnl Add POSIX support on Linux systems, so <features.h> defines
dnl __USE_POSIX, which is required to get the prototype for fdopen
dnl defined correctly in <stdio.h>
- CXXFLAGS="-D_POSIX_SOURCE ${CXXFLAGS}"
+ CPPFLAGS="-D_POSIX_SOURCE $CPPFLAGS"
dnl Also add BSD support on Linux systems, so <features.h> defines
dnl __USE_BSD, which is required to get the prototype for strdup
dnl defined correctly in <string.h> and snprintf & vsnprintf defined
dnl correctly in <stdio.h>
- CXXFLAGS="-D_BSD_SOURCE ${CXXFLAGS}"
+ CPPFLAGS="-D_BSD_SOURCE $CPPFLAGS"
;;
esac
diff --git a/configure b/configure
index c0de588..3eedd61 100755
--- a/configure
+++ b/configure
@@ -7442,6 +7442,17 @@ case "X-$enable_production" in
enable_production="yes"
echo "$as_me:$LINENO: result: production" >&5
echo "${ECHO_T}production" >&6
+
+ CFLAGS_temp=""
+ if test -n "$CFLAGS"; then
+ for d in $CFLAGS ; do
+ if test "X$d" != "X-g"; then
+ CFLAGS_temp="$CFLAGS_temp $d"
+ fi
+ done
+ CFLAGS=$CFLAGS_temp
+ fi
+
CONFIG_MODE=production
CFLAGS="$CFLAGS $PROD_CFLAGS"
CPPFLAGS="$CPPFLAGS $PROD_CPPFLAGS"
diff --git a/configure.in b/configure.in
index 69b2cd6..f6d983b 100644
--- a/configure.in
+++ b/configure.in
@@ -442,6 +442,19 @@ case "X-$enable_production" in
X-yes)
enable_production="yes"
AC_MSG_RESULT([production])
+
+ dnl Remove the "-g" flag from CFLAGS if it's in there.
+ dnl
+ CFLAGS_temp=""
+ if test -n "$CFLAGS"; then
+ for d in $CFLAGS ; do
+ if test "X$d" != "X-g"; then
+ CFLAGS_temp="$CFLAGS_temp $d"
+ fi
+ done
+ CFLAGS=$CFLAGS_temp
+ fi
+
CONFIG_MODE=production
CFLAGS="$CFLAGS $PROD_CFLAGS"
CPPFLAGS="$CPPFLAGS $PROD_CPPFLAGS"
diff --git a/fortran/configure b/fortran/configure
index 710ee70..b1306f9 100755
--- a/fortran/configure
+++ b/fortran/configure
@@ -994,6 +994,7 @@ Optional Features:
--enable-static=PKGS build static libraries default=yes
--enable-fast-install=PKGS optimize for fast installation default=yes
--disable-libtool-lock avoid locking (might break parallel builds)
+ --enable-production Determines how to run the compiler.
--enable-static-exec Build only statically linked executables default=no
--enable-linux-lfs Enable support for large (64-bit) files on Linux.
[default=check]
@@ -3881,7 +3882,7 @@ test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
case $host in
*-*-irix6*)
# Find out which ABI we are using.
- echo '#line 3884 "configure"' > conftest.$ac_ext
+ echo '#line 3885 "configure"' > conftest.$ac_ext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
@@ -4422,7 +4423,7 @@ chmod -w .
save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"
compiler_c_o=no
-if { (eval echo configure:4425: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then
+if { (eval echo configure:4426: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings
if test -s out/conftest.err; then
@@ -6233,7 +6234,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
-#line 6236 "configure"
+#line 6237 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -6331,7 +6332,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
-#line 6334 "configure"
+#line 6335 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -7217,6 +7218,54 @@ echo "$as_me: error: ${MAKE-make} requires the build and source directories to b
rm maketest
fi
+echo "$as_me:$LINENO: checking for production mode" >&5
+echo $ECHO_N "checking for production mode... $ECHO_C" >&6
+# Check whether --enable-production or --disable-production was given.
+if test "${enable_production+set}" = set; then
+ enableval="$enable_production"
+
+fi;
+
+case "X-$enable_production" in
+ X-yes)
+ echo "$as_me:$LINENO: result: \"production\"" >&5
+echo "${ECHO_T}\"production\"" >&6
+
+ CFLAGS_temp=""
+ if test -n "$CFLAGS"; then
+ for d in $CFLAGS ; do
+ if test "X$d" != "X-g"; then
+ CFLAGS_temp="$CFLAGS_temp $d"
+ fi
+ done
+ CFLAGS=$CFLAGS_temp
+ fi
+
+ CONFIG_MODE=production
+ CFLAGS="$CFLAGS $PROD_CFLAGS"
+ CPPFLAGS="$CPPFLAGS $PROD_CPPFLAGS"
+ ;;
+ X-|X-no)
+ echo "$as_me:$LINENO: result: \"development\"" >&5
+echo "${ECHO_T}\"development\"" >&6
+ CONFIG_MODE=development
+ CFLAGS="$CFLAGS $DEBUG_CFLAGS"
+ CPPFLAGS="$CPPFLAGS $DEBUG_CPPFLAGS"
+ ;;
+ X-pg|X-profile)
+ echo "$as_me:$LINENO: result: \"profile\"" >&5
+echo "${ECHO_T}\"profile\"" >&6
+ CONFIG_MODE=profile
+ CFLAGS="$CXXFLAGS $PROFILE_CFLAGS"
+ CPPFLAGS="$CPPFLAGS $PROFILE_CPPFLAGS"
+ ;;
+ *)
+ echo "$as_me:$LINENO: result: \"user-defined\"" >&5
+echo "${ECHO_T}\"user-defined\"" >&6
+ CONFIG_MODE="$X-enableval"
+ ;;
+esac
+
echo "$as_me:$LINENO: checking if should build only statically linked executables" >&5
echo $ECHO_N "checking if should build only statically linked executables... $ECHO_C" >&6
# Check whether --enable-static_exec or --disable-static_exec was given.
@@ -7242,96 +7291,25 @@ if test "${enable_linux_lfs+set}" = set; then
fi;
+ LINUX_LFS="no"
case "X-$enable_linux_lfs" in
X-yes)
LINUX_LFS=yes
;;
X-no)
- LINUX_LFS=no
;;
X-|*)
- LINUX_LFS=no
-
-for ac_func in getdents64
-do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
-if eval "test \"\${$as_ac_var+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-#include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func (); below. */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func ();
-char (*f) ();
-
-#ifdef F77_DUMMY_MAIN
-# ifdef __cplusplus
- extern "C"
-# endif
- int F77_DUMMY_MAIN() { return 1; }
-#endif
-int
-main ()
-{
-/* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-f = $ac_func;
-#endif
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- eval "$as_ac_var=yes"
-else
- echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
-eval "$as_ac_var=no"
-fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
-if test `eval echo '${'$as_ac_var'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
- LINUX_LFS=yes
-fi
-done
+ MAJOR_VER="`uname -r | cut -d '.' -f1`"
+ MINOR_VER="`uname -r | cut -d '.' -f2`"
+ if test ${MAJOR_VER} -gt 2 -o ${MAJOR_VER} -eq 2 -a ${MINOR_VER} -ge 4; then
+ LINUX_LFS="yes"
+ fi
;;
esac
- echo "$as_me:$LINENO: checking for large file support on linux mode" >&5
-echo $ECHO_N "checking for large file support on linux mode... $ECHO_C" >&6
+ echo "$as_me:$LINENO: checking for large file support mode on Linux" >&5
+echo $ECHO_N "checking for large file support mode on Linux... $ECHO_C" >&6
if test "X$LINUX_LFS" = "Xyes"; then
echo "$as_me:$LINENO: result: enabled" >&5
echo "${ECHO_T}enabled" >&6
diff --git a/fortran/configure.in b/fortran/configure.in
index 5f96b6b..0631e0e 100644
--- a/fortran/configure.in
+++ b/fortran/configure.in
@@ -264,6 +264,53 @@ EOF
fi
dnl ----------------------------------------------------------------------
+dnl Production flags? Save the value in $CONFIG_MODE so we have it for
+dnl the record.
+dnl
+AC_MSG_CHECKING([for production mode])
+AC_ARG_ENABLE([production],
+ [AC_HELP_STRING([--enable-production],
+ [Determines how to run the compiler.])])
+
+case "X-$enable_production" in
+ X-yes)
+ AC_MSG_RESULT("production")
+
+ dnl Remove the "-g" flag from CFLAGS if it's in there.
+ dnl
+ CFLAGS_temp=""
+ if test -n "$CFLAGS"; then
+ for d in $CFLAGS ; do
+ if test "X$d" != "X-g"; then
+ CFLAGS_temp="$CFLAGS_temp $d"
+ fi
+ done
+ CFLAGS=$CFLAGS_temp
+ fi
+
+ CONFIG_MODE=production
+ CFLAGS="$CFLAGS $PROD_CFLAGS"
+ CPPFLAGS="$CPPFLAGS $PROD_CPPFLAGS"
+ ;;
+ X-|X-no)
+ AC_MSG_RESULT("development")
+ CONFIG_MODE=development
+ CFLAGS="$CFLAGS $DEBUG_CFLAGS"
+ CPPFLAGS="$CPPFLAGS $DEBUG_CPPFLAGS"
+ ;;
+ X-pg|X-profile)
+ AC_MSG_RESULT("profile")
+ CONFIG_MODE=profile
+ CFLAGS="$CXXFLAGS $PROFILE_CFLAGS"
+ CPPFLAGS="$CPPFLAGS $PROFILE_CPPFLAGS"
+ ;;
+ *)
+ AC_MSG_RESULT("user-defined")
+ CONFIG_MODE="$X-enableval"
+ ;;
+esac
+
+dnl ----------------------------------------------------------------------
dnl If we should build only static executables
dnl
AC_MSG_CHECKING(if should build only statically linked executables)
@@ -280,34 +327,38 @@ else
fi
AC_SUBST(LT_STATIC_EXEC)
+dnl ----------------------------------------------------------------------
+dnl Test for 64bit stuff before the data types and their sizes. The
+dnl result could effect the outcome of the sizeof macros below.
+dnl
case "$host_cpu-$host_vendor-$host_os" in
*linux*)
dnl ----------------------------------------------------------------------
dnl Enable large file support on linux? Store the result in the LINUX_LFS
dnl variable for posterity
- AC_ARG_ENABLE(linux-lfs,
+ AC_ARG_ENABLE([linux-lfs],
[AC_HELP_STRING([--enable-linux-lfs],
[Enable support for large (64-bit)
files on Linux. [default=check]])])
+ LINUX_LFS="no"
case "X-$enable_linux_lfs" in
X-yes)
LINUX_LFS=yes
;;
X-no)
- LINUX_LFS=no
;;
X-|*)
- LINUX_LFS=no
- AC_CHECK_FUNCS([getdents64],
- dnl Add the large file support flags to the CPPFLAGS macro if
- dnl we're on a Linux system which austensibly supports LFS. (We
- dnl think it does if it has the `getdents64' syscall).
- [LINUX_LFS=yes])
+ MAJOR_VER="`uname -r | cut -d '.' -f1`"
+ MINOR_VER="`uname -r | cut -d '.' -f2`"
+
+ if test ${MAJOR_VER} -gt 2 -o ${MAJOR_VER} -eq 2 -a ${MINOR_VER} -ge 4; then
+ LINUX_LFS="yes"
+ fi
;;
esac
- AC_MSG_CHECKING([for large file support on linux mode])
+ AC_MSG_CHECKING([for large file support mode on Linux])
if test "X$LINUX_LFS" = "Xyes"; then
AC_MSG_RESULT([enabled])
CPPFLAGS="-D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE $CPPFLAGS"