This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[libstdc++] Kill CC, fix PACKAGE, properly quote variables in makefiles


First, this replaces $CC with $CXX in the configure; thought I did this
earlier, but clearly forgot.  We still can't get rid of the explicit
use of AC_PROG_CC, because libmath uses the C compiler in its makefile.
And even if we did, AC_PROG_CC is required by other macros, so the tests
are done anyhow.  We'll have to do the same un-precious kludge for these
as we're doing for CXX.

Also, some variable expansions lost their brace protection, probably
during the transition (mea culpa).  They're used in makefiles, so that's
a fatal error.  This fixes those.

Lastly, Akim pointed out that the 4-argument version of AC_INIT isn't
deprecated, and using it gets autoconf to properly set the PACKAGE variable,
used often elsewhere.


2003-08-11  Phil Edwards  <pme@gcc.gnu.org>

	* acinclude.m4:  Properly quote variable which will be expanded
	inside makefiles.  Use CXX instead of CC to extract compiler info.
	* configure.ac (AC_INIT):  Use the new 4-arg form to finally get the
	correct form in PACKAGE.
	* aclocal.m4, configure:  Regenerate.


Index: acinclude.m4
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/acinclude.m4,v
retrieving revision 1.260
diff -u -3 -p -r1.260 acinclude.m4
--- acinclude.m4	5 Aug 2003 20:54:42 -0000	1.260
+++ acinclude.m4	11 Aug 2003 05:21:51 -0000
@@ -106,6 +106,7 @@ AC_DEFUN(GLIBCXX_CONFIGURE, [
   #
   # -fno-builtin must be present here so that a non-conflicting form of
   # std::exit can be guessed by AC_PROG_CXX, and used in later tests.
+
   m4_define([ac_cv_prog_CXX],[glibcxx_cv_prog_CXX])
   m4_rename([_AC_ARG_VAR_PRECIOUS],[glibcxx_PRECIOUS])
   m4_define([_AC_ARG_VAR_PRECIOUS],[])
@@ -683,10 +684,10 @@ AC_DEFUN(GLIBCXX_EXPORT_INSTALL_INFO, [
     # and header files if --enable-version-specific-runtime-libs option
     # is selected.
     if test x"$gxx_include_dir" = x"no"; then
-      gxx_include_dir='$libdir/gcc-lib/$host_alias/'$gcc_version/include/c++
+      gxx_include_dir='${libdir}/gcc-lib/${host_alias}/'$gcc_version/include/c++
     fi
-    glibcxx_toolexecdir='$libdir/gcc-lib/$host_alias'
-    glibcxx_toolexeclibdir='$toolexecdir/'$gcc_version'$(MULTISUBDIR)'
+    glibcxx_toolexecdir='${libdir}/gcc-lib/${host_alias}'
+    glibcxx_toolexeclibdir='${toolexecdir}/'$gcc_version'$(MULTISUBDIR)'
   fi
 
   # Calculate glibcxx_toolexecdir, glibcxx_toolexeclibdir
@@ -694,13 +695,13 @@ AC_DEFUN(GLIBCXX_EXPORT_INSTALL_INFO, [
   if test x"$glibcxx_toolexecdir" = x"no"; then
     if test -n "$with_cross_host" &&
        test x"$with_cross_host" != x"no"; then
-      glibcxx_toolexecdir='$(exec_prefix)/$(host_alias)'
-      glibcxx_toolexeclibdir='$(toolexecdir)/lib'
+      glibcxx_toolexecdir='${exec_prefix}/${host_alias}'
+      glibcxx_toolexeclibdir='${toolexecdir}/lib'
     else
-      glibcxx_toolexecdir='$(libdir)/gcc-lib/$(host_alias)'
-      glibcxx_toolexeclibdir='$(libdir)'
+      glibcxx_toolexecdir='${libdir}/gcc-lib/${host_alias}'
+      glibcxx_toolexeclibdir='${libdir}'
     fi
-    multi_os_directory=`$CC -print-multi-os-directory`
+    multi_os_directory=`$CXX -print-multi-os-directory`
     case $multi_os_directory in
       .) ;; # Avoid trailing /.
       *) glibcxx_toolexeclibdir=$glibcxx_toolexeclibdir/$multi_os_directory ;;
@@ -1541,7 +1542,7 @@ dnl  _GLIBCXX_SUPPORTS_WEAK
 dnl
 AC_DEFUN(GLIBCXX_ENABLE_THREADS, [
   AC_MSG_CHECKING([for thread model used by GCC])
-  target_thread_file=`$CC -v 2>&1 | sed -n 's/^Thread model: //p'`
+  target_thread_file=`$CXX -v 2>&1 | sed -n 's/^Thread model: //p'`
   AC_MSG_RESULT([$target_thread_file])
 
   if test $target_thread_file != single; then
Index: configure.ac
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/configure.ac,v
retrieving revision 1.1
diff -u -3 -p -r1.1 configure.ac
--- configure.ac	5 Aug 2003 23:32:20 -0000	1.1
+++ configure.ac	11 Aug 2003 05:21:55 -0000
@@ -2,7 +2,7 @@
 # aclocal && autoconf && autoheader && automake
 
 AC_PREREQ(2.57)
-AC_INIT(libstdc++, version-unused)
+AC_INIT(package-unused, version-unused,, libstdc++)
 AC_CONFIG_SRCDIR(src/ios.cc)
 AC_CONFIG_HEADER(config.h)
 
@@ -44,17 +44,13 @@ target_alias=${target_alias-$host_alias}
 #  1.x:  minimum required version
 #  no-define:  PACKAGE and VERSION will not be #define'd in config.h (a bunch
 #              of other PACKAGE_* variables will, however, and there's nothing
-#              we can do about that)
+#              we can do about that; they come from AC_INIT).
 #  foreign:  we don't follow the normal rules for GNU packages (no COPYING
 #            file in the top srcdir, etc, etc), so stop complaining.
 #  no-dependencies:  turns off auto dependency generation (just for now)
 #  -Wall:  turns on all automake warnings
 AM_INIT_AUTOMAKE([1.7.6 no-define foreign no-dependencies -Wall])
 
-# AM_INIT_AUTOMAKE sets this to the "smashed" format.  Calling the library
-# "libstdc--" causes remarkable amounts of breakage.  Thanks, automake.
-PACKAGE='libstdc++'
-
 # Runs configure.host, finds CC, CXX, and assorted other critical bits.  Sets
 # up critical shell variables.
 GLIBCXX_CONFIGURE
@@ -332,4 +328,3 @@ AC_CONFIG_COMMANDS([default],
 
 dnl And this actually makes things happen:
 AC_OUTPUT
-


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]