Mercurial > emacs
comparison configure.in @ 109074:c97bf1cfaa8d
Remove last internal use of cpp and src/{m,s}/*.h files in configure.in.
* configure.in (CFLAGS, REAL_CFLAGS): Set with shell, not cpp.
* configure, src/config.in: Regenerate.
author | Glenn Morris <rgm@gnu.org> |
---|---|
date | Tue, 29 Jun 2010 19:55:15 -0700 |
parents | 6799ec1a7188 |
children | 48064019239b |
comparison
equal
deleted
inserted
replaced
109073:6799ec1a7188 | 109074:c97bf1cfaa8d |
---|---|
835 AC_LINK_IFELSE([main(){return 0;}], | 835 AC_LINK_IFELSE([main(){return 0;}], |
836 [AC_MSG_RESULT(yes)], | 836 [AC_MSG_RESULT(yes)], |
837 LDFLAGS=$late_LDFLAGS | 837 LDFLAGS=$late_LDFLAGS |
838 [AC_MSG_RESULT(no)]) | 838 [AC_MSG_RESULT(no)]) |
839 | 839 |
840 #### Extract some information from the operating system and machine files. | 840 LDFLAGS="${LDFLAGS} ${PROFILING_LDFLAGS}" |
841 | 841 |
842 AC_CHECKING([the machine- and system-dependent files to find out | 842 |
843 - which libraries the lib-src programs will want, and | 843 # The value of CPP is a quoted variable reference, so we need to do this |
844 - whether the GNU malloc routines are usable]) | 844 # to get its actual value... |
845 CPP=`eval "echo $CPP"` | |
846 | |
845 | 847 |
846 ### First figure out CFLAGS (which we use for running the compiler here) | 848 ### First figure out CFLAGS (which we use for running the compiler here) |
847 ### and REAL_CFLAGS (which we use for real compilation). | 849 ### and REAL_CFLAGS (which we use for real compilation). |
848 ### The two are the same except on a few systems, where they are made | 850 ### The two are the same except on a few systems, where they are made |
849 ### different to work around various lossages. For example, | 851 ### different to work around various lossages. For example, |
851 ### as implying static linking. | 853 ### as implying static linking. |
852 | 854 |
853 ### If the CFLAGS env var is specified, we use that value | 855 ### If the CFLAGS env var is specified, we use that value |
854 ### instead of the default. | 856 ### instead of the default. |
855 | 857 |
856 ### It's not important that this name contain the PID; you can't run | 858 dnl C_OPTIMIZE_SWITCH unused save for gcc, so why set it for non-gcc? |
857 ### two configures in the same directory and have anything work | 859 dnl Note AC_PROG_CC sets CFLAGS to -g -O2 for gcc anyway. |
858 ### anyway. | |
859 tempcname="conftest.c" | |
860 | |
861 echo ' | |
862 #include "'${srcdir}'/src/'${opsysfile}'" | |
863 #include "'${srcdir}'/src/'${machfile}'" | |
864 | |
865 #ifdef THIS_IS_CONFIGURE | |
866 | |
867 /* Get the CFLAGS for tests in configure. */ | |
868 #ifdef __GNUC__ | |
869 configure___ CFLAGS=-g ${C_OPTIMIZE_SWITCH} '${SPECIFIED_CFLAGS}' | |
870 #else | |
871 configure___ CFLAGS='${SPECIFIED_CFLAGS}' | |
872 #endif | |
873 | |
874 #else /* not THIS_IS_CONFIGURE */ | |
875 | |
876 /* Get the CFLAGS for real compilation. */ | |
877 #ifdef __GNUC__ | |
878 configure___ REAL_CFLAGS=-g ${C_OPTIMIZE_SWITCH} ${C_WARNINGS_SWITCH} ${PROFILING_CFLAGS} '${SPECIFIED_CFLAGS}' | |
879 #else | |
880 configure___ REAL_CFLAGS='${SPECIFIED_CFLAGS}' | |
881 #endif | |
882 | |
883 #endif /* not THIS_IS_CONFIGURE */ | |
884 ' > ${tempcname} | |
885 | |
886 LDFLAGS="${LDFLAGS} ${PROFILING_LDFLAGS}" | |
887 | |
888 # The value of CPP is a quoted variable reference, so we need to do this | |
889 # to get its actual value... | |
890 CPP=`eval "echo $CPP"` | |
891 [eval `${CPP} -Isrc ${tempcname} \ | |
892 | sed -n -e 's/^configure___ \([^=]*=\)\(.*\)$/\1"\2"/p'` | |
893 if test "x$SPECIFIED_CFLAGS" = x; then | 860 if test "x$SPECIFIED_CFLAGS" = x; then |
894 eval `${CPP} -Isrc -DTHIS_IS_CONFIGURE ${tempcname} \ | 861 if test x$GCC = xyes; then |
895 | sed -n -e 's/^configure___ \([^=]*=\)\(.*\)$/\1"\2"/p'` | 862 CFLAGS="-g $C_OPTIMIZE_SWITCH" |
863 REAL_CFLAGS="$CFLAGS $C_WARNINGS_SWITCH $PROFILING_CFLAGS" | |
864 else | |
865 CFLAGS= | |
866 REAL_CFLAGS= | |
867 fi | |
896 else | 868 else |
897 REAL_CFLAGS="$CFLAGS" | 869 REAL_CFLAGS="$CFLAGS" |
898 fi] | 870 fi |
899 rm ${tempcname} | |
900 | 871 |
901 | 872 |
902 dnl Not used by any currently supported platform. | 873 dnl Not used by any currently supported platform. |
903 dnl The function dump-emacs will not be defined and temacs will do | 874 dnl The function dump-emacs will not be defined and temacs will do |
904 dnl (load "loadup") automatically unless told otherwise. | 875 dnl (load "loadup") automatically unless told otherwise. |