Arrange for C compilation throughout the tree to get
authorJim Blandy <jimb@redhat.com>
Thu, 25 Mar 1993 03:51:20 +0000 (03:51 +0000)
committerJim Blandy <jimb@redhat.com>
Thu, 25 Mar 1993 03:51:20 +0000 (03:51 +0000)
C_SWITCH_SYSTEM from the configuration files.
* configure: Extract C_SWITCH_SYSTEM from the machine and
system-dependent files, and save it in the top-level Makefile.
* Makefile.in (C_SWITCH_SYSTEM): New flag for configure to edit.
(lib-src/Makefile): Edit C_SWITCH_SYSTEM into lib-src/Makefile.

Makefile.in
configure1.in

index 079e584..2c75276 100644 (file)
@@ -42,6 +42,7 @@ MAKE = make  # BSD doesn't have it as a default.
 
 CC=cc
 CONFIG_CFLAGS=-g
+C_SWITCH_SYSTEM=
 
 ### These help us choose version- and architecture-specific directories
 ### to install files in.
@@ -253,6 +254,7 @@ lib-src/Makefile: ${srcdir}/lib-src/Makefile.in Makefile
         -e 's|^\(archlibdir *=\).*$$|\1'"${archlibdir}"'|'             \
         -e 's|^CC *=.*$$|CC='"${CC}"'|'                                \
         -e 's|^CONFIG_CFLAGS *=.*$$|CONFIG_CFLAGS='"${CONFIG_CFLAGS}"'|' \
+        -e 's|^C_SWITCH_SYSTEM *=.*$$|C_SWITCH_SYSTEM='"${C_SWITCH_SYSTEM}"'|' \
         -e 's|^LOADLIBES *=.*$$|LOADLIBES='"${libsrc_libs}"'|'         \
         -e '/^# DIST: /d') > lib-src/Makefile.tmp
        ${srcdir}/move-if-change lib-src/Makefile.tmp lib-src/Makefile
index e6f7aa9..6c5b397 100755 (executable)
@@ -944,7 +944,11 @@ echo '
 #ifndef LIBS_SYSTEM
 #define LIBS_SYSTEM
 #endif
+#ifndef C_SWITCH_SYSTEM
+#define C_SWITCH_SYSTEM
+#endf
 @configure@ libsrc_libs=LIBS_MACHINE LIBS_SYSTEM
+@configure@ c_switch_system=C_SWITCH_SYSTEM
 #ifdef SYSTEM_MALLOC
 @configure@ system_malloc=yes
 #else
@@ -1027,13 +1031,14 @@ rm -f Makefile.tmp
 # If you are thinking about editing it, you should seriously consider
 # running \`${progname}' instead, or editing
 # \`${srcdir}/Makefile.in' itself."
- /bin/sed < ${srcdir}/Makefile.in                              \
- -e 's|^configname *=.*$|configname='"${configuration}"'|'     \
- -e 's|^version *=.*$|version='"${version}"'|'                 \
- -e 's|^srcdir *=.*$|srcdir='"${srcdir}"'|'                    \
- -e 's|^CC *=.*$|CC='"${default_cc}"'|'                        \
+ /bin/sed < ${srcdir}/Makefile.in                                      \
+ -e 's|^configname *=.*$|configname='"${configuration}"'|'             \
+ -e 's|^version *=.*$|version='"${version}"'|'                                 \
+ -e 's|^srcdir *=.*$|srcdir='"${srcdir}"'|'                            \
+ -e 's|^CC *=.*$|CC='"${default_cc}"'|'                                        \
  -e 's|^CONFIG_CFLAGS *=.*$|CONFIG_CFLAGS='"${default_cflags}"'|'      \
- -e 's|^LOADLIBES *=.*$|LOADLIBES='"${libsrc_libs}"'|' \
+ -e 's|^C_SWITCH_SYSTEM *=.*$|C_SWITCH_SYSTEM='"${c_switch_system}"'|' \
+ -e 's|^LOADLIBES *=.*$|LOADLIBES='"${libsrc_libs}"'|'                 \
  -e '/^# DIST: /d') > Makefile.tmp
 ${srcdir}/move-if-change Makefile.tmp Makefile