+2000-07-10 Akim Demaille <akim@epita.fr>
+
+ * aclang.m4 (AC_PROG_CC, AC_PROG_CXX, AC_PROG_F77): Move the code
+ processing the result of AC_PROG_CC_G, AC_PROG_CXX_G, and
+ AC_PROG_F77_G into them.
+
2000-07-10 Akim Demaille <akim@epita.fr>
* doc/autoconf.texi (Multiple Cases, Quotation Rule Of Thumb):
_AC_LANG_COMPILER_WORKS
_AC_PROG_CC_GNU
-
-# Check whether -g works, even if CFLAGS is set, in case the package
-# plays around with CFLAGS (such as to build both debugging and normal
-# versions of a library), tasteless as that idea is.
-ac_test_CFLAGS=${CFLAGS+set}
-ac_save_CFLAGS=$CFLAGS
-CFLAGS=
_AC_PROG_CC_G
-if test "$ac_test_CFLAGS" = set; then
- CFLAGS=$ac_save_CFLAGS
-elif test $ac_cv_prog_cc_g = yes; then
- if test "$GCC" = yes; then
- CFLAGS="-g -O2"
- else
- CFLAGS="-g"
- fi
-else
- if test "$GCC" = yes; then
- CFLAGS="-O2"
- else
- CFLAGS=
- fi
-fi
AC_EXPAND_ONCE([_AC_EXEEXT])
AC_EXPAND_ONCE([_AC_OBJEXT])
AC_LANG_POP
# _AC_PROG_CC_G
-# ------------
+# -------------
+# Check whether -g works, even if CFLAGS is set, in case the package
+# plays around with CFLAGS (such as to build both debugging and normal
+# versions of a library), tasteless as that idea is.
define([_AC_PROG_CC_G],
-[AC_CACHE_CHECK(whether ${CC-cc} accepts -g, ac_cv_prog_cc_g,
+[ac_test_CFLAGS=${CFLAGS+set}
+ac_save_CFLAGS=$CFLAGS
+CFLAGS=
+AC_CACHE_CHECK(whether ${CC-cc} accepts -g, ac_cv_prog_cc_g,
[echo 'void f(){}' >conftest.c
if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
ac_cv_prog_cc_g=yes
ac_cv_prog_cc_g=no
fi
rm -f conftest*
-])])# _AC_PROG_CC_G
+])
+if test "$ac_test_CFLAGS" = set; then
+ CFLAGS=$ac_save_CFLAGS
+elif test $ac_cv_prog_cc_g = yes; then
+ if test "$GCC" = yes; then
+ CFLAGS="-g -O2"
+ else
+ CFLAGS="-g"
+ fi
+else
+ if test "$GCC" = yes; then
+ CFLAGS="-O2"
+ else
+ CFLAGS=
+ fi
+fi[]dnl
+])# _AC_PROG_CC_G
# AC_PROG_GCC_TRADITIONAL
_AC_LANG_COMPILER_WORKS
_AC_PROG_CXX_GNU
-
-# Check whether -g works, even if CXXFLAGS is set, in case the package
-# plays around with CXXFLAGS (such as to build both debugging and
-# normal versions of a library), tasteless as that idea is.
-ac_test_CXXFLAGS=${CXXFLAGS+set}
-ac_save_CXXFLAGS=$CXXFLAGS
-CXXFLAGS=
_AC_PROG_CXX_G
-if test "$ac_test_CXXFLAGS" = set; then
- CXXFLAGS=$ac_save_CXXFLAGS
-elif test $ac_cv_prog_cxx_g = yes; then
- if test "$GXX" = yes; then
- CXXFLAGS="-g -O2"
- else
- CXXFLAGS="-g"
- fi
-else
- if test "$GXX" = yes; then
- CXXFLAGS="-O2"
- else
- CXXFLAGS=
- fi
-fi
AC_EXPAND_ONCE([_AC_EXEEXT])
AC_EXPAND_ONCE([_AC_OBJEXT])
AC_LANG_POP
# _AC_PROG_CXX_G
-# -------------
+# --------------
+# Check whether -g works, even if CXXFLAGS is set, in case the package
+# plays around with CXXFLAGS (such as to build both debugging and
+# normal versions of a library), tasteless as that idea is.
define([_AC_PROG_CXX_G],
-[AC_CACHE_CHECK(whether ${CXX-g++} accepts -g, ac_cv_prog_cxx_g,
+[ac_test_CXXFLAGS=${CXXFLAGS+set}
+ac_save_CXXFLAGS=$CXXFLAGS
+CXXFLAGS=
+AC_CACHE_CHECK(whether ${CXX-g++} accepts -g, ac_cv_prog_cxx_g,
[echo 'void f(){}' >conftest.cc
if test -z "`${CXX-g++} -g -c conftest.cc 2>&1`"; then
ac_cv_prog_cxx_g=yes
ac_cv_prog_cxx_g=no
fi
rm -f conftest*
-])])# _AC_PROG_CXX_G
+])
+if test "$ac_test_CXXFLAGS" = set; then
+ CXXFLAGS=$ac_save_CXXFLAGS
+elif test $ac_cv_prog_cxx_g = yes; then
+ if test "$GXX" = yes; then
+ CXXFLAGS="-g -O2"
+ else
+ CXXFLAGS="-g"
+ fi
+else
+ if test "$GXX" = yes; then
+ CXXFLAGS="-O2"
+ else
+ CXXFLAGS=
+ fi
+fi[]dnl
+])# _AC_PROG_CXX_G
_AC_LANG_COMPILER_WORKS
_AC_PROG_F77_GNU
-
-# Check whether -g works, even if FFLAGS is set, in case the package
-# plays around with FFLAGS (such as to build both debugging and normal
-# versions of a library), tasteless as that idea is.
-ac_test_FFLAGS=${FFLAGS+set}
-ac_save_FFLAGS=$FFLAGS
-FFLAGS=
_AC_PROG_F77_G
-if test "$ac_test_FFLAGS" = set; then
- FFLAGS=$ac_save_FFLAGS
-elif test $ac_cv_prog_f77_g = yes; then
- if test "$G77" = yes; then
- FFLAGS="-g -O2"
- else
- FFLAGS="-g"
- fi
-else
- if test "$G77" = yes; then
- FFLAGS="-O2"
- else
- FFLAGS=
- fi
-fi
+
AC_EXPAND_ONCE([_AC_EXEEXT])
AC_EXPAND_ONCE([_AC_OBJEXT])
AC_LANG_POP
# _AC_PROG_F77_G
-# -------------
-# Test whether the Fortran 77 compiler can accept the `-g' option to
-# enable debugging.
+# --------------
+# Check whether -g works, even if FFLAGS is set, in case the package
+# plays around with FFLAGS (such as to build both debugging and normal
+# versions of a library), tasteless as that idea is.
define([_AC_PROG_F77_G],
-[AC_CACHE_CHECK(whether $F77 accepts -g, ac_cv_prog_f77_g,
+[ac_test_FFLAGS=${FFLAGS+set}
+ac_save_FFLAGS=$FFLAGS
+FFLAGS=
+AC_CACHE_CHECK(whether $F77 accepts -g, ac_cv_prog_f77_g,
[FFLAGS=-g
AC_COMPILE_IFELSE([AC_LANG_PROGRAM()],
[ac_cv_prog_f77_g=yes],
[ac_cv_prog_f77_g=no])
-])])# _AC_PROG_F77_G
+])
+if test "$ac_test_FFLAGS" = set; then
+ FFLAGS=$ac_save_FFLAGS
+elif test $ac_cv_prog_f77_g = yes; then
+ if test "$G77" = yes; then
+ FFLAGS="-g -O2"
+ else
+ FFLAGS="-g"
+ fi
+else
+ if test "$G77" = yes; then
+ FFLAGS="-O2"
+ else
+ FFLAGS=
+ fi
+fi[]dnl
+])# _AC_PROG_F77_G
# AC_PROG_F77_C_O
_AC_LANG_COMPILER_WORKS
_AC_PROG_CC_GNU
-
-# Check whether -g works, even if CFLAGS is set, in case the package
-# plays around with CFLAGS (such as to build both debugging and normal
-# versions of a library), tasteless as that idea is.
-ac_test_CFLAGS=${CFLAGS+set}
-ac_save_CFLAGS=$CFLAGS
-CFLAGS=
_AC_PROG_CC_G
-if test "$ac_test_CFLAGS" = set; then
- CFLAGS=$ac_save_CFLAGS
-elif test $ac_cv_prog_cc_g = yes; then
- if test "$GCC" = yes; then
- CFLAGS="-g -O2"
- else
- CFLAGS="-g"
- fi
-else
- if test "$GCC" = yes; then
- CFLAGS="-O2"
- else
- CFLAGS=
- fi
-fi
AC_EXPAND_ONCE([_AC_EXEEXT])
AC_EXPAND_ONCE([_AC_OBJEXT])
AC_LANG_POP
# _AC_PROG_CC_G
-# ------------
+# -------------
+# Check whether -g works, even if CFLAGS is set, in case the package
+# plays around with CFLAGS (such as to build both debugging and normal
+# versions of a library), tasteless as that idea is.
define([_AC_PROG_CC_G],
-[AC_CACHE_CHECK(whether ${CC-cc} accepts -g, ac_cv_prog_cc_g,
+[ac_test_CFLAGS=${CFLAGS+set}
+ac_save_CFLAGS=$CFLAGS
+CFLAGS=
+AC_CACHE_CHECK(whether ${CC-cc} accepts -g, ac_cv_prog_cc_g,
[echo 'void f(){}' >conftest.c
if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
ac_cv_prog_cc_g=yes
ac_cv_prog_cc_g=no
fi
rm -f conftest*
-])])# _AC_PROG_CC_G
+])
+if test "$ac_test_CFLAGS" = set; then
+ CFLAGS=$ac_save_CFLAGS
+elif test $ac_cv_prog_cc_g = yes; then
+ if test "$GCC" = yes; then
+ CFLAGS="-g -O2"
+ else
+ CFLAGS="-g"
+ fi
+else
+ if test "$GCC" = yes; then
+ CFLAGS="-O2"
+ else
+ CFLAGS=
+ fi
+fi[]dnl
+])# _AC_PROG_CC_G
# AC_PROG_GCC_TRADITIONAL
_AC_LANG_COMPILER_WORKS
_AC_PROG_CXX_GNU
-
-# Check whether -g works, even if CXXFLAGS is set, in case the package
-# plays around with CXXFLAGS (such as to build both debugging and
-# normal versions of a library), tasteless as that idea is.
-ac_test_CXXFLAGS=${CXXFLAGS+set}
-ac_save_CXXFLAGS=$CXXFLAGS
-CXXFLAGS=
_AC_PROG_CXX_G
-if test "$ac_test_CXXFLAGS" = set; then
- CXXFLAGS=$ac_save_CXXFLAGS
-elif test $ac_cv_prog_cxx_g = yes; then
- if test "$GXX" = yes; then
- CXXFLAGS="-g -O2"
- else
- CXXFLAGS="-g"
- fi
-else
- if test "$GXX" = yes; then
- CXXFLAGS="-O2"
- else
- CXXFLAGS=
- fi
-fi
AC_EXPAND_ONCE([_AC_EXEEXT])
AC_EXPAND_ONCE([_AC_OBJEXT])
AC_LANG_POP
# _AC_PROG_CXX_G
-# -------------
+# --------------
+# Check whether -g works, even if CXXFLAGS is set, in case the package
+# plays around with CXXFLAGS (such as to build both debugging and
+# normal versions of a library), tasteless as that idea is.
define([_AC_PROG_CXX_G],
-[AC_CACHE_CHECK(whether ${CXX-g++} accepts -g, ac_cv_prog_cxx_g,
+[ac_test_CXXFLAGS=${CXXFLAGS+set}
+ac_save_CXXFLAGS=$CXXFLAGS
+CXXFLAGS=
+AC_CACHE_CHECK(whether ${CXX-g++} accepts -g, ac_cv_prog_cxx_g,
[echo 'void f(){}' >conftest.cc
if test -z "`${CXX-g++} -g -c conftest.cc 2>&1`"; then
ac_cv_prog_cxx_g=yes
ac_cv_prog_cxx_g=no
fi
rm -f conftest*
-])])# _AC_PROG_CXX_G
+])
+if test "$ac_test_CXXFLAGS" = set; then
+ CXXFLAGS=$ac_save_CXXFLAGS
+elif test $ac_cv_prog_cxx_g = yes; then
+ if test "$GXX" = yes; then
+ CXXFLAGS="-g -O2"
+ else
+ CXXFLAGS="-g"
+ fi
+else
+ if test "$GXX" = yes; then
+ CXXFLAGS="-O2"
+ else
+ CXXFLAGS=
+ fi
+fi[]dnl
+])# _AC_PROG_CXX_G
_AC_LANG_COMPILER_WORKS
_AC_PROG_F77_GNU
-
-# Check whether -g works, even if FFLAGS is set, in case the package
-# plays around with FFLAGS (such as to build both debugging and normal
-# versions of a library), tasteless as that idea is.
-ac_test_FFLAGS=${FFLAGS+set}
-ac_save_FFLAGS=$FFLAGS
-FFLAGS=
_AC_PROG_F77_G
-if test "$ac_test_FFLAGS" = set; then
- FFLAGS=$ac_save_FFLAGS
-elif test $ac_cv_prog_f77_g = yes; then
- if test "$G77" = yes; then
- FFLAGS="-g -O2"
- else
- FFLAGS="-g"
- fi
-else
- if test "$G77" = yes; then
- FFLAGS="-O2"
- else
- FFLAGS=
- fi
-fi
+
AC_EXPAND_ONCE([_AC_EXEEXT])
AC_EXPAND_ONCE([_AC_OBJEXT])
AC_LANG_POP
# _AC_PROG_F77_G
-# -------------
-# Test whether the Fortran 77 compiler can accept the `-g' option to
-# enable debugging.
+# --------------
+# Check whether -g works, even if FFLAGS is set, in case the package
+# plays around with FFLAGS (such as to build both debugging and normal
+# versions of a library), tasteless as that idea is.
define([_AC_PROG_F77_G],
-[AC_CACHE_CHECK(whether $F77 accepts -g, ac_cv_prog_f77_g,
+[ac_test_FFLAGS=${FFLAGS+set}
+ac_save_FFLAGS=$FFLAGS
+FFLAGS=
+AC_CACHE_CHECK(whether $F77 accepts -g, ac_cv_prog_f77_g,
[FFLAGS=-g
AC_COMPILE_IFELSE([AC_LANG_PROGRAM()],
[ac_cv_prog_f77_g=yes],
[ac_cv_prog_f77_g=no])
-])])# _AC_PROG_F77_G
+])
+if test "$ac_test_FFLAGS" = set; then
+ FFLAGS=$ac_save_FFLAGS
+elif test $ac_cv_prog_f77_g = yes; then
+ if test "$G77" = yes; then
+ FFLAGS="-g -O2"
+ else
+ FFLAGS="-g"
+ fi
+else
+ if test "$G77" = yes; then
+ FFLAGS="-O2"
+ else
+ FFLAGS=
+ fi
+fi[]dnl
+])# _AC_PROG_F77_G
# AC_PROG_F77_C_O
_AC_LANG_COMPILER_WORKS
_AC_PROG_CC_GNU
-
-# Check whether -g works, even if CFLAGS is set, in case the package
-# plays around with CFLAGS (such as to build both debugging and normal
-# versions of a library), tasteless as that idea is.
-ac_test_CFLAGS=${CFLAGS+set}
-ac_save_CFLAGS=$CFLAGS
-CFLAGS=
_AC_PROG_CC_G
-if test "$ac_test_CFLAGS" = set; then
- CFLAGS=$ac_save_CFLAGS
-elif test $ac_cv_prog_cc_g = yes; then
- if test "$GCC" = yes; then
- CFLAGS="-g -O2"
- else
- CFLAGS="-g"
- fi
-else
- if test "$GCC" = yes; then
- CFLAGS="-O2"
- else
- CFLAGS=
- fi
-fi
AC_EXPAND_ONCE([_AC_EXEEXT])
AC_EXPAND_ONCE([_AC_OBJEXT])
AC_LANG_POP
# _AC_PROG_CC_G
-# ------------
+# -------------
+# Check whether -g works, even if CFLAGS is set, in case the package
+# plays around with CFLAGS (such as to build both debugging and normal
+# versions of a library), tasteless as that idea is.
define([_AC_PROG_CC_G],
-[AC_CACHE_CHECK(whether ${CC-cc} accepts -g, ac_cv_prog_cc_g,
+[ac_test_CFLAGS=${CFLAGS+set}
+ac_save_CFLAGS=$CFLAGS
+CFLAGS=
+AC_CACHE_CHECK(whether ${CC-cc} accepts -g, ac_cv_prog_cc_g,
[echo 'void f(){}' >conftest.c
if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
ac_cv_prog_cc_g=yes
ac_cv_prog_cc_g=no
fi
rm -f conftest*
-])])# _AC_PROG_CC_G
+])
+if test "$ac_test_CFLAGS" = set; then
+ CFLAGS=$ac_save_CFLAGS
+elif test $ac_cv_prog_cc_g = yes; then
+ if test "$GCC" = yes; then
+ CFLAGS="-g -O2"
+ else
+ CFLAGS="-g"
+ fi
+else
+ if test "$GCC" = yes; then
+ CFLAGS="-O2"
+ else
+ CFLAGS=
+ fi
+fi[]dnl
+])# _AC_PROG_CC_G
# AC_PROG_GCC_TRADITIONAL
_AC_LANG_COMPILER_WORKS
_AC_PROG_CXX_GNU
-
-# Check whether -g works, even if CXXFLAGS is set, in case the package
-# plays around with CXXFLAGS (such as to build both debugging and
-# normal versions of a library), tasteless as that idea is.
-ac_test_CXXFLAGS=${CXXFLAGS+set}
-ac_save_CXXFLAGS=$CXXFLAGS
-CXXFLAGS=
_AC_PROG_CXX_G
-if test "$ac_test_CXXFLAGS" = set; then
- CXXFLAGS=$ac_save_CXXFLAGS
-elif test $ac_cv_prog_cxx_g = yes; then
- if test "$GXX" = yes; then
- CXXFLAGS="-g -O2"
- else
- CXXFLAGS="-g"
- fi
-else
- if test "$GXX" = yes; then
- CXXFLAGS="-O2"
- else
- CXXFLAGS=
- fi
-fi
AC_EXPAND_ONCE([_AC_EXEEXT])
AC_EXPAND_ONCE([_AC_OBJEXT])
AC_LANG_POP
# _AC_PROG_CXX_G
-# -------------
+# --------------
+# Check whether -g works, even if CXXFLAGS is set, in case the package
+# plays around with CXXFLAGS (such as to build both debugging and
+# normal versions of a library), tasteless as that idea is.
define([_AC_PROG_CXX_G],
-[AC_CACHE_CHECK(whether ${CXX-g++} accepts -g, ac_cv_prog_cxx_g,
+[ac_test_CXXFLAGS=${CXXFLAGS+set}
+ac_save_CXXFLAGS=$CXXFLAGS
+CXXFLAGS=
+AC_CACHE_CHECK(whether ${CXX-g++} accepts -g, ac_cv_prog_cxx_g,
[echo 'void f(){}' >conftest.cc
if test -z "`${CXX-g++} -g -c conftest.cc 2>&1`"; then
ac_cv_prog_cxx_g=yes
ac_cv_prog_cxx_g=no
fi
rm -f conftest*
-])])# _AC_PROG_CXX_G
+])
+if test "$ac_test_CXXFLAGS" = set; then
+ CXXFLAGS=$ac_save_CXXFLAGS
+elif test $ac_cv_prog_cxx_g = yes; then
+ if test "$GXX" = yes; then
+ CXXFLAGS="-g -O2"
+ else
+ CXXFLAGS="-g"
+ fi
+else
+ if test "$GXX" = yes; then
+ CXXFLAGS="-O2"
+ else
+ CXXFLAGS=
+ fi
+fi[]dnl
+])# _AC_PROG_CXX_G
_AC_LANG_COMPILER_WORKS
_AC_PROG_F77_GNU
-
-# Check whether -g works, even if FFLAGS is set, in case the package
-# plays around with FFLAGS (such as to build both debugging and normal
-# versions of a library), tasteless as that idea is.
-ac_test_FFLAGS=${FFLAGS+set}
-ac_save_FFLAGS=$FFLAGS
-FFLAGS=
_AC_PROG_F77_G
-if test "$ac_test_FFLAGS" = set; then
- FFLAGS=$ac_save_FFLAGS
-elif test $ac_cv_prog_f77_g = yes; then
- if test "$G77" = yes; then
- FFLAGS="-g -O2"
- else
- FFLAGS="-g"
- fi
-else
- if test "$G77" = yes; then
- FFLAGS="-O2"
- else
- FFLAGS=
- fi
-fi
+
AC_EXPAND_ONCE([_AC_EXEEXT])
AC_EXPAND_ONCE([_AC_OBJEXT])
AC_LANG_POP
# _AC_PROG_F77_G
-# -------------
-# Test whether the Fortran 77 compiler can accept the `-g' option to
-# enable debugging.
+# --------------
+# Check whether -g works, even if FFLAGS is set, in case the package
+# plays around with FFLAGS (such as to build both debugging and normal
+# versions of a library), tasteless as that idea is.
define([_AC_PROG_F77_G],
-[AC_CACHE_CHECK(whether $F77 accepts -g, ac_cv_prog_f77_g,
+[ac_test_FFLAGS=${FFLAGS+set}
+ac_save_FFLAGS=$FFLAGS
+FFLAGS=
+AC_CACHE_CHECK(whether $F77 accepts -g, ac_cv_prog_f77_g,
[FFLAGS=-g
AC_COMPILE_IFELSE([AC_LANG_PROGRAM()],
[ac_cv_prog_f77_g=yes],
[ac_cv_prog_f77_g=no])
-])])# _AC_PROG_F77_G
+])
+if test "$ac_test_FFLAGS" = set; then
+ FFLAGS=$ac_save_FFLAGS
+elif test $ac_cv_prog_f77_g = yes; then
+ if test "$G77" = yes; then
+ FFLAGS="-g -O2"
+ else
+ FFLAGS="-g"
+ fi
+else
+ if test "$G77" = yes; then
+ FFLAGS="-O2"
+ else
+ FFLAGS=
+ fi
+fi[]dnl
+])# _AC_PROG_F77_G
# AC_PROG_F77_C_O
_AC_LANG_COMPILER_WORKS
_AC_PROG_CC_GNU
-
-# Check whether -g works, even if CFLAGS is set, in case the package
-# plays around with CFLAGS (such as to build both debugging and normal
-# versions of a library), tasteless as that idea is.
-ac_test_CFLAGS=${CFLAGS+set}
-ac_save_CFLAGS=$CFLAGS
-CFLAGS=
_AC_PROG_CC_G
-if test "$ac_test_CFLAGS" = set; then
- CFLAGS=$ac_save_CFLAGS
-elif test $ac_cv_prog_cc_g = yes; then
- if test "$GCC" = yes; then
- CFLAGS="-g -O2"
- else
- CFLAGS="-g"
- fi
-else
- if test "$GCC" = yes; then
- CFLAGS="-O2"
- else
- CFLAGS=
- fi
-fi
AC_EXPAND_ONCE([_AC_EXEEXT])
AC_EXPAND_ONCE([_AC_OBJEXT])
AC_LANG_POP
# _AC_PROG_CC_G
-# ------------
+# -------------
+# Check whether -g works, even if CFLAGS is set, in case the package
+# plays around with CFLAGS (such as to build both debugging and normal
+# versions of a library), tasteless as that idea is.
define([_AC_PROG_CC_G],
-[AC_CACHE_CHECK(whether ${CC-cc} accepts -g, ac_cv_prog_cc_g,
+[ac_test_CFLAGS=${CFLAGS+set}
+ac_save_CFLAGS=$CFLAGS
+CFLAGS=
+AC_CACHE_CHECK(whether ${CC-cc} accepts -g, ac_cv_prog_cc_g,
[echo 'void f(){}' >conftest.c
if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
ac_cv_prog_cc_g=yes
ac_cv_prog_cc_g=no
fi
rm -f conftest*
-])])# _AC_PROG_CC_G
+])
+if test "$ac_test_CFLAGS" = set; then
+ CFLAGS=$ac_save_CFLAGS
+elif test $ac_cv_prog_cc_g = yes; then
+ if test "$GCC" = yes; then
+ CFLAGS="-g -O2"
+ else
+ CFLAGS="-g"
+ fi
+else
+ if test "$GCC" = yes; then
+ CFLAGS="-O2"
+ else
+ CFLAGS=
+ fi
+fi[]dnl
+])# _AC_PROG_CC_G
# AC_PROG_GCC_TRADITIONAL
_AC_LANG_COMPILER_WORKS
_AC_PROG_CXX_GNU
-
-# Check whether -g works, even if CXXFLAGS is set, in case the package
-# plays around with CXXFLAGS (such as to build both debugging and
-# normal versions of a library), tasteless as that idea is.
-ac_test_CXXFLAGS=${CXXFLAGS+set}
-ac_save_CXXFLAGS=$CXXFLAGS
-CXXFLAGS=
_AC_PROG_CXX_G
-if test "$ac_test_CXXFLAGS" = set; then
- CXXFLAGS=$ac_save_CXXFLAGS
-elif test $ac_cv_prog_cxx_g = yes; then
- if test "$GXX" = yes; then
- CXXFLAGS="-g -O2"
- else
- CXXFLAGS="-g"
- fi
-else
- if test "$GXX" = yes; then
- CXXFLAGS="-O2"
- else
- CXXFLAGS=
- fi
-fi
AC_EXPAND_ONCE([_AC_EXEEXT])
AC_EXPAND_ONCE([_AC_OBJEXT])
AC_LANG_POP
# _AC_PROG_CXX_G
-# -------------
+# --------------
+# Check whether -g works, even if CXXFLAGS is set, in case the package
+# plays around with CXXFLAGS (such as to build both debugging and
+# normal versions of a library), tasteless as that idea is.
define([_AC_PROG_CXX_G],
-[AC_CACHE_CHECK(whether ${CXX-g++} accepts -g, ac_cv_prog_cxx_g,
+[ac_test_CXXFLAGS=${CXXFLAGS+set}
+ac_save_CXXFLAGS=$CXXFLAGS
+CXXFLAGS=
+AC_CACHE_CHECK(whether ${CXX-g++} accepts -g, ac_cv_prog_cxx_g,
[echo 'void f(){}' >conftest.cc
if test -z "`${CXX-g++} -g -c conftest.cc 2>&1`"; then
ac_cv_prog_cxx_g=yes
ac_cv_prog_cxx_g=no
fi
rm -f conftest*
-])])# _AC_PROG_CXX_G
+])
+if test "$ac_test_CXXFLAGS" = set; then
+ CXXFLAGS=$ac_save_CXXFLAGS
+elif test $ac_cv_prog_cxx_g = yes; then
+ if test "$GXX" = yes; then
+ CXXFLAGS="-g -O2"
+ else
+ CXXFLAGS="-g"
+ fi
+else
+ if test "$GXX" = yes; then
+ CXXFLAGS="-O2"
+ else
+ CXXFLAGS=
+ fi
+fi[]dnl
+])# _AC_PROG_CXX_G
_AC_LANG_COMPILER_WORKS
_AC_PROG_F77_GNU
-
-# Check whether -g works, even if FFLAGS is set, in case the package
-# plays around with FFLAGS (such as to build both debugging and normal
-# versions of a library), tasteless as that idea is.
-ac_test_FFLAGS=${FFLAGS+set}
-ac_save_FFLAGS=$FFLAGS
-FFLAGS=
_AC_PROG_F77_G
-if test "$ac_test_FFLAGS" = set; then
- FFLAGS=$ac_save_FFLAGS
-elif test $ac_cv_prog_f77_g = yes; then
- if test "$G77" = yes; then
- FFLAGS="-g -O2"
- else
- FFLAGS="-g"
- fi
-else
- if test "$G77" = yes; then
- FFLAGS="-O2"
- else
- FFLAGS=
- fi
-fi
+
AC_EXPAND_ONCE([_AC_EXEEXT])
AC_EXPAND_ONCE([_AC_OBJEXT])
AC_LANG_POP
# _AC_PROG_F77_G
-# -------------
-# Test whether the Fortran 77 compiler can accept the `-g' option to
-# enable debugging.
+# --------------
+# Check whether -g works, even if FFLAGS is set, in case the package
+# plays around with FFLAGS (such as to build both debugging and normal
+# versions of a library), tasteless as that idea is.
define([_AC_PROG_F77_G],
-[AC_CACHE_CHECK(whether $F77 accepts -g, ac_cv_prog_f77_g,
+[ac_test_FFLAGS=${FFLAGS+set}
+ac_save_FFLAGS=$FFLAGS
+FFLAGS=
+AC_CACHE_CHECK(whether $F77 accepts -g, ac_cv_prog_f77_g,
[FFLAGS=-g
AC_COMPILE_IFELSE([AC_LANG_PROGRAM()],
[ac_cv_prog_f77_g=yes],
[ac_cv_prog_f77_g=no])
-])])# _AC_PROG_F77_G
+])
+if test "$ac_test_FFLAGS" = set; then
+ FFLAGS=$ac_save_FFLAGS
+elif test $ac_cv_prog_f77_g = yes; then
+ if test "$G77" = yes; then
+ FFLAGS="-g -O2"
+ else
+ FFLAGS="-g"
+ fi
+else
+ if test "$G77" = yes; then
+ FFLAGS="-O2"
+ else
+ FFLAGS=
+ fi
+fi[]dnl
+])# _AC_PROG_F77_G
# AC_PROG_F77_C_O