aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJim Blandy1993-05-09 22:52:15 +0000
committerJim Blandy1993-05-09 22:52:15 +0000
commite447481751bcdc3c913a03e3dc80ad6a659269dd (patch)
tree9763016577162ba1736be3bcfb050f0dbc2a597d
parentb6472fc16bba795fc499314f8264c3518945bfa0 (diff)
downloademacs-e447481751bcdc3c913a03e3dc80ad6a659269dd.tar.gz
emacs-e447481751bcdc3c913a03e3dc80ad6a659269dd.zip
The GNU coding standards specify that CFLAGS should be left for
users to set. * Makefile.in (CFLAGS): Let configure determine the default value for this. Don't have it default to DEFS. (${SUBDIR}): Pass CFLAGS down to submakes, not DEFS. (lib-src/Makefile, src/Makefile): Edit the default value for CFLAGS into these files, not DEFS. * configure.in (CFLAGS): Choose a default value for this - "-g" normally, or "-g -O" if we're using GCC. Edit it into the top-level Makefile. * configure.in: When scanning the machine and system description #include files, write their names to conftest.c properly. * configure.in: In configuration name case for Apallos running Domainios, set opsys, not opsysfile. * configure.in: Use the autoconf AC_CONFIG_HEADER macro to produce src/config.h, instead of AC_OUTPUT; the latter overwrites src/config.h even when it hasn't changed, puts a makefile-style comment at the top even though it's C code, and produces a config.status script which doesn't do the job right. * configure.in: Add AC_LN_S test, so we can tell whether or not we can use a symbolic link to get the X Menu library into src. * Makefile.in (LN_S): New variable. (src/Makefile): Edit the value of LN_S into this makefile.
-rwxr-xr-xconfigure1.in37
1 files changed, 16 insertions, 21 deletions
diff --git a/configure1.in b/configure1.in
index db232e2f152..6aa4967d2b7 100755
--- a/configure1.in
+++ b/configure1.in
@@ -382,7 +382,7 @@ case "${configuration}" in
382 382
383 ## Appallings - I mean, Apollos - running Domain 383 ## Appallings - I mean, Apollos - running Domain
384 m68*-apollo* ) 384 m68*-apollo* )
385 machine=apollo opsysfile=bsd4-2.h 385 machine=apollo opsys=bsd4-2
386 ;; 386 ;;
387 387
388 ## AT&T 3b2, 3b5, 3b15, 3b20 388 ## AT&T 3b2, 3b5, 3b15, 3b20
@@ -798,25 +798,25 @@ opsysfile="s/${opsys}.h"
798 798
799] 799]
800AC_PREPARE(lisp) 800AC_PREPARE(lisp)
801AC_CONFIG_HEADER(src/config.h)
801[ 802[
802 803
803#### Choose a compiler. 804#### Choose a compiler.
804DEFS=-g
805case ${with_gcc} in 805case ${with_gcc} in
806 "yes" ) CC="gcc" GCC=1 ;; 806 "yes" ) CC="gcc" GCC=1 ;;
807 "no" ) CC="cc" ;; 807 "no" ) CC="cc" ;;
808 * ) 808 * )
809] 809 ] AC_PROG_CC [
810AC_PROG_CC
811[
812esac 810esac
813 811
814if [ "${GCC}" != "" ]; then 812CFLAGS='-g'
815 DEFS="${DEFS} -O" 813if test -n "${GCC}"; then
814 CFLAGS='-g -O'
816fi 815fi
817 816
818#### Some other nice autoconf tests. 817#### Some other nice autoconf tests.
819] 818]
819AC_LN_S
820AC_PROG_CPP 820AC_PROG_CPP
821AC_HAVE_HEADERS(sys/timeb.h sys/time.h) 821AC_HAVE_HEADERS(sys/timeb.h sys/time.h)
822AC_RETSIGTYPE 822AC_RETSIGTYPE
@@ -979,19 +979,23 @@ if [ ! "${version}" ]; then
979fi 979fi
980 980
981 981
982#### Specify what sort of things we'll be editing into our Makefiles. 982#### Specify what sort of things we'll be editing into Makefile and config.h.
983] 983]
984AC_SUBST(configuration) 984AC_SUBST(configuration)
985AC_SUBST(version) 985AC_SUBST(version)
986AC_SUBST(srcdir) 986AC_SUBST(srcdir)
987AC_SUBST(c_switch_system) 987AC_SUBST(c_switch_system)
988AC_SUBST(libsrc_libs) 988AC_SUBST(libsrc_libs)
989AC_SUBST(machfile)
990AC_SUBST(opsysfile)
991AC_SUBST(rip_paths) 989AC_SUBST(rip_paths)
992AC_SUBST(inst_paths) 990AC_SUBST(inst_paths)
993AC_SUBST(LD_SWITCH_X_SITE) 991AC_SUBST(LD_SWITCH_X_SITE)
994AC_SUBST(C_SWITCH_X_SITE) 992AC_SUBST(C_SWITCH_X_SITE)
993AC_SUBST(CFLAGS)
994
995AC_DEFINE(config_machfile, \"${machfile}\")
996AC_DEFINE(config_opsysfile, \"${opsysfile}\")
997AC_DEFINE(LD_SWITCH_X_SITE, ${LD_SWITCH_X_SITE})
998AC_DEFINE(C_SWITCH_X_SITE, ${C_SWITCH_X_SITE})
995[ 999[
996if [ "${HAVE_X_WINDOWS}" = "yes" ] ; then 1000if [ "${HAVE_X_WINDOWS}" = "yes" ] ; then
997 ] AC_DEFINE(HAVE_X_WINDOWS) [ 1001 ] AC_DEFINE(HAVE_X_WINDOWS) [
@@ -1023,7 +1027,7 @@ Configured for \`${configuration}'.
1023 1027
1024 What operating system and machine description files should Emacs use? 1028 What operating system and machine description files should Emacs use?
1025 \`${opsysfile}' and \`${machfile}' 1029 \`${opsysfile}' and \`${machfile}'
1026 What compiler should emacs be built with? ${CC} -g 1030 What compiler should emacs be built with? ${CC} ${CFLAGS}
1027 Should Emacs use the GNU version of malloc? ${GNU_MALLOC}${GNU_MALLOC_reason} 1031 Should Emacs use the GNU version of malloc? ${GNU_MALLOC}${GNU_MALLOC_reason}
1028 Should Emacs use the relocating allocator for buffers? ${REL_ALLOC} 1032 Should Emacs use the relocating allocator for buffers? ${REL_ALLOC}
1029 What window system should Emacs use? ${window_system}${x_includes+ 1033 What window system should Emacs use? ${window_system}${x_includes+
@@ -1036,13 +1040,4 @@ Configured for \`${configuration}'.
1036### in the config.status file. 1040### in the config.status file.
1037set - ${arguments} 1041set - ${arguments}
1038] 1042]
1039AC_OUTPUT(Makefile src/config.h) 1043AC_OUTPUT(Makefile)
1040[
1041
1042### Autoconf likes to add a Makefile comment to the top of
1043### src/config.h. Do you have a better idea?
1044(cd src
1045 sed < config.h > conftemp.$$ '1d'
1046 mv conftemp.$$ config.h)
1047
1048]