From: Akim Demaille Date: Tue, 23 May 2000 14:54:49 +0000 (+0000) Subject: Simplify the interface: users shouldn't need to explicitly check X-Git-Tag: autoconf-2.50~879 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=7435a2e96cfbcb247fb426cc5528843b2d325d78;p=thirdparty%2Fautoconf.git Simplify the interface: users shouldn't need to explicitly check for special environments. * acspecific.m4 (AC_EXEEXT, AC_OBJEXT): AU defined to nothing. Replace them by... (_AC_EXEEXT, _AC_OBJEXT): this. * aclang.m4 (AC_PROG_CC, AC_PROG_CXX, AC_PROG_F77): Call them. (AC_PROG_CC_G, AC_PROG_CXX_G, AC_PROG_F77_G): Rename as... (_AC_PROG_CC_G, _AC_PROG_CXX_G, _AC_PROG_F77_G): this. Adjust dependencies. * tests/Makefile.am (FILTER_MACROS): Adjust. * doc/autoconf.texi (Compilers and Preprocessors): New section, move the documentation of AC_PROG_CC, AC_PROG_CC_C_O, AC_PROG_CC_STDC, AC_PROG_CPP, AC_PROG_CXX, AC_PROG_CXXCPP, AC_PROG_F77, AC_PROG_F77_C_O, AC_PROG_GCC_TRADITIONAL here. Factor the comment documentation of AC_PROG_CC, AC_PROG_CXX, AC_PROG_F77. --- diff --git a/ChangeLog b/ChangeLog index d1c8e487f..8434e52e6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,23 @@ +2000-05-23 Akim Demaille + + Simplify the interface: users shouldn't need to explicitly check + for special environments. + + * acspecific.m4 (AC_EXEEXT, AC_OBJEXT): AU defined to + nothing. Replace them by... + (_AC_EXEEXT, _AC_OBJEXT): this. + * aclang.m4 (AC_PROG_CC, AC_PROG_CXX, AC_PROG_F77): Call them. + (AC_PROG_CC_G, AC_PROG_CXX_G, AC_PROG_F77_G): Rename as... + (_AC_PROG_CC_G, _AC_PROG_CXX_G, _AC_PROG_F77_G): this. + Adjust dependencies. + * tests/Makefile.am (FILTER_MACROS): Adjust. + * doc/autoconf.texi (Compilers and Preprocessors): New section, + move the documentation of AC_PROG_CC, AC_PROG_CC_C_O, + AC_PROG_CC_STDC, AC_PROG_CPP, AC_PROG_CXX, AC_PROG_CXXCPP, + AC_PROG_F77, AC_PROG_F77_C_O, AC_PROG_GCC_TRADITIONAL here. + Factor the comment documentation of AC_PROG_CC, AC_PROG_CXX, + AC_PROG_F77. + 2000-05-23 Akim Demaille Modernize AC_EXEEXT and AC_OBJEXT. diff --git a/aclang.m4 b/aclang.m4 index ad279b66d..905aed125 100644 --- a/aclang.m4 +++ b/aclang.m4 @@ -470,7 +470,7 @@ dnl normal versions of a library), tasteless as that idea is. ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS CFLAGS= -AC_PROG_CC_G +_AC_PROG_CC_G if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then @@ -486,6 +486,8 @@ else CFLAGS= fi fi +AC_EXPAND_ONCE([_AC_EXEEXT]) +AC_EXPAND_ONCE([_AC_OBJEXT]) AC_LANG_POP ])# AC_PROG_CC @@ -513,9 +515,9 @@ fi[]dnl ])# _AC_PROG_CC_GNU -# AC_PROG_CC_G +# _AC_PROG_CC_G # ------------ -AC_DEFUN([AC_PROG_CC_G], +define([_AC_PROG_CC_G], [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 @@ -524,7 +526,7 @@ else ac_cv_prog_cc_g=no fi rm -f conftest* -])]) +])])# _AC_PROG_CC_G # AC_PROG_GCC_TRADITIONAL @@ -648,7 +650,7 @@ dnl normal versions of a library), tasteless as that idea is. ac_test_CXXFLAGS=${CXXFLAGS+set} ac_save_CXXFLAGS=$CXXFLAGS CXXFLAGS= -AC_PROG_CXX_G +_AC_PROG_CXX_G if test "$ac_test_CXXFLAGS" = set; then CXXFLAGS=$ac_save_CXXFLAGS elif test $ac_cv_prog_cxx_g = yes; then @@ -664,6 +666,8 @@ else CXXFLAGS= fi fi +AC_EXPAND_ONCE([_AC_EXEEXT]) +AC_EXPAND_ONCE([_AC_OBJEXT]) AC_LANG_POP ])# AC_PROG_CXX @@ -692,9 +696,9 @@ fi[]dnl ])# _AC_PROG_CXX_GNU -# AC_PROG_CXX_G +# _AC_PROG_CXX_G # ------------- -AC_DEFUN([AC_PROG_CXX_G], +define([_AC_PROG_CXX_G], [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 @@ -703,7 +707,7 @@ else ac_cv_prog_cxx_g=no fi rm -f conftest* -])])# AC_PROG_CXX_G +])])# _AC_PROG_CXX_G @@ -731,7 +735,7 @@ dnl normal versions of a library), tasteless as that idea is. ac_test_FFLAGS=${FFLAGS+set} ac_save_FFLAGS=$FFLAGS FFLAGS= -AC_PROG_F77_G +_AC_PROG_F77_G if test "$ac_test_FFLAGS" = set; then FFLAGS=$ac_save_FFLAGS elif test $ac_cv_prog_f77_g = yes; then @@ -747,6 +751,8 @@ else FFLAGS= fi fi +AC_EXPAND_ONCE([_AC_EXEEXT]) +AC_EXPAND_ONCE([_AC_OBJEXT]) AC_LANG_POP ])# AC_PROG_F77 @@ -776,11 +782,11 @@ fi[]dnl ])# _AC_PROG_F77_GNU -# AC_PROG_F77_G +# _AC_PROG_F77_G # ------------- # Test whether the Fortran 77 compiler can accept the `-g' option to # enable debugging. -AC_DEFUN([AC_PROG_F77_G], +define([_AC_PROG_F77_G], [AC_CACHE_CHECK(whether $F77 accepts -g, ac_cv_prog_f77_g, [cat >conftest.f <conftest.c if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then @@ -524,7 +526,7 @@ else ac_cv_prog_cc_g=no fi rm -f conftest* -])]) +])])# _AC_PROG_CC_G # AC_PROG_GCC_TRADITIONAL @@ -648,7 +650,7 @@ dnl normal versions of a library), tasteless as that idea is. ac_test_CXXFLAGS=${CXXFLAGS+set} ac_save_CXXFLAGS=$CXXFLAGS CXXFLAGS= -AC_PROG_CXX_G +_AC_PROG_CXX_G if test "$ac_test_CXXFLAGS" = set; then CXXFLAGS=$ac_save_CXXFLAGS elif test $ac_cv_prog_cxx_g = yes; then @@ -664,6 +666,8 @@ else CXXFLAGS= fi fi +AC_EXPAND_ONCE([_AC_EXEEXT]) +AC_EXPAND_ONCE([_AC_OBJEXT]) AC_LANG_POP ])# AC_PROG_CXX @@ -692,9 +696,9 @@ fi[]dnl ])# _AC_PROG_CXX_GNU -# AC_PROG_CXX_G +# _AC_PROG_CXX_G # ------------- -AC_DEFUN([AC_PROG_CXX_G], +define([_AC_PROG_CXX_G], [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 @@ -703,7 +707,7 @@ else ac_cv_prog_cxx_g=no fi rm -f conftest* -])])# AC_PROG_CXX_G +])])# _AC_PROG_CXX_G @@ -731,7 +735,7 @@ dnl normal versions of a library), tasteless as that idea is. ac_test_FFLAGS=${FFLAGS+set} ac_save_FFLAGS=$FFLAGS FFLAGS= -AC_PROG_F77_G +_AC_PROG_F77_G if test "$ac_test_FFLAGS" = set; then FFLAGS=$ac_save_FFLAGS elif test $ac_cv_prog_f77_g = yes; then @@ -747,6 +751,8 @@ else FFLAGS= fi fi +AC_EXPAND_ONCE([_AC_EXEEXT]) +AC_EXPAND_ONCE([_AC_OBJEXT]) AC_LANG_POP ])# AC_PROG_F77 @@ -776,11 +782,11 @@ fi[]dnl ])# _AC_PROG_F77_GNU -# AC_PROG_F77_G +# _AC_PROG_F77_G # ------------- # Test whether the Fortran 77 compiler can accept the `-g' option to # enable debugging. -AC_DEFUN([AC_PROG_F77_G], +define([_AC_PROG_F77_G], [AC_CACHE_CHECK(whether $F77 accepts -g, ac_cv_prog_f77_g, [cat >conftest.f <conftest.c if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then @@ -524,7 +526,7 @@ else ac_cv_prog_cc_g=no fi rm -f conftest* -])]) +])])# _AC_PROG_CC_G # AC_PROG_GCC_TRADITIONAL @@ -648,7 +650,7 @@ dnl normal versions of a library), tasteless as that idea is. ac_test_CXXFLAGS=${CXXFLAGS+set} ac_save_CXXFLAGS=$CXXFLAGS CXXFLAGS= -AC_PROG_CXX_G +_AC_PROG_CXX_G if test "$ac_test_CXXFLAGS" = set; then CXXFLAGS=$ac_save_CXXFLAGS elif test $ac_cv_prog_cxx_g = yes; then @@ -664,6 +666,8 @@ else CXXFLAGS= fi fi +AC_EXPAND_ONCE([_AC_EXEEXT]) +AC_EXPAND_ONCE([_AC_OBJEXT]) AC_LANG_POP ])# AC_PROG_CXX @@ -692,9 +696,9 @@ fi[]dnl ])# _AC_PROG_CXX_GNU -# AC_PROG_CXX_G +# _AC_PROG_CXX_G # ------------- -AC_DEFUN([AC_PROG_CXX_G], +define([_AC_PROG_CXX_G], [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 @@ -703,7 +707,7 @@ else ac_cv_prog_cxx_g=no fi rm -f conftest* -])])# AC_PROG_CXX_G +])])# _AC_PROG_CXX_G @@ -731,7 +735,7 @@ dnl normal versions of a library), tasteless as that idea is. ac_test_FFLAGS=${FFLAGS+set} ac_save_FFLAGS=$FFLAGS FFLAGS= -AC_PROG_F77_G +_AC_PROG_F77_G if test "$ac_test_FFLAGS" = set; then FFLAGS=$ac_save_FFLAGS elif test $ac_cv_prog_f77_g = yes; then @@ -747,6 +751,8 @@ else FFLAGS= fi fi +AC_EXPAND_ONCE([_AC_EXEEXT]) +AC_EXPAND_ONCE([_AC_OBJEXT]) AC_LANG_POP ])# AC_PROG_F77 @@ -776,11 +782,11 @@ fi[]dnl ])# _AC_PROG_F77_GNU -# AC_PROG_F77_G +# _AC_PROG_F77_G # ------------- # Test whether the Fortran 77 compiler can accept the `-g' option to # enable debugging. -AC_DEFUN([AC_PROG_F77_G], +define([_AC_PROG_F77_G], [AC_CACHE_CHECK(whether $F77 accepts -g, ac_cv_prog_f77_g, [cat >conftest.f <conftest.c if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then @@ -524,7 +526,7 @@ else ac_cv_prog_cc_g=no fi rm -f conftest* -])]) +])])# _AC_PROG_CC_G # AC_PROG_GCC_TRADITIONAL @@ -648,7 +650,7 @@ dnl normal versions of a library), tasteless as that idea is. ac_test_CXXFLAGS=${CXXFLAGS+set} ac_save_CXXFLAGS=$CXXFLAGS CXXFLAGS= -AC_PROG_CXX_G +_AC_PROG_CXX_G if test "$ac_test_CXXFLAGS" = set; then CXXFLAGS=$ac_save_CXXFLAGS elif test $ac_cv_prog_cxx_g = yes; then @@ -664,6 +666,8 @@ else CXXFLAGS= fi fi +AC_EXPAND_ONCE([_AC_EXEEXT]) +AC_EXPAND_ONCE([_AC_OBJEXT]) AC_LANG_POP ])# AC_PROG_CXX @@ -692,9 +696,9 @@ fi[]dnl ])# _AC_PROG_CXX_GNU -# AC_PROG_CXX_G +# _AC_PROG_CXX_G # ------------- -AC_DEFUN([AC_PROG_CXX_G], +define([_AC_PROG_CXX_G], [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 @@ -703,7 +707,7 @@ else ac_cv_prog_cxx_g=no fi rm -f conftest* -])])# AC_PROG_CXX_G +])])# _AC_PROG_CXX_G @@ -731,7 +735,7 @@ dnl normal versions of a library), tasteless as that idea is. ac_test_FFLAGS=${FFLAGS+set} ac_save_FFLAGS=$FFLAGS FFLAGS= -AC_PROG_F77_G +_AC_PROG_F77_G if test "$ac_test_FFLAGS" = set; then FFLAGS=$ac_save_FFLAGS elif test $ac_cv_prog_f77_g = yes; then @@ -747,6 +751,8 @@ else FFLAGS= fi fi +AC_EXPAND_ONCE([_AC_EXEEXT]) +AC_EXPAND_ONCE([_AC_OBJEXT]) AC_LANG_POP ])# AC_PROG_F77 @@ -776,11 +782,11 @@ fi[]dnl ])# _AC_PROG_F77_GNU -# AC_PROG_F77_G +# _AC_PROG_F77_G # ------------- # Test whether the Fortran 77 compiler can accept the `-g' option to # enable debugging. -AC_DEFUN([AC_PROG_F77_G], +define([_AC_PROG_F77_G], [AC_CACHE_CHECK(whether $F77 accepts -g, ac_cv_prog_f77_g, [cat >conftest.f < /dev/null \ + || cp -p $$d/$$file $(distdir)/$$file || :; \ fi; \ done info-am: @@ -206,7 +189,7 @@ uninstall: uninstall-am all-am: Makefile all-redirect: all-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_STRIP_FLAG=-s install + $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install installdirs: @@ -221,7 +204,6 @@ distclean-generic: -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) maintainer-clean-generic: - -rm -f Makefile.in mostlyclean-am: mostlyclean-generic mostlyclean: mostlyclean-am @@ -243,7 +225,7 @@ maintainer-clean: maintainer-clean-am .PHONY: tags distdir info-am info dvi-am dvi check-local check check-am \ installcheck-am installcheck install-exec-am install-exec \ install-data-am install-data install-am install uninstall-am uninstall \ -all-redirect all-am all install-strip installdirs mostlyclean-generic \ +all-redirect all-am all installdirs mostlyclean-generic \ distclean-generic clean-generic maintainer-clean-generic clean \ mostlyclean distclean maintainer-clean