* acspecific.m4 (_AC_OBJEXT): No longer use AC_COMPILE_IFELSE,

which uses $ac_objext hence depends upon _AC_OBJEXT.
* aclang.m4 (AC_PROG_CC, AC_PROG_CXX, AC_PROG_F77): Call
_AC_EXEEXT before _AC_OBJEXT since the former needs $ac_objext.
This commit is contained in:
Akim Demaille 2000-09-06 13:05:58 +00:00
parent 5aa6b910ce
commit d2cb51aef4
7 changed files with 51 additions and 36 deletions

View File

@ -1,3 +1,10 @@
2000-09-06 Morten Eriksen <mortene@sim.no>
* acspecific.m4 (_AC_OBJEXT): No longer use AC_COMPILE_IFELSE,
which uses $ac_objext hence depends upon _AC_OBJEXT.
* aclang.m4 (AC_PROG_CC, AC_PROG_CXX, AC_PROG_F77): Call
_AC_EXEEXT before _AC_OBJEXT since the former needs $ac_objext.
2000-09-06 Bernard Dautrevaux <dautrevaux@objectlive.com>
* acspecific.m4 (_AC_EXEEXT): Set extension to void if linking

View File

@ -238,7 +238,7 @@ AU_DEFUN([AC_LANG_FORTRAN77], [AC_LANG(Fortran 77)])
# AC_LANG_CONFTEST(BODY)
# ---------------------
# Save the BODY in `conftest.$acext'. Add a trailing new line.
# Save the BODY in `conftest.$ac_ext'. Add a trailing new line.
define([AC_LANG_CONFTEST],
[cat >conftest.$ac_ext <<_ACEOF
$1
@ -610,8 +610,8 @@ test -z "$CC" && AC_MSG_ERROR([no acceptable cc found in \$PATH])
_AC_LANG_COMPILER_WORKS
_AC_PROG_CC_GNU
_AC_PROG_CC_G
AC_EXPAND_ONCE([_AC_EXEEXT])
AC_EXPAND_ONCE([_AC_OBJEXT])
AC_EXPAND_ONCE([_AC_EXEEXT])
AC_LANG_POP
])# AC_PROG_CC
@ -802,8 +802,8 @@ AC_CHECK_TOOLS(CXX,
_AC_LANG_COMPILER_WORKS
_AC_PROG_CXX_GNU
_AC_PROG_CXX_G
AC_EXPAND_ONCE([_AC_EXEEXT])
AC_EXPAND_ONCE([_AC_OBJEXT])
AC_EXPAND_ONCE([_AC_EXEEXT])
AC_LANG_POP
])# AC_PROG_CXX
@ -901,9 +901,8 @@ AC_CHECK_TOOLS(F77,
_AC_LANG_COMPILER_WORKS
_AC_PROG_F77_GNU
_AC_PROG_F77_G
AC_EXPAND_ONCE([_AC_EXEEXT])
AC_EXPAND_ONCE([_AC_OBJEXT])
AC_EXPAND_ONCE([_AC_EXEEXT])
AC_LANG_POP
])# AC_PROG_F77

View File

@ -1588,16 +1588,22 @@ AC_SUBST(EXEEXT)dnl
# determined by ac_objext.
define([_AC_OBJEXT],
[AC_CACHE_CHECK([for object suffix], ac_cv_objext,
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM()],
[for ac_file in conftest.*; do
case $ac_file in
*.$ac_ext) ;;
*) ac_cv_objext=`echo $ac_file | sed s/conftest.//` ;;
esac
done],
[AC_MSG_ERROR([cannot compile])])])
[AC_LANG_CONFTEST([AC_LANG_PROGRAM()])
if AC_TRY_EVAL(ac_compile); then
for ac_file in conftest.*; do
case $ac_file in
*.$ac_ext) ;;
*) ac_cv_objext=`echo $ac_file | sed s/conftest.//` ;;
esac
done
else
rm -f conftest.$ac_ext
AC_MSG_ERROR([cannot compile])
fi
])
AC_SUBST(OBJEXT, $ac_cv_objext)dnl
ac_objext=$ac_cv_objext
rm -f conftest.$ac_objext conftest.$ac_ext
])# _AC_OBJEXT

View File

@ -238,7 +238,7 @@ AU_DEFUN([AC_LANG_FORTRAN77], [AC_LANG(Fortran 77)])
# AC_LANG_CONFTEST(BODY)
# ---------------------
# Save the BODY in `conftest.$acext'. Add a trailing new line.
# Save the BODY in `conftest.$ac_ext'. Add a trailing new line.
define([AC_LANG_CONFTEST],
[cat >conftest.$ac_ext <<_ACEOF
$1
@ -610,8 +610,8 @@ test -z "$CC" && AC_MSG_ERROR([no acceptable cc found in \$PATH])
_AC_LANG_COMPILER_WORKS
_AC_PROG_CC_GNU
_AC_PROG_CC_G
AC_EXPAND_ONCE([_AC_EXEEXT])
AC_EXPAND_ONCE([_AC_OBJEXT])
AC_EXPAND_ONCE([_AC_EXEEXT])
AC_LANG_POP
])# AC_PROG_CC
@ -802,8 +802,8 @@ AC_CHECK_TOOLS(CXX,
_AC_LANG_COMPILER_WORKS
_AC_PROG_CXX_GNU
_AC_PROG_CXX_G
AC_EXPAND_ONCE([_AC_EXEEXT])
AC_EXPAND_ONCE([_AC_OBJEXT])
AC_EXPAND_ONCE([_AC_EXEEXT])
AC_LANG_POP
])# AC_PROG_CXX
@ -901,9 +901,8 @@ AC_CHECK_TOOLS(F77,
_AC_LANG_COMPILER_WORKS
_AC_PROG_F77_GNU
_AC_PROG_F77_G
AC_EXPAND_ONCE([_AC_EXEEXT])
AC_EXPAND_ONCE([_AC_OBJEXT])
AC_EXPAND_ONCE([_AC_EXEEXT])
AC_LANG_POP
])# AC_PROG_F77

View File

@ -238,7 +238,7 @@ AU_DEFUN([AC_LANG_FORTRAN77], [AC_LANG(Fortran 77)])
# AC_LANG_CONFTEST(BODY)
# ---------------------
# Save the BODY in `conftest.$acext'. Add a trailing new line.
# Save the BODY in `conftest.$ac_ext'. Add a trailing new line.
define([AC_LANG_CONFTEST],
[cat >conftest.$ac_ext <<_ACEOF
$1
@ -610,8 +610,8 @@ test -z "$CC" && AC_MSG_ERROR([no acceptable cc found in \$PATH])
_AC_LANG_COMPILER_WORKS
_AC_PROG_CC_GNU
_AC_PROG_CC_G
AC_EXPAND_ONCE([_AC_EXEEXT])
AC_EXPAND_ONCE([_AC_OBJEXT])
AC_EXPAND_ONCE([_AC_EXEEXT])
AC_LANG_POP
])# AC_PROG_CC
@ -802,8 +802,8 @@ AC_CHECK_TOOLS(CXX,
_AC_LANG_COMPILER_WORKS
_AC_PROG_CXX_GNU
_AC_PROG_CXX_G
AC_EXPAND_ONCE([_AC_EXEEXT])
AC_EXPAND_ONCE([_AC_OBJEXT])
AC_EXPAND_ONCE([_AC_EXEEXT])
AC_LANG_POP
])# AC_PROG_CXX
@ -901,9 +901,8 @@ AC_CHECK_TOOLS(F77,
_AC_LANG_COMPILER_WORKS
_AC_PROG_F77_GNU
_AC_PROG_F77_G
AC_EXPAND_ONCE([_AC_EXEEXT])
AC_EXPAND_ONCE([_AC_OBJEXT])
AC_EXPAND_ONCE([_AC_EXEEXT])
AC_LANG_POP
])# AC_PROG_F77

View File

@ -238,7 +238,7 @@ AU_DEFUN([AC_LANG_FORTRAN77], [AC_LANG(Fortran 77)])
# AC_LANG_CONFTEST(BODY)
# ---------------------
# Save the BODY in `conftest.$acext'. Add a trailing new line.
# Save the BODY in `conftest.$ac_ext'. Add a trailing new line.
define([AC_LANG_CONFTEST],
[cat >conftest.$ac_ext <<_ACEOF
$1
@ -610,8 +610,8 @@ test -z "$CC" && AC_MSG_ERROR([no acceptable cc found in \$PATH])
_AC_LANG_COMPILER_WORKS
_AC_PROG_CC_GNU
_AC_PROG_CC_G
AC_EXPAND_ONCE([_AC_EXEEXT])
AC_EXPAND_ONCE([_AC_OBJEXT])
AC_EXPAND_ONCE([_AC_EXEEXT])
AC_LANG_POP
])# AC_PROG_CC
@ -802,8 +802,8 @@ AC_CHECK_TOOLS(CXX,
_AC_LANG_COMPILER_WORKS
_AC_PROG_CXX_GNU
_AC_PROG_CXX_G
AC_EXPAND_ONCE([_AC_EXEEXT])
AC_EXPAND_ONCE([_AC_OBJEXT])
AC_EXPAND_ONCE([_AC_EXEEXT])
AC_LANG_POP
])# AC_PROG_CXX
@ -901,9 +901,8 @@ AC_CHECK_TOOLS(F77,
_AC_LANG_COMPILER_WORKS
_AC_PROG_F77_GNU
_AC_PROG_F77_G
AC_EXPAND_ONCE([_AC_EXEEXT])
AC_EXPAND_ONCE([_AC_OBJEXT])
AC_EXPAND_ONCE([_AC_EXEEXT])
AC_LANG_POP
])# AC_PROG_F77

View File

@ -1588,16 +1588,22 @@ AC_SUBST(EXEEXT)dnl
# determined by ac_objext.
define([_AC_OBJEXT],
[AC_CACHE_CHECK([for object suffix], ac_cv_objext,
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM()],
[for ac_file in conftest.*; do
case $ac_file in
*.$ac_ext) ;;
*) ac_cv_objext=`echo $ac_file | sed s/conftest.//` ;;
esac
done],
[AC_MSG_ERROR([cannot compile])])])
[AC_LANG_CONFTEST([AC_LANG_PROGRAM()])
if AC_TRY_EVAL(ac_compile); then
for ac_file in conftest.*; do
case $ac_file in
*.$ac_ext) ;;
*) ac_cv_objext=`echo $ac_file | sed s/conftest.//` ;;
esac
done
else
rm -f conftest.$ac_ext
AC_MSG_ERROR([cannot compile])
fi
])
AC_SUBST(OBJEXT, $ac_cv_objext)dnl
ac_objext=$ac_cv_objext
rm -f conftest.$ac_objext conftest.$ac_ext
])# _AC_OBJEXT