Mercurial > emacs
diff configure.in @ 108802:f1cd90ef7663
merge trunk
author | Kenichi Handa <handa@etlken> |
---|---|
date | Thu, 27 May 2010 16:08:37 +0900 |
parents | dedcf813aa69 |
children | bdbbcd45328f |
line wrap: on
line diff
--- a/configure.in Thu May 27 13:24:30 2010 +0900 +++ b/configure.in Thu May 27 16:08:37 2010 +0900 @@ -1468,8 +1468,6 @@ HAVE_NS=no NS_IMPL_COCOA=no NS_IMPL_GNUSTEP=no -NS_IMPL_GNUSTEP_INC= -NS_IMPL_GNUSTEP_TEMACS_LDFLAGS= tmp_CPPFLAGS="$CPPFLAGS" tmp_CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS -x objective-c" @@ -1491,24 +1489,20 @@ ns_appbindir=${ns_appdir} ns_appresdir=${ns_appdir}Resources ns_appsrc=${srcdir}/nextstep/GNUstep/Emacs.base - dnl FIXME sourcing this 3 times in subshells seems inefficient. - GNUSTEP_MAKEFILES="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_MAKEFILES)" + dnl FIXME sourcing this several times in subshells seems inefficient. GNUSTEP_SYSTEM_HEADERS="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_SYSTEM_HEADERS)" GNUSTEP_SYSTEM_LIBRARIES="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_SYSTEM_LIBRARIES)" - ## Pull in stuff from GNUstep-make. - ## FIXME? Cleaner to use AC_SUBST_FILE for this? - NS_IMPL_GNUSTEP_INC="FOUNDATION_LIB=gnu -GUI_LIB=gnu -include $GNUSTEP_MAKEFILES/Additional/base.make -include $GNUSTEP_MAKEFILES/Additional/gui.make -shared=no -" - dnl Presumably ${CONFIG_SYSTEM_LIBS} is defined by above includes. - NS_IMPL_GNUSTEP_TEMACS_LDFLAGS="-L${GNUSTEP_SYSTEM_LIBRARIES} -lgnustep-gui -lgnustep-base -lobjc \${CONFIG_SYSTEM_LIBS} -lpthread" - CPPFLAGS="$CPPFLAGS -I${GNUSTEP_SYSTEM_HEADERS}" - CFLAGS="$CFLAGS -I${GNUSTEP_SYSTEM_HEADERS}" - REAL_CFLAGS="$REAL_CFLAGS -I${GNUSTEP_SYSTEM_HEADERS}" - LDFLAGS="$LDFLAGS -L${GNUSTEP_SYSTEM_LIBRARIES}" + dnl I seemed to need these as well with GNUstep-startup 0.25. + GNUSTEP_LOCAL_HEADERS="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_LOCAL_HEADERS)" + GNUSTEP_LOCAL_LIBRARIES="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_LOCAL_LIBRARIES)" + test "x${GNUSTEP_LOCAL_HEADERS}" != "x" && \ + GNUSTEP_LOCAL_HEADERS="-I${GNUSTEP_LOCAL_HEADERS}" + test "x${GNUSTEP_LOCAL_LIBRARIES}" != "x" && \ + GNUSTEP_LOCAL_LIBRARIES="-L${GNUSTEP_LOCAL_LIBRARIES}" + CPPFLAGS="$CPPFLAGS -I${GNUSTEP_SYSTEM_HEADERS} ${GNUSTEP_LOCAL_HEADERS}" + CFLAGS="$CFLAGS -I${GNUSTEP_SYSTEM_HEADERS} ${GNUSTEP_LOCAL_HEADERS}" + REAL_CFLAGS="$REAL_CFLAGS -I${GNUSTEP_SYSTEM_HEADERS} ${GNUSTEP_LOCAL_HEADERS}" + LDFLAGS="$LDFLAGS -L${GNUSTEP_SYSTEM_LIBRARIES} ${GNUSTEP_LOCAL_LIBRARIES}" LIB_STANDARD= START_FILES= TEMACS_LDFLAGS2= @@ -1525,8 +1519,6 @@ NS_HAVE_NSINTEGER=no fi fi -AC_SUBST(NS_IMPL_GNUSTEP_INC) -AC_SUBST(NS_IMPL_GNUSTEP_TEMACS_LDFLAGS) AC_SUBST(TEMACS_LDFLAGS2) ns_frag=/dev/null @@ -3311,6 +3303,11 @@ *) LD_SWITCH_SYSTEM_TEMACS= ;; esac + +if test "$NS_IMPL_GNUSTEP" = "yes"; then + LD_SWITCH_SYSTEM_TEMACS="${LD_SWITCH_SYSTEM_TEMACS} -L${GNUSTEP_SYSTEM_LIBRARIES} ${GNUSTEP_LOCAL_LIBRARIES} -lgnustep-gui -lgnustep-base -lobjc -lpthread" +fi + AC_SUBST(LD_SWITCH_SYSTEM_TEMACS) @@ -3338,11 +3335,9 @@ ;; esac -## A macro which other sections of Makefile can redefine to munge the -## flags before they are passed to LD. This is helpful if you have -## redefined LD to something odd, like "gcc". -## (The YMF prefix is a holdover from the old name "ymakefile".) -YMF_PASS_LDFLAGS=flags + +PRE_EDIT_LDFLAGS= +POST_EDIT_LDFLAGS= if test "x$ORDINARY_LINK" = "xyes"; then LINKER="\$(CC)" @@ -3366,21 +3361,23 @@ ## shell''s ``for'' construct. Note that sane people do not have '.' in ## their paths, so we must use ./prefix-args. ## TODO either make prefix-args check ORDINARY_LINK internally, - ## or remove it altogether (bug#6184), removing the need for this macro. - YMF_PASS_LDFLAGS='`./prefix-args -Xlinker flags`' + ## or remove it altogether (bug#6184), removing the need for this hack. + PRE_EDIT_LDFLAGS='`./prefix-args -Xlinker' + POST_EDIT_LDFLAGS='`' fi -AC_SUBST(YMF_PASS_LDFLAGS) +AC_SUBST(PRE_EDIT_LDFLAGS) +AC_SUBST(POST_EDIT_LDFLAGS) test "x$LINKER" = "x" && LINKER=ld -## FIXME? What setting of YMF_PASS_LDFLAGS should this have? +## FIXME? What setting of EDIT_LDFLAGS should this have? test "$NS_IMPL_GNUSTEP" = "yes" && LINKER="\$(CC) -rdynamic" AC_SUBST(LINKER) -## FIXME? The logic here is not precisely the same as that above -## setting YMF_PASS_LDFLAGS. There is no check here for a pre-defined -## LINKER. Should we only be setting LIB_GCC if LD ~ -nostdlib? +## FIXME? The logic here is not precisely the same as that above. +## There is no check here for a pre-defined LINKER. +## Should we only be setting LIB_GCC if LD ~ -nostdlib? LIB_GCC= if test "x$GCC" = "xyes" && test "x$ORDINARY_LINK" != "xyes"; then @@ -3758,32 +3755,9 @@ test "${exec_prefix}" != NONE && exec_prefix=`echo "${exec_prefix}" | sed 's,\([^/]\)/*$,\1,'`] -# Now get this: Some word that is part of the ${srcdir} directory name -# or the ${configuration} value might, just might, happen to be an -# identifier like `sun4' or `i386' or something, and be predefined by -# the C preprocessor to some helpful value like 1, or maybe the empty -# string. Needless to say consequent macro substitutions are less -# than conducive to the makefile finding the correct directory. -# src/Makefile.in used to treat X11 as equivalent to HAVE_X11. -# But nothing in Emacs defines X11, and everywhere else uses HAVE_X11, -# so that cannot have been doing anything. -[cpp_undefs="`echo $srcdir $configuration $canonical unix mktime register X11 | - sed -e 's/[^a-zA-Z0-9_]/ /g' -e 's/^/ /' -e 's/ *$//' \ - -e 's/ */ -U/g' -e 's/-U[0-9][^ ]*//g'`"] - -## Check if the C preprocessor will convert `..' to `. .'. If so, set -## CPP_NEED_TRADITIONAL to `yes' so that the code to generate Makefile -## from Makefile.c can correctly provide the arg `-traditional' to the -## C preprocessor. - -AC_EGREP_CPP(yes..yes, - [yes..yes], - CPP_NEED_TRADITIONAL=no, - CPP_NEED_TRADITIONAL=yes) - AC_OUTPUT(Makefile lib-src/Makefile oldXMenu/Makefile \ doc/emacs/Makefile doc/misc/Makefile doc/lispintro/Makefile \ - doc/lispref/Makefile src/Makefile.c:src/Makefile.in \ + doc/lispref/Makefile src/Makefile \ lwlib/Makefile lisp/Makefile leim/Makefile, [ ### Make the necessary directories, if they don't exist. @@ -3791,41 +3765,15 @@ test -d ${dir} || mkdir ${dir} done -# Build src/Makefile from ${srcdir}/src/Makefile.c -# This must be done after src/config.h is built, since we rely on that file. - echo creating src/epaths.h ${MAKE-make} epaths-force -# As of 2000-11-19, newest development versions of GNU cpp preprocess -# `..' to `. .' unless invoked with -traditional - -if test "x$GCC" = xyes && test "x$CPP_NEED_TRADITIONAL" = xyes; then - CPPFLAGS="$CPPFLAGS -traditional" -fi - -echo creating src/Makefile -( cd src - rm -f junk.c junk1.c junk2.c - sed -e '/start of cpp stuff/q' \ - < Makefile.c > junk1.c - sed -e '1,/start of cpp stuff/d'\ - -e 's,/\*\*/#\(.*\)$,/* \1 */,' \ - < Makefile.c > junk.c - $CPP -P $cpp_undefs -I. -I$srcdir/src $CPPFLAGS junk.c | \ - sed -e 's/^ / /' -e '/^#/d' -e '/^[ ]*$/d' > junk2.c - cat junk1.c junk2.c > Makefile.new - rm -f junk.c junk1.c junk2.c - chmod 444 Makefile.new - mv -f Makefile.new Makefile -) - if test ! -f src/.gdbinit && test -f $srcdir/src/.gdbinit; then echo creating src/.gdbinit echo source $srcdir/src/.gdbinit > src/.gdbinit fi -], [GCC="$GCC" NON_GNU_CPP="$NON_GNU_CPP" CPP="$CPP" CPP_NEED_TRADITIONAL="$CPP_NEED_TRADITIONAL" CPPFLAGS="$CPPFLAGS" cpp_undefs="$cpp_undefs"]) +], [GCC="$GCC" NON_GNU_CPP="$NON_GNU_CPP" CPP="$CPP" CPPFLAGS="$CPPFLAGS"]) m4_if(dnl Do not change this comment arch-tag: 156a4dd5-bddc-4d18-96ac-f37742cf6a5e