diff options
Diffstat (limited to 'erts/configure.in')
-rw-r--r-- | erts/configure.in | 62 |
1 files changed, 49 insertions, 13 deletions
diff --git a/erts/configure.in b/erts/configure.in index 03390de84b..f4ee1fe935 100644 --- a/erts/configure.in +++ b/erts/configure.in @@ -329,7 +329,6 @@ if test X${enable_darwin_64bit} = Xyes; then esac fi if test X${enable_darwin_64bit} = Xyes -o X${enable_m64_build} = Xyes; then - enable_hipe=no case $CFLAGS in *-m64*) ;; @@ -502,22 +501,59 @@ case $host_os in ;; esac +lfs_conf=ok +lfs_source=none +if test "${LFS_CFLAGS+set}" = "set" || \ + test "${LFS_LDFLAGS+set}" = "set" || \ + test "${LFS_LIBS+set}" = "set"; then + lfs_source=user +else + LM_CHECK_GETCONF + test "$GETCONF" = "false" || lfs_source=getconf +fi -dnl -dnl Use the getconf utility if it exists -dnl to find large file support flags. -dnl -if type getconf >/dev/null 2>&1; then - CFLAGS="$CFLAGS `getconf LFS_CFLAGS 2>/dev/null`" - DEBUG_CFLAGS="$DEBUG_CFLAGS `getconf LFS_CFLAGS 2>/dev/null`" - LDFLAGS="$LDFLAGS `getconf LFS_LDFLAGS 2>/dev/null`" - LIBS="$LIBS `getconf LFS_LIBS 2>/dev/null`" +if test "$lfs_source" = "none"; then + AC_MSG_WARN([Do not know how to check for large file support flags; no getconf is available]) +else + for var in CFLAGS LDFLAGS LIBS; do + AC_MSG_CHECKING([for large file support $var]) + if test $lfs_source = user; then + eval "lfs_val=\"\$LFS_$var\"" + else + eval "lfs_var=LFS_$var" + lfs_val=`$GETCONF $lfs_var 2>/dev/null` || lfs_conf=failed + if test $lfs_conf = failed; then + AC_MSG_RESULT([failed]) + break + fi + eval "$lfs_var=\"$lfs_val\"" + fi + test "$lfs_val" != "" || lfs_val=none + AC_MSG_RESULT([$lfs_val]) + done + if test $lfs_conf = failed; then + AC_MSG_WARN([Check for large file support flags failed; $GETCONF failed]) + else + CFLAGS="$CFLAGS $LFS_CFLAGS" + DEBUG_CFLAGS="$DEBUG_CFLAGS $LFS_CFLAGS" + LDFLAGS="$LDFLAGS $LFS_LDFLAGS" + LIBS="$LIBS $LFS_LIBS" + fi fi if test "x$GCC" = xyes; then # until the emulator can handle this, I suggest we turn it off! #WFLAGS="-Wall -Wshadow -Wcast-qual -Wmissing-declarations" - WFLAGS="-Wall -Wstrict-prototypes -Wmissing-prototypes" + WFLAGS="-Wall -Wstrict-prototypes" + + case "$host_cpu" in + tile*) + # tile-gcc is a bit stricter with -Wmissing-prototypes than other gccs, + # and too strict for our taste. + ;; + *) + WFLAGS="$WFLAGS -Wmissing-prototypes";; + esac saved_CFLAGS=$CFLAGS CFLAGS="$CFLAGS -Wdeclaration-after-statement" @@ -727,7 +763,7 @@ fi AC_PROG_LN_S -AC_CHECK_PROG(AR, ar, ar, false) +AC_CHECK_TOOL([AR], [ar], [false]) if test "$ac_cv_prog_AR" = false; then AC_MSG_ERROR([No 'ar' command found in PATH]) fi @@ -2206,7 +2242,7 @@ if test "$cross_compiling" != "yes" && test X${enable_hipe} != Xno; then AC_MSG_NOTICE([HiPE disabled as no valid m4 is found in PATH]) else case "$ARCH-$OPSYS" in - x86-linux|amd64-linux|ppc-linux|ppc-darwin|arm-linux|amd64-freebsd|x86-freebsd|x86-sol2|amd64-sol2|ultrasparc-linux) + x86-linux|amd64-linux|x86-darwin*|amd64-darwin*|ppc-linux|ppc-darwin|arm-linux|amd64-freebsd|x86-freebsd|x86-sol2|amd64-sol2|ultrasparc-linux) enable_hipe=yes ;; esac |