ac_gnu_compiler.
(_AC_PROG_CC_GNU, _AC_PROG_CXX_GNU, _AC_PROG_F77_GNU): Compute
ac_gnu_compiler.
* acgeneral.m4 (AC_LINKER_OPTION): Adjust.
+2000-07-10 Akim Demaille <akim@epita.fr>
+
+ * aclang.m4 (AC_LANG(C), AC_LANG(C++), AC_LANG(Fortran 77)): Set
+ ac_gnu_compiler.
+ (_AC_PROG_CC_GNU, _AC_PROG_CXX_GNU, _AC_PROG_F77_GNU): Compute
+ ac_gnu_compiler.
+ * acgeneral.m4 (AC_LINKER_OPTION): Adjust.
+
2000-07-10 Akim Demaille <akim@epita.fr>
* aclang.m4 (AC_PROG_CC, AC_PROG_CXX, AC_PROG_F77): Move the code
# doesn't currently support.
# FIXME: Get rid of this macro.
AC_DEFUN([AC_LINKER_OPTION],
-[AC_LANG_CASE([C], [test x"$GCC" = xyes && using_gnu_compiler=yes],
- [C++], [test x"$GXX" = xyes && using_gnu_compiler=yes],
- [FORTRAN77], [test x"$G77" = xyes && using_gnu_compiler=yes],
- [using_gnu_compiler=])
-
-dnl I don't understand the point of having the test inside of the
-dnl loop.
-for ac_link_opt in $1; do
- if test x"$using_gnu_compiler" = xyes; then
+[if test "ac_gnu_compiler" = yes; then
+ for ac_link_opt in $1; do
$2="[$]$2 -Xlinker $ac_link_opt"
- else
- $2="[$]$2 $ac_link_opt"
- fi
-done])
+ done
+else
+ $2="[$]$2 $1"
+fi])
# AC_LIST_MEMBER_OF(ELEMENT, LIST, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
# -------------
# Set the current language to LANG.
#
-# Do *not* write AC_LANG([$1]), because this pair of parens do not
+# Do *not* write AC_LANG([$1]), because this pair of parens does not
# correspond to an evaluation, rather, they are just part of the name.
# If you add quotes here, they will be part of the name too, yielding
# `AC_LANG([C])' for instance, which does not exist.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&AC_FD_LOG'
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&AC_FD_LOG'
+ac_gnu_compiler=$ac_cv_prog_gcc
])
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&AC_FD_LOG'
ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&AC_FD_LOG'
+ac_gnu_compiler=$ac_cv_prog_gxx
])
[ac_ext=f
ac_compile='${F77-f77} -c $FFLAGS conftest.$ac_ext >&AC_FD_LOG'
ac_link='${F77-f77} -o conftest${ac_exeext} $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&AC_FD_LOG'
+ac_gnu_compiler=$ac_cv_prog_g77
])
else
ac_cv_prog_gcc=no
fi])
-if test $ac_cv_prog_gcc = yes; then
+ac_gnu_compiler=$ac_cv_prog_gcc
+if test $ac_gnu_compiler = yes; then
GCC=yes
else
GCC=
else
ac_cv_prog_gxx=no
fi])
-
-if test $ac_cv_prog_gxx = yes; then
+ac_gnu_compiler=$ac_cv_prog_gxx
+if test $ac_gnu_compiler = yes; then
GXX=yes
else
GXX=
else
ac_cv_prog_g77=no
fi])
-if test $ac_cv_prog_g77 = yes; then
+ac_gnu_compiler=$ac_cv_prog_g77
+if test $ac_gnu_compiler = yes; then
G77=yes
else
G77=
# -------------
# Set the current language to LANG.
#
-# Do *not* write AC_LANG([$1]), because this pair of parens do not
+# Do *not* write AC_LANG([$1]), because this pair of parens does not
# correspond to an evaluation, rather, they are just part of the name.
# If you add quotes here, they will be part of the name too, yielding
# `AC_LANG([C])' for instance, which does not exist.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&AC_FD_LOG'
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&AC_FD_LOG'
+ac_gnu_compiler=$ac_cv_prog_gcc
])
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&AC_FD_LOG'
ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&AC_FD_LOG'
+ac_gnu_compiler=$ac_cv_prog_gxx
])
[ac_ext=f
ac_compile='${F77-f77} -c $FFLAGS conftest.$ac_ext >&AC_FD_LOG'
ac_link='${F77-f77} -o conftest${ac_exeext} $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&AC_FD_LOG'
+ac_gnu_compiler=$ac_cv_prog_g77
])
else
ac_cv_prog_gcc=no
fi])
-if test $ac_cv_prog_gcc = yes; then
+ac_gnu_compiler=$ac_cv_prog_gcc
+if test $ac_gnu_compiler = yes; then
GCC=yes
else
GCC=
else
ac_cv_prog_gxx=no
fi])
-
-if test $ac_cv_prog_gxx = yes; then
+ac_gnu_compiler=$ac_cv_prog_gxx
+if test $ac_gnu_compiler = yes; then
GXX=yes
else
GXX=
else
ac_cv_prog_g77=no
fi])
-if test $ac_cv_prog_g77 = yes; then
+ac_gnu_compiler=$ac_cv_prog_g77
+if test $ac_gnu_compiler = yes; then
G77=yes
else
G77=
# -------------
# Set the current language to LANG.
#
-# Do *not* write AC_LANG([$1]), because this pair of parens do not
+# Do *not* write AC_LANG([$1]), because this pair of parens does not
# correspond to an evaluation, rather, they are just part of the name.
# If you add quotes here, they will be part of the name too, yielding
# `AC_LANG([C])' for instance, which does not exist.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&AC_FD_LOG'
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&AC_FD_LOG'
+ac_gnu_compiler=$ac_cv_prog_gcc
])
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&AC_FD_LOG'
ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&AC_FD_LOG'
+ac_gnu_compiler=$ac_cv_prog_gxx
])
[ac_ext=f
ac_compile='${F77-f77} -c $FFLAGS conftest.$ac_ext >&AC_FD_LOG'
ac_link='${F77-f77} -o conftest${ac_exeext} $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&AC_FD_LOG'
+ac_gnu_compiler=$ac_cv_prog_g77
])
else
ac_cv_prog_gcc=no
fi])
-if test $ac_cv_prog_gcc = yes; then
+ac_gnu_compiler=$ac_cv_prog_gcc
+if test $ac_gnu_compiler = yes; then
GCC=yes
else
GCC=
else
ac_cv_prog_gxx=no
fi])
-
-if test $ac_cv_prog_gxx = yes; then
+ac_gnu_compiler=$ac_cv_prog_gxx
+if test $ac_gnu_compiler = yes; then
GXX=yes
else
GXX=
else
ac_cv_prog_g77=no
fi])
-if test $ac_cv_prog_g77 = yes; then
+ac_gnu_compiler=$ac_cv_prog_g77
+if test $ac_gnu_compiler = yes; then
G77=yes
else
G77=
# doesn't currently support.
# FIXME: Get rid of this macro.
AC_DEFUN([AC_LINKER_OPTION],
-[AC_LANG_CASE([C], [test x"$GCC" = xyes && using_gnu_compiler=yes],
- [C++], [test x"$GXX" = xyes && using_gnu_compiler=yes],
- [FORTRAN77], [test x"$G77" = xyes && using_gnu_compiler=yes],
- [using_gnu_compiler=])
-
-dnl I don't understand the point of having the test inside of the
-dnl loop.
-for ac_link_opt in $1; do
- if test x"$using_gnu_compiler" = xyes; then
+[if test "ac_gnu_compiler" = yes; then
+ for ac_link_opt in $1; do
$2="[$]$2 -Xlinker $ac_link_opt"
- else
- $2="[$]$2 $ac_link_opt"
- fi
-done])
+ done
+else
+ $2="[$]$2 $1"
+fi])
# AC_LIST_MEMBER_OF(ELEMENT, LIST, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
# -------------
# Set the current language to LANG.
#
-# Do *not* write AC_LANG([$1]), because this pair of parens do not
+# Do *not* write AC_LANG([$1]), because this pair of parens does not
# correspond to an evaluation, rather, they are just part of the name.
# If you add quotes here, they will be part of the name too, yielding
# `AC_LANG([C])' for instance, which does not exist.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&AC_FD_LOG'
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&AC_FD_LOG'
+ac_gnu_compiler=$ac_cv_prog_gcc
])
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&AC_FD_LOG'
ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&AC_FD_LOG'
+ac_gnu_compiler=$ac_cv_prog_gxx
])
[ac_ext=f
ac_compile='${F77-f77} -c $FFLAGS conftest.$ac_ext >&AC_FD_LOG'
ac_link='${F77-f77} -o conftest${ac_exeext} $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&AC_FD_LOG'
+ac_gnu_compiler=$ac_cv_prog_g77
])
else
ac_cv_prog_gcc=no
fi])
-if test $ac_cv_prog_gcc = yes; then
+ac_gnu_compiler=$ac_cv_prog_gcc
+if test $ac_gnu_compiler = yes; then
GCC=yes
else
GCC=
else
ac_cv_prog_gxx=no
fi])
-
-if test $ac_cv_prog_gxx = yes; then
+ac_gnu_compiler=$ac_cv_prog_gxx
+if test $ac_gnu_compiler = yes; then
GXX=yes
else
GXX=
else
ac_cv_prog_g77=no
fi])
-if test $ac_cv_prog_g77 = yes; then
+ac_gnu_compiler=$ac_cv_prog_g77
+if test $ac_gnu_compiler = yes; then
G77=yes
else
G77=