[committed] Clean up libobjc configure, stage 1/n

Nathanael Nerode neroden@twcny.rr.com
Fri Apr 9 11:02:00 GMT 2004


Bootstrapping i686-pc-linux-gnu; will commit if it succeeds (I really
have no doubt that it will).

Further cleanups will follow, including the all-important autoconf 2.59
conversion.

	* configure.in: Hand-inline bulky, confusing macros from
	aclocal.m4.  Replace references to "GNU Objective C" with "GCC".
	Update copyright notice.  Remove stuff for automake, which isn't
	used in this directory.  Remove emacs local variables.
	* aclocal.m4: Remove macros hand-inlined into configure.in.
	Update and fix copyright notice.
	* configure: Regenerate.

Index: configure.in
===================================================================
RCS file: /cvs/gcc/gcc/libobjc/configure.in,v
retrieving revision 1.22
diff -u -r1.22 configure.in
--- configure.in	16 Mar 2004 10:45:26 -0000	1.22
+++ configure.in	9 Apr 2004 10:54:12 -0000
@@ -1,22 +1,22 @@
 # Process this file with autoconf to produce a configure script.
-#   Copyright (C) 1995, 1997, 1998, 1999, 2002, 2003, 2004
+#   Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2001, 2002, 2003, 2004
 #   Free Software Foundation, Inc.
-#   Contributed by Dave Love (d.love@dl.ac.uk).
+#   Originally contributed by Dave Love (d.love@dl.ac.uk).
 #
-#This file is part of GNU Objective C.
+#This file is part of GCC.
 #
-#GNU Objective C is free software; you can redistribute it and/or modify
+#GCC is free software; you can redistribute it and/or modify
 #it under the terms of the GNU General Public License as published by
 #the Free Software Foundation; either version 2, or (at your option)
 #any later version.
 #
-#GNU Objective C is distributed in the hope that it will be useful,
+#GCC is distributed in the hope that it will be useful,
 #but WITHOUT ANY WARRANTY; without even the implied warranty of
 #MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 #GNU General Public License for more details.
 #
 #You should have received a copy of the GNU General Public License
-#along with GNU Objective C; see the file COPYING.  If not, write to
+#along with GCC; see the file COPYING.  If not, write to
 #the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
 #02111-1307, USA.
 
@@ -30,21 +30,189 @@
 # exported.
 ORIGINAL_LD_FOR_MULTILIBS=$LD
 
-GLIBCPP_TOPREL_CONFIGURE
+dnl Default to --enable-multilib
+AC_ARG_ENABLE(multilib,
+  [  --enable-multilib       build hella library versions (default)],
+  [case "${enableval}" in
+    yes) multilib=yes ;;
+    no)  multilib=no ;;
+    *)   AC_MSG_ERROR(bad value ${enableval} for multilib option) ;;
+   esac], [multilib=yes])dnl
+
+# When building with srcdir == objdir, links to the source files will
+# be created in directories within the target_subdir.  We have to
+# adjust toplevel_srcdir accordingly, so that configure finds
+# install-sh and other auxiliary files that live in the top-level
+# source directory.
+if test "${srcdir}" = "."; then
+  if test -z "${with_target_subdir}"; then
+    toprel=".."
+  else
+    if test "${with_target_subdir}" != "."; then
+      toprel="${with_multisrctop}../.."
+    else
+      toprel="${with_multisrctop}.."
+    fi
+  fi
+else
+  toprel=".."
+fi
+AC_CONFIG_AUX_DIR(${srcdir}/$toprel)
+toplevel_srcdir=\${top_srcdir}/$toprel
+AC_SUBST(toplevel_srcdir)
 
 AC_CANONICAL_SYSTEM
 target_alias=${target_alias-$target}
 AC_SUBST(target_alias)
 
-GLIBCPP_CONFIGURE(.)
-GLIBCPP_EXPORT_INSTALL_INFO
+# Export build and source directories.
+# These need to be absolute paths, yet at the same time need to
+# canonicalize only relative paths, because then amd will not unmount
+# drives. Thus the use of PWDCMD: set it to 'pawd' or 'amq -w' if using amd.
+glibcpp_builddir=`${PWDCMD-pwd}`
+case $srcdir in
+[\\/$]* | ?:[\\/]*) glibcpp_srcdir=${srcdir} ;;
+*) glibcpp_srcdir=`cd "$srcdir" && ${PWDCMD-pwd} || echo "$srcdir"` ;;
+esac
+AC_SUBST(glibcpp_builddir)
+AC_SUBST(glibcpp_srcdir)
+
+# Will set LN_S to either 'ln -s' or 'ln'.  With autoconf 2.50+, can also
+# be 'cp -p' if linking isn't available.
+#ac_cv_prog_LN_S='cp -p'
+AC_PROG_LN_S
+
+# We use these options to decide which functions to include.
+AC_ARG_WITH(target-subdir,
+[  --with-target-subdir=SUBDIR
+                           configuring in a subdirectory])
+AC_ARG_WITH(cross-host,
+[  --with-cross-host=HOST  configuring with a cross compiler])
+
+  # Never versions of autoconf add an underscore to these functions.
+  # Prevent future problems ...
+  ifdef([AC_PROG_CC_G],[],[define([AC_PROG_CC_G],defn([_AC_PROG_CC_G]))])
+  ifdef([AC_PROG_CC_GNU],[],[define([AC_PROG_CC_GNU],defn([_AC_PROG_CC_GNU]))])
+  ifdef([AC_PROG_CXX_G],[],[define([AC_PROG_CXX_G],defn([_AC_PROG_CXX_G]))])
+  ifdef([AC_PROG_CXX_GNU],[],[define([AC_PROG_CXX_GNU],defn([_AC_PROG_CXX_GNU]))])
+
+#  AC_PROG_CC
+
+# FIXME: We temporarily define our own version of AC_PROG_CC.  This is
+# copied from autoconf 2.12, but does not call AC_PROG_CC_WORKS.  We
+# are probably using a cross compiler, which will not be able to fully
+# link an executable.  This should really be fixed in autoconf
+# itself.
+
+AC_DEFUN(LIB_AC_PROG_CC,
+[AC_BEFORE([$0], [AC_PROG_CPP])dnl
+dnl Fool anybody using AC_PROG_CC.
+AC_PROVIDE([AC_PROG_CC])
+AC_CHECK_PROG(CC, gcc, gcc)
+if test -z "$CC"; then
+  AC_CHECK_PROG(CC, cc, cc, , , /usr/ucb/cc)
+  test -z "$CC" && AC_MSG_ERROR([no acceptable cc found in \$PATH])
+fi
+
+AC_PROG_CC_GNU
+
+if test $ac_cv_prog_gcc = 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
+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
+  if test "$ac_test_CFLAGS" = set; then
+    CFLAGS="$ac_save_CFLAGS"
+  elif test $ac_cv_prog_cc_g = yes; then
+    CFLAGS="-g -O2"
+  else
+    CFLAGS="-O2"
+  fi
+else
+  GCC=
+  test "${CFLAGS+set}" = set || CFLAGS="-g"
+fi
+])
+
+LIB_AC_PROG_CC
+
+AC_CHECK_TOOL(AS, as)
+AC_CHECK_TOOL(AR, ar)
+AC_CHECK_TOOL(RANLIB, ranlib, ranlib-not-found-in-path-error)
+AC_PROG_INSTALL
+
+# Assumes glibcpp_builddir, glibcpp_srcdir are alreay set up and
+# exported correctly.
+glibcpp_toolexecdir=no
+glibcpp_toolexeclibdir=no
+glibcpp_prefixdir=${prefix}
+
+AC_MSG_CHECKING([for interface version number])
+libstdcxx_interface=$INTERFACE
+AC_MSG_RESULT($libstdcxx_interface)
+
+# Process the option "--enable-version-specific-runtime-libs"
+AC_MSG_CHECKING([for --enable-version-specific-runtime-libs])
+AC_ARG_ENABLE(version-specific-runtime-libs,
+[  --enable-version-specific-runtime-libs    Specify that runtime libraries should be installed in a compiler-specific directory ],
+[case "$enableval" in
+ yes) version_specific_libs=yes ;;
+ no)  version_specific_libs=no ;;
+ *)   AC_MSG_ERROR([Unknown argument to enable/disable version-specific libs]);;
+ esac],
+version_specific_libs=no)dnl
+# Option set, now we can test it.
+AC_MSG_RESULT($version_specific_libs)
+
+gcc_version_trigger=${srcdir}/../gcc/version.c
+gcc_version_full=`grep version_string ${gcc_version_trigger} | sed -e 's/.*\"\([[^ \"]]*\)[[ \"]].*/\1/'`
+gcc_version=`echo ${gcc_version_full} | sed -e 's/\([^ ]*\) .*/\1/'`
+AC_SUBST(gcc_version)
+AC_SUBST(gcc_version_trigger)
+
+if test $version_specific_libs = yes; then
+  # Need the gcc compiler version to know where to install libraries
+  # and header files if --enable-version-specific-runtime-libs option
+  # is selected.
+  changequote(,)dnl
+  glibcpp_toolexecdir='$(libdir)/gcc/$(target_alias)'
+  glibcpp_toolexeclibdir='$(toolexecdir)/'${gcc_version}'$(MULTISUBDIR)'
+  changequote([,])dnl
+fi
+
+# Calculate glibcpp_toolexecdir, glibcpp_toolexeclibdir
+# Install a library built with a cross compiler in tooldir, not libdir.
+if test x"$glibcpp_toolexecdir" = x"no"; then
+  if test -n "$with_cross_host" &&
+     test x"$with_cross_host" != x"no"; then
+    glibcpp_toolexecdir='$(exec_prefix)/$(target_alias)'
+    glibcpp_toolexeclibdir='$(toolexecdir)/lib'
+  else
+    glibcpp_toolexecdir='$(libdir)/gcc-lib/$(target_alias)'
+    glibcpp_toolexeclibdir='$(libdir)'
+  fi
+  multi_os_directory=`$CC -print-multi-os-directory`
+  case $multi_os_directory in
+  .) ;; # Avoid trailing /.
+  *) glibcpp_toolexeclibdir=$glibcpp_toolexeclibdir/$multi_os_directory ;;
+  esac
+fi
+
+AC_SUBST(glibcpp_prefixdir)
+AC_SUBST(glibcpp_toolexecdir)
+AC_SUBST(glibcpp_toolexeclibdir)
+
 
 dnl Checks for programs.
 
 # Disable shared libs by default
 AC_DISABLE_SHARED
-# Enable Win32 DLL on MS Windows - FIXME 
-AC_LIBTOOL_WIN32_DLL 
+# Enable Win32 DLL on MS Windows - FIXME
+AC_LIBTOOL_WIN32_DLL
 
 AC_PROG_LIBTOOL
 
@@ -124,10 +292,3 @@
 CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
 ORIGINAL_LD_FOR_MULTILIBS="${ORIGINAL_LD_FOR_MULTILIBS}"
 )
-
-
-dnl Local Variables:
-dnl comment-start: "dnl "
-dnl comment-end: ""
-dnl comment-start-skip: "\\bdnl\\b\\s *"
-dnl End:
Index: aclocal.m4
===================================================================
RCS file: /cvs/gcc/gcc/libobjc/aclocal.m4,v
retrieving revision 1.8
diff -u -r1.8 aclocal.m4
--- aclocal.m4	28 Aug 2003 01:15:06 -0000	1.8
+++ aclocal.m4	9 Apr 2004 10:54:12 -0000
@@ -1,4 +1,5 @@
-dnl Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
+dnl Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2001, 2004
+dnl Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -7,222 +8,6 @@
 dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
 dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
 dnl PARTICULAR PURPOSE.
-
-dnl
-dnl Initialize configure bits.
-dnl
-dnl GLIBCPP_TOPREL_CONFIGURE
-AC_DEFUN(GLIBCPP_TOPREL_CONFIGURE, [
-  dnl Default to --enable-multilib
-  AC_ARG_ENABLE(multilib,
-  [  --enable-multilib       build hella library versions (default)],
-  [case "${enableval}" in
-    yes) multilib=yes ;;
-    no)  multilib=no ;;
-    *)   AC_MSG_ERROR(bad value ${enableval} for multilib option) ;;
-   esac], [multilib=yes])dnl
-
-# When building with srcdir == objdir, links to the source files will
-# be created in directories within the target_subdir.  We have to
-# adjust toplevel_srcdir accordingly, so that configure finds
-# install-sh and other auxiliary files that live in the top-level
-# source directory.
-if test "${srcdir}" = "."; then
-  if test -z "${with_target_subdir}"; then
-    toprel=".."
-  else
-    if test "${with_target_subdir}" != "."; then
-      toprel="${with_multisrctop}../.."
-    else
-      toprel="${with_multisrctop}.."
-    fi
-  fi
-else
-  toprel=".."
-fi
-AC_CONFIG_AUX_DIR(${srcdir}/$toprel)
-toplevel_srcdir=\${top_srcdir}/$toprel
-AC_SUBST(toplevel_srcdir)
-])
-
-dnl
-dnl Initialize configure bits.
-dnl
-dnl GLIBCPP_CONFIGURE
-AC_DEFUN(GLIBCPP_CONFIGURE, [
-# Export build and source directories.
-# These need to be absolute paths, yet at the same time need to
-# canonicalize only relative paths, because then amd will not unmount
-# drives. Thus the use of PWDCMD: set it to 'pawd' or 'amq -w' if using amd.
-glibcpp_builddir=`${PWDCMD-pwd}`
-case $srcdir in
-[\\/$]* | ?:[\\/]*) glibcpp_srcdir=${srcdir} ;;
-*) glibcpp_srcdir=`cd "$srcdir" && ${PWDCMD-pwd} || echo "$srcdir"` ;;
-esac
-AC_SUBST(glibcpp_builddir)
-AC_SUBST(glibcpp_srcdir)
-
-dnl This is here just to satisfy automake.
-ifelse(not,equal,[AC_CONFIG_AUX_DIR(..)])
-
-# Will set LN_S to either 'ln -s' or 'ln'.  With autoconf 2.50+, can also
-# be 'cp -p' if linking isn't available.
-#ac_cv_prog_LN_S='cp -p'
-AC_PROG_LN_S
-
-# We use these options to decide which functions to include.
-AC_ARG_WITH(target-subdir,
-[  --with-target-subdir=SUBDIR
-                           configuring in a subdirectory])
-AC_ARG_WITH(cross-host,
-[  --with-cross-host=HOST  configuring with a cross compiler])
-
-  # Never versions of autoconf add an underscore to these functions.
-  # Prevent future problems ...
-  ifdef([AC_PROG_CC_G],[],[define([AC_PROG_CC_G],defn([_AC_PROG_CC_G]))])
-  ifdef([AC_PROG_CC_GNU],[],[define([AC_PROG_CC_GNU],defn([_AC_PROG_CC_GNU]))])
-  ifdef([AC_PROG_CXX_G],[],[define([AC_PROG_CXX_G],defn([_AC_PROG_CXX_G]))])
-  ifdef([AC_PROG_CXX_GNU],[],[define([AC_PROG_CXX_GNU],defn([_AC_PROG_CXX_GNU]))])
-
-#  AC_PROG_CC
-
-# FIXME: We temporarily define our own version of AC_PROG_CC.  This is
-# copied from autoconf 2.12, but does not call AC_PROG_CC_WORKS.  We
-# are probably using a cross compiler, which will not be able to fully
-# link an executable.  This should really be fixed in autoconf
-# itself.
-
-AC_DEFUN(LIB_AC_PROG_CC,
-[AC_BEFORE([$0], [AC_PROG_CPP])dnl
-dnl Fool anybody using AC_PROG_CC.
-AC_PROVIDE([AC_PROG_CC])
-AC_CHECK_PROG(CC, gcc, gcc)
-if test -z "$CC"; then
-  AC_CHECK_PROG(CC, cc, cc, , , /usr/ucb/cc)
-  test -z "$CC" && AC_MSG_ERROR([no acceptable cc found in \$PATH])
-fi
-
-AC_PROG_CC_GNU
-
-if test $ac_cv_prog_gcc = 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
-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
-  if test "$ac_test_CFLAGS" = set; then
-    CFLAGS="$ac_save_CFLAGS"
-  elif test $ac_cv_prog_cc_g = yes; then
-    CFLAGS="-g -O2"
-  else
-    CFLAGS="-O2"
-  fi
-else
-  GCC=
-  test "${CFLAGS+set}" = set || CFLAGS="-g"
-fi
-])
-
-LIB_AC_PROG_CC
-
-  AC_CHECK_TOOL(AS, as)
-  AC_CHECK_TOOL(AR, ar)
-  AC_CHECK_TOOL(RANLIB, ranlib, ranlib-not-found-in-path-error)
-  AC_PROG_INSTALL
-
-  # We need AC_EXEEXT to keep automake happy in cygnus mode.  However,
-  # at least currently, we never actually build a program, so we never
-  # need to use $(EXEEXT).  Moreover, the test for EXEEXT normally
-  # fails, because we are probably configuring with a cross compiler
-  # which can't create executables.  So we include AC_EXEEXT to keep
-  # automake happy, but we don't execute it, since we don't care about
-  # the result.
-  if false; then
-    # autoconf 2.50 runs AC_EXEEXT by default, and the macro expands
-    # to nothing, so nothing would remain between `then' and `fi' if it
-    # were not for the `:' below.
-    :
-    AC_EXEEXT
-  fi
-])
-
-
-dnl
-dnl  GLIBCPP_EXPORT_INSTALL_INFO
-dnl  calculates gxx_install_dir
-dnl  exports glibcpp_toolexecdir
-dnl  exports glibcpp_toolexeclibdir
-dnl  exports glibcpp_prefixdir
-dnl
-dnl Assumes cross_compiling bits already done, and with_cross_host in
-dnl particular
-dnl
-dnl GLIBCPP_EXPORT_INSTALL_INFO
-AC_DEFUN(GLIBCPP_EXPORT_INSTALL_INFO, [
-# Assumes glibcpp_builddir, glibcpp_srcdir are alreay set up and
-# exported correctly in GLIBCPP_CONFIGURE.
-glibcpp_toolexecdir=no
-glibcpp_toolexeclibdir=no
-glibcpp_prefixdir=${prefix}
-
-AC_MSG_CHECKING([for interface version number])
-libstdcxx_interface=$INTERFACE
-AC_MSG_RESULT($libstdcxx_interface)
-
-# Process the option "--enable-version-specific-runtime-libs"
-AC_MSG_CHECKING([for --enable-version-specific-runtime-libs])
-AC_ARG_ENABLE(version-specific-runtime-libs,
-[  --enable-version-specific-runtime-libs    Specify that runtime libraries should be installed in a compiler-specific directory ],
-[case "$enableval" in
- yes) version_specific_libs=yes ;;
- no)  version_specific_libs=no ;;
- *)   AC_MSG_ERROR([Unknown argument to enable/disable version-specific libs]);;
- esac],
-version_specific_libs=no)dnl
-# Option set, now we can test it.
-AC_MSG_RESULT($version_specific_libs)
-
-gcc_version_trigger=${srcdir}/../gcc/version.c
-gcc_version_full=`grep version_string ${gcc_version_trigger} | sed -e 's/.*\"\([[^ \"]]*\)[[ \"]].*/\1/'`
-gcc_version=`echo ${gcc_version_full} | sed -e 's/\([^ ]*\) .*/\1/'`
-AC_SUBST(gcc_version)
-AC_SUBST(gcc_version_trigger)
-
-if test $version_specific_libs = yes; then
-  # Need the gcc compiler version to know where to install libraries
-  # and header files if --enable-version-specific-runtime-libs option
-  # is selected.
-  changequote(,)dnl
-  glibcpp_toolexecdir='$(libdir)/gcc/$(target_alias)'
-  glibcpp_toolexeclibdir='$(toolexecdir)/'${gcc_version}'$(MULTISUBDIR)'
-  changequote([,])dnl
-fi
-
-# Calculate glibcpp_toolexecdir, glibcpp_toolexeclibdir
-# Install a library built with a cross compiler in tooldir, not libdir.
-if test x"$glibcpp_toolexecdir" = x"no"; then 
-  if test -n "$with_cross_host" &&
-     test x"$with_cross_host" != x"no"; then
-    glibcpp_toolexecdir='$(exec_prefix)/$(target_alias)'
-    glibcpp_toolexeclibdir='$(toolexecdir)/lib'
-  else
-    glibcpp_toolexecdir='$(libdir)/gcc-lib/$(target_alias)'
-    glibcpp_toolexeclibdir='$(libdir)'
-  fi
-  multi_os_directory=`$CC -print-multi-os-directory`
-  case $multi_os_directory in
-  .) ;; # Avoid trailing /.
-  *) glibcpp_toolexeclibdir=$glibcpp_toolexeclibdir/$multi_os_directory ;;
-  esac
-fi
-
-AC_SUBST(glibcpp_prefixdir)
-AC_SUBST(glibcpp_toolexecdir)
-AC_SUBST(glibcpp_toolexeclibdir)
-])
 
 sinclude(../libtool.m4)
 dnl The lines below arrange for aclocal not to bring an installed

-- 
Make sure your vote will count.
http://www.verifiedvoting.org/



More information about the Gcc-patches mailing list