XEmacs 21.4.7 "Economic Science".
[chise/xemacs-chise.git.1] / configure.in
index 9a86a7f..f5b12f8 100644 (file)
@@ -57,7 +57,7 @@ dnl Redefine some standard autoconf macros
 dnl here is how XEmacs is different:
 dnl - no cache file
 dnl - non-standard options
-dnl - suport for extra-verbosity
+dnl - support for extra-verbosity
 dnl - ordinary libs are handled separately from X libs (might be a mistake)
 dnl - various random kludges (e.g. -with-dnet=no)
 
@@ -126,7 +126,7 @@ EOF
 
 dnl redefine AC_CHECK_LIB in accordance with our own value of ac_link
 dnl Add in extra kludgy check to support with_dnet=no
-dnl Add in extra LDFLAGS arg, which PRECEDE libs
+dnl Add in extra LDFLAGS arg, which PRECEDES libs
 dnl Support --with-dnet=no
 
 dnl AC_CHECK_LIB(LIBRARY, FUNCTION [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND
@@ -378,8 +378,8 @@ with_dnet=""
 pdump="no"
 dnl dragndrop is still experimental.  When it is stable, comment out the following line:
 with_dragndrop="no"
-dnl I think this is mandated by IPv6 standards.
-with_ipv6_cname="yes"
+dnl Too annoying, even if mandated by IPv6 (and I'm not even sure of that)
+with_ipv6_cname="no"
 
 dnl ------------------
 dnl Options Processing
@@ -743,7 +743,7 @@ The default is to autodetect native and NAS sound support."])
        dnl Has the user specified one of the path options?
        prefix | exec_prefix | bindir | datadir | statedir | libdir | \
        mandir | infodir | infopath | lispdir | etcdir | pkgdir | \
-       archlibdir | docdir | package_path )
+       archlibdir | docdir | package_path | moduledir )
           dnl If the value was omitted, get it from the next argument.
           if test "$valomitted" = "yes"; then
             if test "$#" = 0; then
@@ -794,6 +794,8 @@ The default is to autodetect native and NAS sound support."])
            a | at | ath | athe | athen | athena )      val=athena ;;
            n | no | non | none )                       val=no     ;;
            y | ye | yes )                              val=yes    ;;
+           dnl Explicit --with-widgets on command line means yes.
+            "")                                                val=yes    ;;
            g | gt | gtk )                              val=gtk    ;;
            ms | msw )                                  val=msw    ;;
            * ) USAGE_ERROR(["The \`--$optname' option must have one of these values:
@@ -1212,6 +1214,13 @@ case "$canonical" in
   dnl Cubix QBx/386
   i[[3-9]]86-cubix-sysv* ) machine=intel386 opsys=usg5-3 ;;
 
+  dnl Darwin, a.k.a. MacOS X (based on Mach and Freebsd)
+  *-*-darwin*)
+    opsys=darwin
+    RANLIB="ranlib -c" dnl Avoids a link error with lwlib-config.c
+    pdump=yes          dnl No "native" working dumper available
+    ;;
+
   dnl Data General AViiON Machines
   i586-dg-dgux*R4*   | i586-dg-dgux5.4.4* ) machine=aviion opsys=dgux5-4r4 ;;
   m88k-dg-dgux5.4R3* | m88k-dg-dgux5.4.3* ) opsys=dgux5-4r3 ;;
@@ -2157,7 +2166,7 @@ dnl #### Unfortunately, there are horrible libc4 and libc5 libraries
 dnl listed in /etc/ld.so.conf on some systems, and including them on
 dnl the link path leads to linking in utterly broken libc's.
 dnl There are many clever ways of approaching this problem,
-dnl but finding out that actually works...
+dnl but finding one that actually works...
 
 dnl if test -z "$LD_RUN_PATH" -a -r "/etc/ld.so.conf"; then
 dnl   for dir in `cat /etc/ld.so.conf`; do
@@ -2495,6 +2504,10 @@ case "$opsys" in decosf*)
     c_switch_site="$c_switch_site -threads" ;;
 esac
 
+dnl ----------------------------------------------------------------
+dnl Miscellaneous flags
+dnl ----------------------------------------------------------------
+
 AC_MSG_CHECKING(whether the -xildoff compiler flag is required)
 if   ${CC-cc} '-###' -xildon  no_such_file.c 2>&1 | grep '^[^ ]*/ild ' > /dev/null ; then
   if ${CC-cc} '-###' -xildoff no_such_file.c 2>&1 | grep '^[^ ]*/ild ' > /dev/null ;
@@ -2516,6 +2529,20 @@ if test "$opsys" = "sol2"; then
   fi
 fi
 
+dnl GNU ld now defaults to combreloc, which screws up unexec, but not pdump.
+dnl Note that it's OK if the GNU style long option causes non-GNU ld to barf
+dnl a usage message, that's often good enough.  Please report it, though.
+dnl #### Should make this Solaris-friendly.
+dnl Link with -z nocombreloc for now.
+if test "$pdump" != "yes"; then
+  AC_MSG_CHECKING(for \"-z nocombreloc\" linker flag)
+  case "`ld --help 2>&1`" in
+    *-z\ nocombreloc* ) AC_MSG_RESULT(yes)
+      XE_PREPEND(-z nocombreloc, ld_switch_site) ;;
+    *) AC_MSG_RESULT(no) ;;
+  esac
+fi
+
 dnl ----------------------
 dnl Choose a window system
 dnl ----------------------
@@ -2587,6 +2614,9 @@ if test "${GTK_CONFIG}" != "no"; then
 
       AC_MSG_CHECKING(gtk cflags)
       GTK_CFLAGS=`${GTK_CONFIG} --cflags`
+      if test "$GCC" = "yes"; then
+       GTK_CFLAGS="${GTK_CFLAGS} -Wno-shadow"
+      fi
       XE_APPEND(${GTK_CFLAGS}, c_switch_gtk)
       AC_MSG_RESULT(${GTK_CFLAGS})
 
@@ -3367,7 +3397,15 @@ if test "$with_x11" = "yes"; then
   AC_CHECKING(for X11 graphics libraries)
 fi
 
-if test "$with_x11" = "yes" -a "$with_widgets" = "athena"; then
+dnl We don't automatically trigger widgets if athena is present
+dnl because of stability concerns.
+dnl But if the user wants widgets, still offer him autodetections
+case "$with_widgets" in
+  "yes" | "athena")            detect_athena=yes ;;
+   *)                          detect_athena=no ;;
+esac
+
+if test "$with_x11" = "yes" -a "$detect_athena" = "yes" ; then
   AC_CHECKING(for the Athena widgets)
 
   dnl What in heck did the user actually want?
@@ -3466,7 +3504,7 @@ if test "$with_x11" = "yes" -a "$with_widgets" = "athena"; then
 
 else
   have_xaw=no
-fi dnl "$with_x11" = "yes" -a "$with_widgets" = "athena"
+fi dnl "$with_x11" = "yes" -a "detect_athena" = "yes"
 
 if test "$with_x11" = "yes"; then
   dnl autodetect Motif - but only add to libs_x later (if necessary)
@@ -4840,6 +4878,10 @@ fi
 echo "  Compiler:                          $CC $CFLAGS"
 echo "  Relocating allocator for buffers:  $rel_alloc"
 echo "  GNU version of malloc:             ${GNU_MALLOC}${GNU_MALLOC_reason}"
+case "$ld_switch_site" in
+  *nocombreloc*) echo "  Linking with \`-z nocombreloc'.
+    - Consider configuring with --pdump." ;;
+esac
 
 echo "
 Window System:"
@@ -4985,7 +5027,7 @@ test -n "$mail_locking" && echo "  Compiling in support for \"$mail_locking\" ma
 
 echo "
 Other Features:"
-test "with_ipv6_cname" = no && echo "  Inhibiting IPv6 canonicalization at startup."
+test "$with_ipv6_cname" = no && echo "  Inhibiting IPv6 canonicalization at startup."
 test "$with_tooltalk" = yes && echo "  Compiling in support for ToolTalk."
 test "$with_workshop" = yes && echo "  Compiling in support for Sun WorkShop."
 test "$with_socks" = yes && echo "  Compiling in support for SOCKS."