[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Hurd's configure.in



On Sun, May 27, 2001 at 03:48:02PM -0400, Roland McGrath wrote:
> The current sources' configure.in works fine with autoconf-2.13.

Well, I think I have a handle on the situation. It does work with
autoconf-2.13 but not 2.50 which is the one in unstable right now.
Turns out that the macros that were giving me errors no longer
exist and must be replaced. After some struggle with autoconf
and its documentation, I came up with a patch which seems to fix
things.

The patch is attached, please review and apply.

Igor

Index: ChangeLog
===================================================================
RCS file: /cvs/hurd/ChangeLog,v
retrieving revision 1.88
diff -u -r1.88 ChangeLog
--- ChangeLog	2001/03/12 00:43:09	1.88
+++ ChangeLog	2001/05/27 20:27:47
@@ -1,3 +1,9 @@
+2001-05-27  Igor Khavkine <i_khavki@alcor.concordia.ca>
+
+	* aclocal.m4: removed the deprecated macros AC_PROG_CC_GNU
+	and AC_TRY_COMPILE by, respectively, _AC_LANG_COMPILER_GNU and
+	AC_TRY_RUN.
+
 2001-03-11  Roland McGrath  <roland@frob.com>
 
 	* Makeconf (%_S.h %Server.c): Split out an intermediate rule for the
Index: aclocal.m4
===================================================================
RCS file: /cvs/hurd/aclocal.m4,v
retrieving revision 1.2
diff -u -r1.2 aclocal.m4
--- aclocal.m4	1998/08/12 20:56:11	1.2
+++ aclocal.m4	2001/05/27 20:27:47
@@ -12,9 +12,9 @@
 fi
 
 hurd_PROG_CC_WORKS
-AC_PROG_CC_GNU
+_AC_LANG_COMPILER_GNU
 
-if test $ac_cv_prog_gcc = yes; then
+if test $ac_cv_c_compiler_gnu = yes; then
   GCC=yes
 dnl Check whether -g works, even if CFLAGS is set, in case the package
 dnl plays around with CFLAGS (such as to build both debugging and
@@ -56,10 +56,13 @@
 [AC_MSG_CHECKING([whether the C compiler ($CC $CFLAGS $LDFLAGS) works])
 AC_LANG_SAVE
 AC_LANG_C
-AC_TRY_COMPILER([main(){return(0);}], ac_cv_prog_cc_works, ac_cv_prog_cc_cross)
+AC_TRY_RUN([main(){return(0);}],
+  [ac_cv_prog_cc_works=yes;ac_cv_prog_cc_cross=no], 
+  [ac_cv_prog_cc_works=no;ac_cv_prog_cc_cross=no],
+	[ac_cv_prog_cc_works=no;ac_cv_prog_cc_cross=yes])
 AC_LANG_RESTORE
 AC_MSG_RESULT($ac_cv_prog_cc_works)
-if test $ac_cv_prog_cc_works = no; then
+if test "$ac_cv_prog_cc_works" = no; then
  cross_linkable=no
  ac_cv_prog_cc_cross=yes
  # AC_MSG_ERROR([installation or configuration problem: C compiler cannot create executables.])

Reply to: