GCC configure.in cleanup 2/n
Nathanael Nerode
neroden@twcny.rr.com
Sat Mar 1 03:18:00 GMT 2003
A first pass at putting configure.in in some sort of order. I'm quite
sure everything I moved is safe to move over the regions I moved them over.
Tested on i686-pc-linux-gnu.
* configure.in: Start to organize.
* configure: Regenerate.
--- configure.in 2003-02-28 22:03:42.000000000 -0500
+++ configure.in.new 2003-02-28 22:03:21.000000000 -0500
@@ -21,11 +21,20 @@
#Software Foundation, 59 Temple Place - Suite 330, Boston, MA
#02111-1307, USA.
-# Initialization and defaults
+# --------------------------------
+# Initialization and sanity checks
+# --------------------------------
+
AC_PREREQ(2.13)
AC_INIT(tree.c)
AC_CONFIG_HEADER(auto-host.h:config.in)
+# Determine the host, build, and target systems
+AC_CANONICAL_SYSTEM
+
+# Set program_transform_name
+AC_ARG_PROGRAM
+
# Check for bogus environment variables.
# Test if LIBRARY_PATH contains the notation for the current directory
# since this would lead to problems installing/building glibc.
@@ -79,7 +88,9 @@
*** and run configure again.])
fi
-# Check for additional parameters
+# -----------
+# Find linker
+# -----------
# With GNU ld
AC_ARG_WITH(gnu-ld,
@@ -101,6 +112,21 @@
[Define to enable the use of a default linker.])
fi
+AC_MSG_CHECKING([whether a default linker was specified])
+if test x"${DEFAULT_LINKER+set}" = x"set"; then
+ if test x"$gnu_ld_flag" = x"no"; then
+ AC_MSG_RESULT([yes ($DEFAULT_LINKER)])
+ else
+ AC_MSG_RESULT([yes ($DEFAULT_LINKER - GNU ld)])
+ fi
+else
+ AC_MSG_RESULT(no)
+fi
+
+# --------------
+# Find assembler
+# --------------
+
# With GNU as
AC_ARG_WITH(gnu-as,
[ --with-gnu-as arrange to work with GNU as],
@@ -120,6 +146,21 @@
[Define to enable the use of a default assembler.])
fi
+AC_MSG_CHECKING([whether a default assembler was specified])
+if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then
+ if test x"$gas_flag" = x"no"; then
+ AC_MSG_RESULT([yes ($DEFAULT_ASSEMBLER)])
+ else
+ AC_MSG_RESULT([yes ($DEFAULT_ASSEMBLER - GNU as)])
+ fi
+else
+ AC_MSG_RESULT(no)
+fi
+
+# --------
+# UNSORTED
+# --------
+
# With stabs
AC_ARG_WITH(stabs,
[ --with-stabs arrange to use stabs instead of host debug format],
@@ -172,11 +213,9 @@
fi
fi
-# Determine the host, build, and target systems
-AC_CANONICAL_SYSTEM
-
-# Set program_transform_name
-AC_ARG_PROGRAM
+# ---------------
+# Find C compiler
+# ---------------
# Find the native compiler
AC_PROG_CC
@@ -190,9 +229,6 @@
AC_SUBST(NO_MINUS_C_MINUS_O)
AC_SUBST(OUTPUT_OPTION)
-# See if GNAT has been installed
-gcc_AC_PROG_GNAT
-
AC_CACHE_CHECK(whether ${CC-cc} accepts -Wno-long-long,
ac_cv_prog_cc_no_long_long,
[save_CFLAGS="$CFLAGS"
@@ -201,6 +237,13 @@
ac_cv_prog_cc_no_long_long=no)
CFLAGS="$save_CFLAGS"])
+# -----------------
+# Find Ada compiler
+# -----------------
+
+# See if GNAT has been installed
+gcc_AC_PROG_GNAT
+
if test x$have_gnat != xno ; then
AC_CACHE_CHECK(whether ${ADAC} accepts -Wno-long-long,
ac_cv_prog_adac_no_long_long,
@@ -217,6 +260,10 @@
ac_cv_prog_adac_no_long_long=yes
fi
+# --------
+# UNSORTED
+# --------
+
strict1_warn=
if test $ac_cv_prog_cc_no_long_long = yes && \
test $ac_cv_prog_adac_no_long_long = yes ; then
@@ -540,28 +587,6 @@
AC_PROG_MAKE_SET
-AC_MSG_CHECKING([whether a default assembler was specified])
-if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then
- if test x"$gas_flag" = x"no"; then
- AC_MSG_RESULT([yes ($DEFAULT_ASSEMBLER)])
- else
- AC_MSG_RESULT([yes ($DEFAULT_ASSEMBLER - GNU as)])
- fi
-else
- AC_MSG_RESULT(no)
-fi
-
-AC_MSG_CHECKING([whether a default linker was specified])
-if test x"${DEFAULT_LINKER+set}" = x"set"; then
- if test x"$gnu_ld_flag" = x"no"; then
- AC_MSG_RESULT([yes ($DEFAULT_LINKER)])
- else
- AC_MSG_RESULT([yes ($DEFAULT_LINKER - GNU ld)])
- fi
-else
- AC_MSG_RESULT(no)
-fi
-
AC_MSG_CHECKING(for GNU C library)
AC_CACHE_VAL(gcc_cv_glibc,
[AC_TRY_COMPILE(
More information about the Gcc-patches
mailing list