X-Git-Url: https://git.hcoop.net/bpt/emacs.git/blobdiff_plain/47223c041363ff7b940a3e0ca37b64ec4fe1be92..17284e30244d0dd635708cec51e19bafcd9a528b:/configure.in diff --git a/configure.in b/configure.in index fcd2faa767..43c0513c22 100644 --- a/configure.in +++ b/configure.in @@ -155,6 +155,8 @@ OPTION_DEFAULT_ON([tiff],[don't compile with TIFF image support]) OPTION_DEFAULT_ON([gif],[don't compile with GIF image support]) OPTION_DEFAULT_ON([png],[don't compile with PNG image support]) OPTION_DEFAULT_ON([rsvg],[don't compile with SVG image support]) +OPTION_DEFAULT_ON([xml2],[don't compile with XML parsing support]) +OPTION_DEFAULT_ON([imagemagick],[don't compile with ImageMagick image support]) OPTION_DEFAULT_ON([xft],[don't use XFT for anti aliased fonts]) OPTION_DEFAULT_ON([libotf],[don't use libotf for OpenType font support]) @@ -169,6 +171,7 @@ OPTION_DEFAULT_ON([gpm],[don't use -lgpm for mouse support on a GNU/Linux consol OPTION_DEFAULT_ON([dbus],[don't compile with D-Bus support]) OPTION_DEFAULT_ON([gconf],[don't compile with GConf support]) OPTION_DEFAULT_ON([selinux],[don't compile with SELinux support]) +OPTION_DEFAULT_ON([gnutls],[don't use -lgnutls for SSL/TLS support]) ## For the times when you want to build Emacs but don't have ## a suitable makeinfo, and can live without the manuals. @@ -322,13 +325,10 @@ AC_ARG_ENABLE(profiling, [ac_enable_profiling="${enableval}"],[]) if test x$ac_enable_profiling != x ; then PROFILING_CFLAGS="-DPROFILING=1 -pg" - PROFILING_LDFLAGS="-pg" else PROFILING_CFLAGS= - PROFILING_LDFLAGS= fi AC_SUBST(PROFILING_CFLAGS) -AC_SUBST(PROFILING_LDFLAGS) AC_ARG_ENABLE(autodepend, [AS_HELP_STRING([--enable-autodepend], @@ -847,14 +847,12 @@ fi dnl Add our options to ac_link now, after it is set up. -if test x$GCC = xyes && test "x$GCC_LINK_TEST_OPTIONS" != x -then - ac_link="$ac_link $GCC_LINK_TEST_OPTIONS" -fi - -if test x$GCC = x && test "x$NON_GCC_LINK_TEST_OPTIONS" != x -then - ac_link="$ac_link $NON_GCC_LINK_TEST_OPTIONS" +if test x$GCC = xyes; then + test "x$GCC_LINK_TEST_OPTIONS" != x && \ + ac_link="$ac_link $GCC_LINK_TEST_OPTIONS" +else + test "x$NON_GCC_LINK_TEST_OPTIONS" != x && \ + ac_link="$ac_link $NON_GCC_LINK_TEST_OPTIONS" fi dnl We need -znocombreloc if we're using a relatively recent GNU ld. @@ -864,7 +862,7 @@ dnl Treat GCC specially since it just gives a non-fatal `unrecognized option' dnl if not built to support GNU ld. late_LDFLAGS=$LDFLAGS -if test "$GCC" = yes; then +if test x$GCC = xyes; then LDFLAGS="$LDFLAGS -Wl,-znocombreloc" else LDFLAGS="$LDFLAGS -znocombreloc" @@ -1359,11 +1357,8 @@ AH_TEMPLATE(POINTER_TYPE, [Define as `void' if your compiler accepts `void *'; otherwise define as `char'.])dnl - - -dnl This could be used for targets which can have both byte sexes. -dnl We could presumably replace the hardwired WORDS_BIG_ENDIAN generally. -dnl AC_C_BIGENDIAN +dnl Check for endianess +AC_C_BIGENDIAN dnl check for Make feature AC_PROG_MAKE_SET @@ -1489,22 +1484,22 @@ tmp_CPPFLAGS="$CPPFLAGS" tmp_CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS -x objective-c" CFLAGS="$CFLAGS -x objective-c" -TEMACS_LDFLAGS2="\${LDFLAGS} \${PROFILING_LDFLAGS}" +TEMACS_LDFLAGS2="\${LDFLAGS}" dnl I don't think it's especially important, but src/Makefile.in dnl (now the only user of ns_appdir) used to go to the trouble of adding a dnl trailing "/" to it, so now we do it here. if test "${with_ns}" != no; then if test "${opsys}" = darwin; then NS_IMPL_COCOA=yes - ns_appdir=`pwd`/nextstep/Emacs.app/ - ns_appbindir=${ns_appdir}Contents/MacOS/ - ns_appresdir=${ns_appdir}Contents/Resources + ns_appdir=`pwd`/nextstep/Emacs.app + ns_appbindir=${ns_appdir}/Contents/MacOS/ + ns_appresdir=${ns_appdir}/Contents/Resources ns_appsrc=${srcdir}/nextstep/Cocoa/Emacs.base elif test -f $GNUSTEP_CONFIG_FILE; then NS_IMPL_GNUSTEP=yes - ns_appdir=`pwd`/nextstep/Emacs.app/ + ns_appdir=`pwd`/nextstep/Emacs.app ns_appbindir=${ns_appdir} - ns_appresdir=${ns_appdir}Resources + ns_appresdir=${ns_appdir}/Resources ns_appsrc=${srcdir}/nextstep/GNUstep/Emacs.base dnl FIXME sourcing this several times in subshells seems inefficient. GNUSTEP_SYSTEM_HEADERS="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_SYSTEM_HEADERS)" @@ -1551,7 +1546,7 @@ if test "${HAVE_NS}" = yes; then fi ns_frag=$srcdir/src/ns.mk NS_OBJ="nsterm.o nsfns.o nsmenu.o nsselect.o nsimage.o nsfont.o fontset.o fringe.o image.o" - NS_SUPPORT="\${lispsource}emacs-lisp/easymenu.elc \${lispsource}term/ns-win.elc" + NS_SUPPORT="\${lispsource}/emacs-lisp/easymenu.elc \${lispsource}/term/ns-win.elc" fi CFLAGS="$tmp_CFLAGS" CPPFLAGS="$tmp_CPPFLAGS" @@ -1827,12 +1822,11 @@ if test "${HAVE_X11}" = "yes" || test "${NS_IMPL_GNUSTEP}" = "yes"; then RSVG_REQUIRED=2.11.0 RSVG_MODULE="librsvg-2.0 >= $RSVG_REQUIRED" - PKG_CHECK_MODULES(RSVG, $RSVG_MODULE, :, :) + PKG_CHECK_MODULES(RSVG, $RSVG_MODULE, HAVE_RSVG=yes, :) AC_SUBST(RSVG_CFLAGS) AC_SUBST(RSVG_LIBS) - if test ".${RSVG_CFLAGS}" != "."; then - HAVE_RSVG=yes + if test $HAVE_RSVG = yes; then AC_DEFINE(HAVE_RSVG, 1, [Define to 1 if using librsvg.]) CFLAGS="$CFLAGS $RSVG_CFLAGS" LIBS="$RSVG_LIBS $LIBS" @@ -1840,6 +1834,23 @@ if test "${HAVE_X11}" = "yes" || test "${NS_IMPL_GNUSTEP}" = "yes"; then fi fi +HAVE_IMAGEMAGICK=no +if test "${HAVE_X11}" = "yes"; then + if test "${with_imagemagick}" != "no"; then + IMAGEMAGICK_MODULE="Wand" + PKG_CHECK_MODULES(IMAGEMAGICK, $IMAGEMAGICK_MODULE, HAVE_IMAGEMAGICK=yes, :) + AC_SUBST(IMAGEMAGICK_CFLAGS) + AC_SUBST(IMAGEMAGICK_LIBS) + + if test $HAVE_IMAGEMAGICK = yes; then + AC_DEFINE(HAVE_IMAGEMAGICK, 1, [Define to 1 if using imagemagick.]) + CFLAGS="$CFLAGS $IMAGEMAGICK_CFLAGS" + LIBS="$IMAGEMAGICK_LIBS $LIBS" + AC_CHECK_FUNCS(MagickExportImagePixels) + fi + fi +fi + HAVE_GTK=no if test "${with_gtk3}" = "yes"; then @@ -1986,6 +1997,16 @@ if test "${with_selinux}" = "yes"; then fi AC_SUBST(LIBSELINUX_LIBS) +HAVE_GNUTLS=no +if test "${with_gnutls}" = "yes" ; then + PKG_CHECK_MODULES([LIBGNUTLS], [gnutls >= 2.2.4], HAVE_GNUTLS=yes, HAVE_GNUTLS=no) + if test "${HAVE_GNUTLS}" = "yes"; then + AC_DEFINE(HAVE_GNUTLS, 1, [Define if using GnuTLS.]) + fi +fi +AC_SUBST(LIBGNUTLS_LIBS) +AC_SUBST(LIBGNUTLS_CFLAGS) + dnl Do not put whitespace before the #include statements below. dnl Older compilers (eg sunos4 cc) choke on it. HAVE_XAW3D=no @@ -2523,6 +2544,24 @@ if test "${HAVE_X11}" = "yes"; then fi AC_SUBST(LIBXSM) +### Use libxml (-lxml2) if available +if test "${with_xml2}" != "no"; then + ### I'm not sure what the version number should be, so I just guessed. + PKG_CHECK_MODULES(LIBXML2, libxml-2.0 > 2.2.0, HAVE_LIBXML2=yes, HAVE_LIBXML2=no) + if test "${HAVE_LIBXML2}" = "yes"; then + LIBS="$LIBXML2_LIBS $LIBS" + AC_CHECK_LIB(xml2, htmlReadMemory, HAVE_LIBXML2=yes, HAVE_LIBXML2=no) + if test "${HAVE_LIBXML2}" = "yes"; then + AC_DEFINE(HAVE_LIBXML2, 1, [Define to 1 if you have the libxml library (-lxml2).]) + else + LIBXML2_LIBS="" + LIBXML2_CFLAGS="" + fi + fi +fi +AC_SUBST(LIBXML2_LIBS) +AC_SUBST(LIBXML2_CFLAGS) + # If netdb.h doesn't declare h_errno, we must declare it by hand. AC_CACHE_CHECK(whether netdb declares h_errno, emacs_cv_netdb_declares_h_errno, @@ -3221,9 +3260,9 @@ if test "${HAVE_X11}" = "yes" ; then Otherwise, Emacs expects to use version 10.]) if test "$USE_X_TOOLKIT" = "none"; then - OLDXMENU="\${oldXMenudir}libXMenu11.a" + OLDXMENU="\${oldXMenudir}/libXMenu11.a" else - OLDXMENU="\${lwlibdir}liblw.a" + OLDXMENU="\${lwlibdir}/liblw.a" fi LIBXMENU="\$(OLDXMENU)" LIBX_OTHER="\$(LIBXT) \$(LIBX_EXTRA)" @@ -3342,24 +3381,24 @@ fi AC_SUBST(LD_SWITCH_SYSTEM_TEMACS) -LINKER= +LD_FIRSTFLAG= ORDINARY_LINK= case "$opsys" in ## gnu: GNU needs its own crt0. - aix4-2|cygwin|darwin|gnu|irix6-5|sol2*|unixware) ORDINARY_LINK=yes ;; + aix4-2|cygwin|darwin|gnu|hpux*|irix6-5|sol2*|unixware) ORDINARY_LINK=yes ;; ## On post 1.3 releases of NetBSD, gcc -nostdlib also clears the ## library search parth, i.e. it won't search /usr/lib for libc and ## friends. Using -nostartfiles instead avoids this problem, and ## will also work on earlier NetBSD releases. - netbsd|openbsd) LINKER="\$(CC) -nostartfiles" ;; + netbsd|openbsd) LD_FIRSTFLAG="-nostartfiles" ;; ## macpcc: NAKAJI Hiroyuki says ## MkLinux/LinuxPPC needs this. ## ibms390x only supports opsys = gnu-linux so it can be added here. gnu-*) case "$machine" in - macppc|ibms390x) LINKER="\$(CC) -nostdlib" ;; + macppc|ibms390x) LD_FIRSTFLAG="-nostdlib" ;; esac ;; esac @@ -3367,12 +3406,12 @@ esac if test "x$ORDINARY_LINK" = "xyes"; then - LINKER="\$(CC)" + LD_FIRSTFLAG="" AC_DEFINE(ORDINARY_LINK, 1, [Define if the C compiler is the linker.]) -## The system files defining neither ORDINARY_LINK nor LINKER are: -## (bsd-common), freebsd, gnu-* not on macppc|ibms390x, hpux*. -elif test "x$GCC" = "xyes" && test "x$LINKER" = "x"; then +## The system files defining neither ORDINARY_LINK nor LD_FIRSTFLAG are: +## freebsd, gnu-* not on macppc|ibms390x. +elif test "x$GCC" = "xyes" && test "x$LD_FIRSTFLAG" = "x"; then ## Versions of GCC >= 2.0 put their library, libgcc.a, in obscure ## places that are difficult to figure out at make time. Fortunately, @@ -3382,18 +3421,17 @@ elif test "x$GCC" = "xyes" && test "x$LINKER" = "x"; then ## Well, it is not quite perfect. The "-nostdlib" keeps GCC from ## searching for libraries in its internal directories, so we have to ## ask GCC explicitly where to find libgcc.a (LIB_GCC below). - LINKER="\$(CC) -nostdlib" + LD_FIRSTFLAG="-nostdlib" fi -test "x$LINKER" = "x" && LINKER=ld ## FIXME? What setting of EDIT_LDFLAGS should this have? -test "$NS_IMPL_GNUSTEP" = "yes" && LINKER="\$(CC) -rdynamic" +test "$NS_IMPL_GNUSTEP" = "yes" && LD_FIRSTFLAG="-rdynamic" -AC_SUBST(LINKER) +AC_SUBST(LD_FIRSTFLAG) ## FIXME? The logic here is not precisely the same as that above. -## There is no check here for a pre-defined LINKER. +## There is no check here for a pre-defined LD_FIRSTFLAG. ## Should we only be setting LIB_GCC if LD ~ -nostdlib? LIB_GCC= if test "x$GCC" = "xyes" && test "x$ORDINARY_LINK" != "xyes"; then @@ -3430,7 +3468,7 @@ if test "$HAVE_X_WINDOWS" = "yes" || test "$HAVE_NS" = "yes"; then AC_DEFINE(HAVE_WINDOW_SYSTEM, 1, [Define if you have a window system.]) AC_DEFINE(HAVE_MOUSE, 1, [Define if you have mouse support.]) MOUSE_SUPPORT="\$(REAL_MOUSE_SUPPORT)" - TOOLTIP_SUPPORT="\${lispsource}mouse.elc" + TOOLTIP_SUPPORT="\${lispsource}/mouse.elc" WINDOW_SUPPORT="\$(BASE_WINDOW_SUPPORT)" test "$HAVE_X_WINDOWS" = "yes" && \ @@ -3497,17 +3535,14 @@ AH_BOTTOM([ #include config_opsysfile #include config_machfile -/* Set up some defines, C and LD flags for NeXTstep interface on GNUstep. - (There is probably a better place to do this, but right now the Cocoa - side does this in s/darwin.h and we cannot - parallel this exactly since GNUstep is multi-OS. */ -#ifdef HAVE_NS -# ifdef NS_IMPL_GNUSTEP /* GNUstep needs a bit more pure memory. Of the existing knobs, -SYSTEM_PURESIZE_EXTRA seems like the least likely to cause problems. */ + SYSTEM_PURESIZE_EXTRA seems like the least likely to cause problems. + (There is probably a better place to do this, but right now the + Cocoa side does this in s/darwin.h and we cannot parallel this + exactly since GNUstep is multi-OS. */ +#if defined HAVE_NS && defined NS_IMPL_GNUSTEP # define SYSTEM_PURESIZE_EXTRA 30000 -# endif /* NS_IMPL_GNUSTEP */ -#endif /* HAVE_NS */ +#endif /* SIGTYPE is the macro we actually use. */ #ifndef SIGTYPE @@ -3564,13 +3599,8 @@ SYSTEM_PURESIZE_EXTRA seems like the least likely to cause problems. */ not define __STDC__ (e.g. DEC C by default) or may define it as zero. */ #undef PROTOTYPES -#ifdef HAVE_STRING_H #include -#endif - -#ifdef HAVE_STDLIB_H #include -#endif #ifdef HAVE_ALLOCA_H # include @@ -3605,6 +3635,17 @@ typedef unsigned size_t; #define NO_RETURN /* nothing */ #endif +#if __GNUC__ >= 3 /* On GCC 3.0 we might get a warning. */ +#define NO_INLINE __attribute__((noinline)) +#else +#define NO_INLINE +#endif + +/* Some versions of GNU/Linux define noinline in their headers. */ +#ifdef noinline +#undef noinline +#endif + /* These won't be used automatically yet. We also need to know, at least, that the stack is continuous. */ #ifdef __GNUC__ @@ -3665,10 +3706,14 @@ echo " Does Emacs use -ltiff? ${HAVE_TIFF}" echo " Does Emacs use a gif library? ${HAVE_GIF} $LIBGIF" echo " Does Emacs use -lpng? ${HAVE_PNG}" echo " Does Emacs use -lrsvg-2? ${HAVE_RSVG}" +echo " Does Emacs use imagemagick? ${HAVE_IMAGEMAGICK}" + echo " Does Emacs use -lgpm? ${HAVE_GPM}" echo " Does Emacs use -ldbus? ${HAVE_DBUS}" echo " Does Emacs use -lgconf? ${HAVE_GCONF}" echo " Does Emacs use -lselinux? ${HAVE_LIBSELINUX}" +echo " Does Emacs use -lgnutls (BROKEN)? ${HAVE_GNUTLS}" +echo " Does Emacs use -lxml2? ${HAVE_LIBXML2}" echo " Does Emacs use -lfreetype? ${HAVE_FREETYPE}" echo " Does Emacs use -lm17n-flt? ${HAVE_M17N_FLT}" @@ -3740,6 +3785,3 @@ fi ], [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 -)dnl