diff configure.in @ 420:41dbb7a9d5f2 r21-2-18

Import from CVS: tag r21-2-18
author cvs
date Mon, 13 Aug 2007 11:24:09 +0200
parents e804706bfb8c
children 95016f13131a
line wrap: on
line diff
--- a/configure.in	Mon Aug 13 11:23:14 2007 +0200
+++ b/configure.in	Mon Aug 13 11:24:09 2007 +0200
@@ -357,10 +357,13 @@
 etcdir='${datadir}/${PROGNAME}-${version}/etc'
 lockdir='${statedir}/${PROGNAME}/lock'
 archlibdir='${datadir}/${PROGNAME}-${version}/${configuration}'
+docdir='${archlibdir}'
+with_prefix='yes'
 with_site_lisp='no'
 with_site_modules='yes'
 with_menubars=''
 with_scrollbars=''
+with_widgets=''
 with_dialogs=''
 with_file_coding=''
 dnl const_is_losing is removed - we rely on AC_C_CONST instead.
@@ -463,7 +466,8 @@
 
       dnl Process (many) boolean options
 	with_site_lisp	| \
-    with_site_modules | \
+	with_prefix	| \
+	with_site_modules | \
 	with_x		| \
 	with_x11	| \
 	with_msw	| \
@@ -709,6 +713,8 @@
            dnl You need to synchronize this with the way the
            dnl default values are built.
 	   case "$opt" in
+	     dnl prefix is taken care of by --with-prefix
+	     exec_prefix ) AC_DEFINE(EXEC_PREFIX_USER_DEFINED) ;;
              lispdir ) AC_DEFINE(LISPDIR_USER_DEFINED) ;;
              sitelispdir ) AC_DEFINE(SITELISPDIR_USER_DEFINED) ;;
              moduledir ) AC_DEFINE(MODULEDIR_USER_DEFINED) ;;
@@ -722,6 +728,7 @@
             AC_DEFINE(MODULEDIR_USER_DEFINED)
 	        AC_DEFINE(ETCDIR_USER_DEFINED) ;;
              statedir | lockdir ) AC_DEFINE(LOCKDIR_USER_DEFINED) ;;
+	     docdir ) AC_DEFINE(DOCDIR_USER_DEFINED) ;;
              exec_prefix | libdir | archlibdir ) AC_DEFINE(ARCHLIBDIR_USER_DEFINED) ;;
            esac
 	;;
@@ -735,7 +742,8 @@
 	dnl Has the user specified the toolkit(s) to use for GUI elements?
 	"with_menubars"   | \
 	"with_scrollbars" | \
-	"with_dialogs" )
+	"with_dialogs" | \
+	"with_widgets" )
 	  case "$val" in
 	    l | lu | luc | luci | lucid )		val=lucid  ;;
 	    m | mo | mot | moti | motif )		val=motif  ;;
@@ -931,7 +939,7 @@
 AC_DEFINE_UNQUOTED(EMACS_VERSION, "$version")
 
 if test "$with_infodock" = "yes"; then
-  if test ! -f ../ID-INSTALL; then
+  if test ! -f ../../ID-INSTALL; then
     echo "Cannot build InfoDock without InfoDock sources"
     with_infodock=no
   fi
@@ -2874,8 +2882,13 @@
 case "$with_scrollbars" in "" | "yes" )
   with_scrollbars="lucid" ;;
 esac
-
-all_widgets="$with_menubars $with_scrollbars $with_dialogs $with_toolbars"
+case "$with_widgets" in "" | "yes" )
+  if   test "$have_motif" = "yes"; then with_widgets="motif"
+  else with_widgets=no
+  fi ;;
+esac
+
+all_widgets="$with_menubars $with_scrollbars $with_dialogs $with_toolbars $with_widgets"
 
 case "$all_widgets" in *athena* )
   AC_DEFINE(LWLIB_USES_ATHENA)
@@ -2928,7 +2941,7 @@
   test "$with_scrollbars" != "no"      && XE_ADD_OBJS(scrollbar-x.o)
   test "$with_dialogs"    != "no"      && XE_ADD_OBJS(dialog-x.o)
   test "$with_toolbars"   != "no"      && XE_ADD_OBJS(toolbar-x.o)
-  test "$all_widgets" != "no no no no" && XE_ADD_OBJS(gui-x.o)
+  test "$all_widgets" != "no no no no no" && XE_ADD_OBJS(gui-x.o)
 else
   if test \( "$with_sound" = "nas" \) -o \( "$with_sound" = "both" \); then
     echo "Attempt to Build NAS sound without X"
@@ -3741,6 +3754,7 @@
 AC_SUBST(mandir)
 
 AC_SUBST(prefix)
+AC_SUBST(PREFIX_USER_DEFINED)
 dnl Yo, Stephen Bourne!  I want to marry you!
 PREFIX=$prefix
 while true; do
@@ -3752,6 +3766,7 @@
 AC_SUBST(PREFIX)
 
 AC_SUBST(exec_prefix)
+AC_SUBST(EXEC_PREFIX_USER_DEFINED)
 EXEC_PREFIX=$exec_prefix
 while true; do
   case "$EXEC_PREFIX" in
@@ -3860,6 +3875,17 @@
 done
 AC_SUBST(LOCKDIR)
 
+AC_SUBST(docdir)
+AC_SUBST(DOCDIR_USER_DEFINED)
+DOCDIR=$docdir
+while true; do
+  case "$DOCDIR" in
+    *\$* ) eval "DOCDIR=$DOCDIR" ;;
+    *) break ;;
+  esac
+done
+AC_SUBST(DOCDIR)
+
 AC_SUBST(archlibdir)
 AC_SUBST(ARCHLIBDIR_USER_DEFINED)
 ARCHLIBDIR=$archlibdir
@@ -3907,6 +3933,10 @@
 : ${XEMACS_CC:=$CC}
 AC_SUBST(XEMACS_CC)
 
+dnl The default is yes
+if test "$with_prefix" = "yes"; then
+  AC_DEFINE(PREFIX_USER_DEFINED)
+fi
 
 dnl The default is no
 if test "$with_site_lisp" = "no"; then