comparison configure.in @ 96445:5028db972ce8

(cpp_undefs): Rename from `undefs', update uses. Use $srcdir rather than $top_srcdir. Set before calling AC_OUTPUT, and explicitly export there. (Bug#507.)
author Glenn Morris <rgm@gnu.org>
date Tue, 01 Jul 2008 02:55:31 +0000
parents ddedcecb18ef
children 7e97072e8c54
comparison
equal deleted inserted replaced
96444:7830512d2616 96445:5028db972ce8
2846 [test "${prefix}" != NONE && 2846 [test "${prefix}" != NONE &&
2847 prefix=`echo "${prefix}" | sed 's,\([^/]\)/*$,\1,'` 2847 prefix=`echo "${prefix}" | sed 's,\([^/]\)/*$,\1,'`
2848 test "${exec_prefix}" != NONE && 2848 test "${exec_prefix}" != NONE &&
2849 exec_prefix=`echo "${exec_prefix}" | sed 's,\([^/]\)/*$,\1,'`] 2849 exec_prefix=`echo "${exec_prefix}" | sed 's,\([^/]\)/*$,\1,'`]
2850 2850
2851 ## Check if the C preprocessor will convert `..' to `. .'. If so, set
2852 ## CPP_NEED_TRADITIONAL to `yes' so that the code to generate Makefile
2853 ## from Makefile.c can correctly provide the arg `-traditional' to the
2854 ## C preprocessor.
2855
2856 AC_EGREP_CPP(yes..yes,
2857 [yes..yes],
2858 CPP_NEED_TRADITIONAL=no,
2859 CPP_NEED_TRADITIONAL=yes)
2860
2861 AC_OUTPUT(Makefile lib-src/Makefile.c:lib-src/Makefile.in oldXMenu/Makefile \
2862 doc/emacs/Makefile doc/misc/Makefile doc/lispintro/Makefile \
2863 doc/lispref/Makefile src/Makefile.c:src/Makefile.in \
2864 lwlib/Makefile lisp/Makefile leim/Makefile, [
2865
2866 ### Make the necessary directories, if they don't exist.
2867 for dir in etc lisp ; do
2868 test -d ${dir} || mkdir ${dir}
2869 done
2870
2871 # Build src/Makefile from ${srcdir}/src/Makefile.c
2872 # and lib-src/Makefile from ${srcdir}/lib-src/Makefile.c
2873 # This must be done after src/config.h is built, since we rely on that file.
2874
2875 # Now get this: Some word that is part of the ${srcdir} directory name 2851 # Now get this: Some word that is part of the ${srcdir} directory name
2876 # or the ${configuration} value might, just might, happen to be an 2852 # or the ${configuration} value might, just might, happen to be an
2877 # identifier like `sun4' or `i386' or something, and be predefined by 2853 # identifier like `sun4' or `i386' or something, and be predefined by
2878 # the C preprocessor to some helpful value like 1, or maybe the empty 2854 # the C preprocessor to some helpful value like 1, or maybe the empty
2879 # string. Needless to say consequent macro substitutions are less 2855 # string. Needless to say consequent macro substitutions are less
2880 # than conducive to the makefile finding the correct directory. 2856 # than conducive to the makefile finding the correct directory.
2881 [undefs="`echo $top_srcdir $configuration $canonical | 2857 [cpp_undefs="`echo $srcdir $configuration $canonical |
2882 sed -e 's/[^a-zA-Z0-9_]/ /g' -e 's/^/ /' -e 's/ *$//' \ 2858 sed -e 's/[^a-zA-Z0-9_]/ /g' -e 's/^/ /' -e 's/ *$//' \
2883 -e 's/ */ -U/g' -e 's/-U[0-9][^ ]*//g' \ 2859 -e 's/ */ -U/g' -e 's/-U[0-9][^ ]*//g'`"]
2884 `"] 2860
2861 ## Check if the C preprocessor will convert `..' to `. .'. If so, set
2862 ## CPP_NEED_TRADITIONAL to `yes' so that the code to generate Makefile
2863 ## from Makefile.c can correctly provide the arg `-traditional' to the
2864 ## C preprocessor.
2865
2866 AC_EGREP_CPP(yes..yes,
2867 [yes..yes],
2868 CPP_NEED_TRADITIONAL=no,
2869 CPP_NEED_TRADITIONAL=yes)
2870
2871 AC_OUTPUT(Makefile lib-src/Makefile.c:lib-src/Makefile.in oldXMenu/Makefile \
2872 doc/emacs/Makefile doc/misc/Makefile doc/lispintro/Makefile \
2873 doc/lispref/Makefile src/Makefile.c:src/Makefile.in \
2874 lwlib/Makefile lisp/Makefile leim/Makefile, [
2875
2876 ### Make the necessary directories, if they don't exist.
2877 for dir in etc lisp ; do
2878 test -d ${dir} || mkdir ${dir}
2879 done
2880
2881 # Build src/Makefile from ${srcdir}/src/Makefile.c
2882 # and lib-src/Makefile from ${srcdir}/lib-src/Makefile.c
2883 # This must be done after src/config.h is built, since we rely on that file.
2885 2884
2886 echo creating src/epaths.h 2885 echo creating src/epaths.h
2887 ${MAKE-make} epaths-force 2886 ${MAKE-make} epaths-force
2888 2887
2889 # As of 2000-11-19, newest development versions of GNU cpp preprocess 2888 # As of 2000-11-19, newest development versions of GNU cpp preprocess
2899 sed -e '/start of cpp stuff/q' \ 2898 sed -e '/start of cpp stuff/q' \
2900 < Makefile.c > junk1.c 2899 < Makefile.c > junk1.c
2901 sed -e '1,/start of cpp stuff/d'\ 2900 sed -e '1,/start of cpp stuff/d'\
2902 -e 's,/\*\*/#\(.*\)$,/* \1 */,' \ 2901 -e 's,/\*\*/#\(.*\)$,/* \1 */,' \
2903 < Makefile.c > junk.c 2902 < Makefile.c > junk.c
2904 $CPP $undefs -I. -I$srcdir/src $CPPFLAGS junk.c | \ 2903 $CPP $cpp_undefs -I. -I$srcdir/src $CPPFLAGS junk.c | \
2905 sed -e 's/^ / /' -e '/^#/d' -e '/^[ ]*$/d' > junk2.c 2904 sed -e 's/^ / /' -e '/^#/d' -e '/^[ ]*$/d' > junk2.c
2906 cat junk1.c junk2.c > Makefile.new 2905 cat junk1.c junk2.c > Makefile.new
2907 rm -f junk.c junk1.c junk2.c 2906 rm -f junk.c junk1.c junk2.c
2908 chmod 444 Makefile.new 2907 chmod 444 Makefile.new
2909 mv -f Makefile.new Makefile 2908 mv -f Makefile.new Makefile
2915 sed -e '/start of cpp stuff/q' \ 2914 sed -e '/start of cpp stuff/q' \
2916 < Makefile.c > junk1.c 2915 < Makefile.c > junk1.c
2917 sed -e '1,/start of cpp stuff/d'\ 2916 sed -e '1,/start of cpp stuff/d'\
2918 -e 's,/\*\*/#\(.*\)$,/* \1 */,' \ 2917 -e 's,/\*\*/#\(.*\)$,/* \1 */,' \
2919 < Makefile.c > junk.c 2918 < Makefile.c > junk.c
2920 $CPP $undefs -I. -I$srcdir/src $CPPFLAGS junk.c | \ 2919 $CPP $cpp_undefs -I. -I$srcdir/src $CPPFLAGS junk.c | \
2921 sed -e 's/^ / /' -e '/^#/d' -e '/^[ ]*$/d' > junk2.c 2920 sed -e 's/^ / /' -e '/^#/d' -e '/^[ ]*$/d' > junk2.c
2922 cat junk1.c junk2.c > Makefile.new 2921 cat junk1.c junk2.c > Makefile.new
2923 rm -f junk.c junk1.c junk2.c 2922 rm -f junk.c junk1.c junk2.c
2924 chmod 444 Makefile.new 2923 chmod 444 Makefile.new
2925 mv -f Makefile.new Makefile 2924 mv -f Makefile.new Makefile
2928 if test ! -f src/.gdbinit && test -f $srcdir/src/.gdbinit; then 2927 if test ! -f src/.gdbinit && test -f $srcdir/src/.gdbinit; then
2929 echo creating src/.gdbinit 2928 echo creating src/.gdbinit
2930 echo source $srcdir/src/.gdbinit > src/.gdbinit 2929 echo source $srcdir/src/.gdbinit > src/.gdbinit
2931 fi 2930 fi
2932 2931
2933 ], [GCC="$GCC" NON_GNU_CPP="$NON_GNU_CPP" CPP="$CPP" CPP_NEED_TRADITIONAL="$CPP_NEED_TRADITIONAL" CPPFLAGS="$CPPFLAGS"]) 2932 ], [GCC="$GCC" NON_GNU_CPP="$NON_GNU_CPP" CPP="$CPP" CPP_NEED_TRADITIONAL="$CPP_NEED_TRADITIONAL" CPPFLAGS="$CPPFLAGS" cpp_undefs="$cpp_undefs"])
2934 2933
2935 m4_if(dnl Do not change this comment 2934 m4_if(dnl Do not change this comment
2936 arch-tag: 156a4dd5-bddc-4d18-96ac-f37742cf6a5e 2935 arch-tag: 156a4dd5-bddc-4d18-96ac-f37742cf6a5e
2937 )dnl 2936 )dnl