XDG Compliant user (early) packages tree.
[sxemacs] / configure.ac
index 6d62a17..766f76f 100644 (file)
@@ -31,6 +31,7 @@ AC_COPYRIGHT(
 #### Copyright (C) 2005 Malcolm Purvis.
 #### Copyright (C) 2005, 2006, 2007 Steve Youngs.
 #### Copyright (C) 2006, 2007, 2008 Sebastian Freundt.
+#### Copyright (C) 2007, 2010, 2011, 2012 Nelson Ferreira
 
 ### Don't edit this script!
 ### This script was automatically generated by the `autoconf' program
@@ -64,7 +65,7 @@ AC_COPYRIGHT(
 ### If configure succeeds, it leaves its status in config.status.
 ### A log of configuration tests can be found in config.log.
 ### If configure fails after disturbing the status quo,
-###    config.status is removed.
+###    config.status is removed.
 ])
 
 AC_REVISION([SXEM4CS_GIT_VERSION])
@@ -177,7 +178,7 @@ OG_ARG_WITH([package-prefix],
        AS_HELP_STRING([--with-package-prefix=PATH],
                [What to use as a prefix to the system-wide package
                directories.  It doesn't affect the package directories
-               under ~/.sxemacs, and is totally ignored if
+               under the user's home directory, and is totally ignored if
                --with-package-path is set.
                Normally, you would not need to set this.]),
        [none], [None], [og_any],
@@ -316,7 +317,7 @@ OG_ARG_WITH([regex-malloc],
 
 OG_ARG_WITH([ffi],
        AS_HELP_STRING([--with-ffi],
-               [Compile in experimental support for 
+               [Compile in experimental support for
                Foreign Function Interface.]),
        [yes], [YES])
 
@@ -332,6 +333,7 @@ OG_MULTIARG_WITH([modules], [dnl
        [all], [all], [dnl
        OG_MULTIARG_ITEM([ase], [ase], [algebraic structures])
        OG_MULTIARG_ITEM([cl], [cl], [fast Common Lisp implementation])
+       OG_MULTIARG_ITEM([dbus], [dbus], [D-BUS bindings])
 ])
 
 OG_MULTIARG_WITH([static-modules], [dnl
@@ -343,11 +345,9 @@ OG_MULTIARG_WITH([static-modules], [dnl
        [none], [NONE], [dnl
        OG_MULTIARG_ITEM([ase], [ase], [algebraic structures])
        OG_MULTIARG_ITEM([cl], [cl], [fast Common Lisp implementation])
+       OG_MULTIARG_ITEM([dbus], [dbus], [D-BUS bindings])
 ])
 
-dnl _OG_MULTIARG_ITEM([ent], [int], [int], [native integer arithmetics])
-dnl _OG_MULTIARG_ITEM([ent], [fpfloat], [fpfloat], [native fixed precision floats])
-dnl _OG_MULTIARG_ITEM([ent], [indef], [indef], [abstract indefinites])
 OG_MULTIARG_WITH([ent], [dnl
        AS_HELP_STRING([--with-ent], [
                Compile in support for enhanced number types,
@@ -381,6 +381,13 @@ OG_MULTIARG_WITH([ase], [dnl
        OG_MULTIARG_ITEM([resclass], [resclass], [Residue Class Rings and Classes])
 ])
 
+OG_ARG_WITH([compre],
+       AS_HELP_STRING([--with-compre],[
+               Provide exhaustive caching of compiled regexps. This will
+               mean that frequently used regexps will be faster to use
+               since the compile step will not be needed after first use.]),
+       [yes], [By default do cache compiled regexps.])
+
 OG_MULTIARG_WITH([experimental-features], [dnl
        AS_HELP_STRING([--with-experimental-features], [
                Activate experimental code, that is code which is
@@ -393,7 +400,6 @@ OG_MULTIARG_WITH([experimental-features], [dnl
                can switch off some portions.])],
        [all nobdwgc], [ALL but bdwgc], [dnl
        OG_MULTIARG_ITEM([bdwgc], [bdwgc], [the Boehm-Demers-Weiser collector])
-       OG_MULTIARG_ITEM([compre], [compre], [exhaustive caching of compiled regexps])
        OG_MULTIARG_ITEM([asyneq], [asyneq], [asynchronous event queues])
 ])
        dnl stop that pom stuff
@@ -445,6 +451,8 @@ OG_MULTIARG_WITH([error-checking], [dnl
        OG_MULTIARG_ITEM([byte_code], [byte_code], [checks on byte compiled code])
        OG_MULTIARG_ITEM([bufpos], [bufpos], [checks on buffer position])
        OG_MULTIARG_ITEM([glyphs], [glyphs], [checks on glyph data])
+       OG_MULTIARG_ITEM([stack], [stack], [checks on stack barriers])
+       OG_MULTIARG_ITEM([malldbg], [malldbg], [malloc debugging code])
 ])
 
 OG_ARG_WITH([purify],
@@ -478,54 +486,38 @@ OG_ARG_WITH([external-widget],
 
 OG_ARG_WITH([menubars],
        AS_HELP_STRING([--with-menubars=TYPE],
-               [Type of menubars to use.  The Lucid menubars emulate
-               Motif (mostly) but are faster.
-               *WARNING*  The gtk menubar is gtk-1.2 only and unmaintained.]),
-       [lucid], [Lucid], [lucid gtk no])
+               [Type of menubars to use.  The Lucid menubars emulate
+               Motif (mostly) but are faster.]),
+       [lucid], [Lucid], [lucid no])
 
 OG_ARG_WITH([scrollbars],
        AS_HELP_STRING([--with-scrollbars=TYPE],
-               [Type of scrollbars to use.
-               *WARNING*  The Motif scrollbars are currently broken.
-               *WARNING*  The gtk scrollbars are gtk-1.2 only and unmaintained.]),
-       [lucid], [Lucid], [lucid motif athena gtk no])
+               [Type of scrollbars to use.
+               *WARNING*  The Motif scrollbars are currently broken.]),
+       [lucid], [Lucid], [lucid motif athena no])
 
 OG_ARG_WITH([dialogs],
        AS_HELP_STRING([--with-dialogs=TYPE],
-               [Type of dialog boxes to use.  Athena dialogs will
-                 be used if Athena can be found.
-                *WARNING*  The gtk dialogs are gtk-1.2 only and unmaintained.]),
-       [athena], [], [athena motif gtk no])
+               [Type of dialog boxes to use.  Athena dialogs will
+                be used if Athena can be found.]),
+       [athena], [], [athena motif no])
 
 OG_ARG_WITH([widgets],
        AS_HELP_STRING([--with-widgets=TYPE],
-               [Type of native widgets to use.  Athena widgets will
-               be used if Athena can be found.
-               *WARNING*  The gtk widgets are gtk-1.2 only and unmaintained.]),
-       [athena], [], [athena motif gtk no])
+               [Type of native widgets to use.  Athena widgets will
+               be used if Athena can be found.]),
+       [athena], [], [athena motif no])
 
 OG_ARG_WITH([athena],
        AS_HELP_STRING([--with-athena=TYPE],
-               [Type of Athena widgets to use.]),
+               [Type of Athena widgets to use.]),
        [auto], [Autodetect], [auto xaw 3d next 95 xpm no])
 
 OG_ARG_WITH([xim],
        AS_HELP_STRING([--with-xim],
-               [Type of Mule input method to use.]),
+               [Type of Mule input method to use.]),
        [auto], [Autodetect], [yes no xlib motif])
 
-OG_ARG_WITH([gtk],
-       AS_HELP_STRING([--with-gtk],
-               [Support GTK (version 1.x) on the X Window System.
-               (EXPERIMENTAL)]),
-       [no], [NO])
-
-OG_ARG_WITH([gnome],
-       AS_HELP_STRING([--with-gnome],
-               [Support GNOME (version 1.x) on the X Window System.
-               (EXPERIMENTAL)]),
-       [no], [NO])
-
 OG_ARG_WITH([wmcommand],
        AS_HELP_STRING([--with-wmcommand],
                [Compile with realized leader window which will
@@ -558,6 +550,27 @@ OG_ARG_WITH([ncurses],
                [Use the ncurses library for tty support.]),
        [auto], [Autodetect])
 
+OG_ARG_WITH([curses],
+       AS_HELP_STRING([--with-curses],
+               [Use the curses library for tty support.]),
+       [auto], [Autodetect])
+
+OG_ARG_WITH([terminfo],
+       AS_HELP_STRING([--with-terminfo],
+               [Use the terminfo library for tty support.]),
+       [auto], [Autodetect])
+
+OG_ARG_WITH([termlib],
+       AS_HELP_STRING([--with-termlib],
+               [Use the termlib library for tty support.]),
+       [auto], [Autodetect])
+
+OG_ARG_WITH([termcap],
+       AS_HELP_STRING([--with-termcap],
+               [Use the termcap library for tty support.]),
+       [auto], [Autodetect])
+
+
 OG_ARG_WITH([gpm],
        AS_HELP_STRING([--with-gpm],
                [Compile in GPM mouse support for ttys.]),
@@ -607,24 +620,16 @@ OG_MULTIARG_WITH([image], [dnl
 OG_MULTIARG_WITH([sound], [dnl
        AS_HELP_STRING([--with-sound=TYPE],
                [Compile with sound support.])],
-       [auto], [Autodetect all sound support (except Pulse)], [dnl
+       [auto], [Autodetect all sound support], [dnl
        OG_MULTIARG_ITEM([alsa], [ALSA], [kernel-based linux sound standard])
        OG_MULTIARG_ITEM([ao], [ao], [generic audio output layer])
-       OG_MULTIARG_ITEM([arts], [aRts], [discontinued realtime synthesizer])
        OG_MULTIARG_ITEM([esd], [ESD], [Enlightenment Sound Daemon])
        OG_MULTIARG_ITEM([jack], [Jack], [a low-latency audio server])
        OG_MULTIARG_ITEM([nas], [NAS], [Network Audio System])
        OG_MULTIARG_ITEM([oss], [OSS], [Open Sound System])
+       OG_MULTIARG_ITEM([pulse], [PulseAudio], [PulseAudio Sound Server])
 ])
 
-OG_ARG_WITH([pulseaudio],
-       AS_HELP_STRING([--with-pulseaudio],
-               [Compile with support for the PulseAudio audio server.
-               This has been turned off by default because of too many
-               bugs in recent versions of PA.  Use at your own risk,
-               YMMV, and all that.]),
-       [no], [NO])
-
 OG_MULTIARG_WITH([media], [dnl
        AS_HELP_STRING([--with-media=TYPE],
                [Compile with media stream support.])],
@@ -644,13 +649,13 @@ OG_OPTION_GROUP(Cryptography options)
 
 OG_ARG_WITH([openssl],
        AS_HELP_STRING([--with-openssl],
-               [Compile in experimental support for 
+               [Compile in experimental support for
                OpenSSL libcrypto and libssl.]),
        [yes], [YES])
 
 OG_ARG_WITH([gnutls],
        AS_HELP_STRING([--with-gnutls],
-               [Compile in experimental support for 
+               [Compile in experimental support for
                GnuTLS transport security.]),
        [no], [NO])
 
@@ -743,17 +748,16 @@ OG_ARG_WITH([wnn6],
 dnl dnl Other Options
 dnl dnl =============
 dnl OG_OPTION_GROUP(Other options)
-dnl 
+dnl
 
 ## -------------------------------------------------------------------------
 ## Check for users who regularly forget about running autoconf
 ## -------------------------------------------------------------------------
-if test -f $0.ac -a $0.ac -nt $0; then
-       AC_MSG_ERROR([What are you doing? RUN autoreconf NOW!!!])
-fi
+AS_IF([test -f "$0.ac" -a "$0.ac" -nt "$0"],
+   AC_MSG_ERROR([What are you doing? RUN autoreconf NOW!!!]))
 
 #
-# Turn off core generation. We are already verifying the program fails, no need 
+# Turn off core generation. We are already verifying the program fails, no need
 # poluting the workspace. Of course if you are a SXEmacs developer you may want
 # to comemnt this on occasion :-)
 ulimit -c 0
@@ -795,6 +799,7 @@ dnl -------------------------------------------------------------------------
 SXE_CHECK_COMMAND_LINE
 
 AM_INIT_AUTOMAKE([foreign -Wall])
+m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES])
 SXE_CHECK_BUILDCHAIN
 AC_SUBST(EGREP)
 
@@ -818,22 +823,16 @@ AC_CHECK_PROG([have_git], [git], [yes], [no])
 AC_MSG_CHECKING([for SXEmacs version])
 AC_MSG_RESULT([SXEmacs SXEM4CS_VERSION])
 dnl Must do the following first to determine verbosity for AC_DEFINE
-if test -n "[]SXEM4CS_BETA_P[]"; then
-       beta=yes
-else
-       beta=no
-fi
+AS_IF([test -n "[]SXEM4CS_BETA_P[]"],beta=yes,beta=no)
 : "${extra_verbose=$beta}"
 
 AC_MSG_CHECKING([for SXEmacs patchlevel])
 CURDIR=$(pwd)
 cd "$sxe_srcdir"
-if test "$have_git" = "yes"; then
-       sxemacs_git_version="$(git describe)"
-fi
-if test -z "$sxemacs_git_version" ; then
-       sxemacs_git_version="[]SXEM4CS_GIT_VERSION[]"
-fi
+AS_IF([test "$have_git" = "yes"], 
+           [sxemacs_git_version=`git describe 2> /dev/null | head -1`])
+AS_IF([test -z "$sxemacs_git_version"],
+       sxemacs_git_version="[]SXEM4CS_GIT_VERSION[]")
 AC_MSG_RESULT([$sxemacs_git_version])
 version="$sxemacs_git_version"
 cd "$CURDIR"
@@ -873,6 +872,8 @@ AS_MESSAGE([Let's look for the entire C build chain])
 SXE_CHECK_CC
 SXE_CHECK_CFLAGS
 
+m4_ifdef([AM_PROG_AR], [AM_PROG_AR])
+
 ## check machine chars
 AS_MESSAGE([Let's have a detailed glance at your machine])
 SXE_PROC_CPUID
@@ -990,8 +991,11 @@ if test "$with_dynamic" = "yes"; then
        decosf* )
                ld_call_shared="-call_shared"
                ;;
-       darwin )
+       darwin* )
                AC_DEFINE([DLSYM_NEEDS_UNDERSCORE], [1], [Description here!])
+               if test "x$have_ld_no_pie" != "x"; then
+                       SXE_PREPEND_LINKER_FLAG([-no_pie], [ld_switch_site])
+               fi
                ;;
        esac
 else dnl "$with_dynamic" = "no"
@@ -1007,6 +1011,12 @@ else dnl "$with_dynamic" = "no"
        decosf* )
                ld_call_shared="-non_shared"
                ;;
+       darwin* )
+               AC_DEFINE([DLSYM_NEEDS_UNDERSCORE], [1], [Description here!])
+               if test "x$have_ld_no_pie" != "x"; then
+                       SXE_PREPEND_LINKER_FLAG([-no_pie], [ld_switch_site])
+               fi
+               ;;
        esac
 fi
 
@@ -1039,20 +1049,20 @@ fi
 dnl what exactly do we determine here? and where is it used?
 dnl dnl Determine GCC version.
 dnl if test "$GCC" = "yes"; then
-dnl    AC_RUN_IFELSE([AC_LANG_SOURCE([[
+dnl    AC_RUN_IFELSE([AC_LANG_SOURCE([[
 dnl int main ()
 dnl {
 dnl #if __GNUC__ >= 3
-dnl    return 11;
+dnl    return 11;
 dnl #else
-dnl    return 0;
+dnl    return 0;
 dnl #endif
 dnl }]])], [:], [dnl
 dnl case "$?" in
 dnl 11)
-dnl    echo "You appear to be using GCC version 3 or above."
-dnl    __GCC3=yes
-dnl    ;;
+dnl    echo "You appear to be using GCC version 3 or above."
+dnl    __GCC3=yes
+dnl    ;;
 dnl esac], [__GCC3=no])
 dnl fi
 
@@