comparison configure.in @ 278:90d73dddcdc4 r21-0b37

Import from CVS: tag r21-0b37
author cvs
date Mon, 13 Aug 2007 10:31:29 +0200
parents 6330739388db
children 7df0dd720c89
comparison
equal deleted inserted replaced
277:cfdf3ff11843 278:90d73dddcdc4
267 dnl Installation directory options. 267 dnl Installation directory options.
268 dnl These are left unexpanded so users can "make install exec_prefix=/foo" 268 dnl These are left unexpanded so users can "make install exec_prefix=/foo"
269 dnl and all the variables that are supposed to be based on exec_prefix 269 dnl and all the variables that are supposed to be based on exec_prefix
270 dnl by default will actually change. 270 dnl by default will actually change.
271 dnl Use braces instead of parens because sh, perl, etc. also accept them. 271 dnl Use braces instead of parens because sh, perl, etc. also accept them.
272 dnl If you change these, you need to synchronize with the settings of the
273 dnl various ..._USER_DEFINED variables further down.
272 bindir='${exec_prefix}/bin' 274 bindir='${exec_prefix}/bin'
273 sbindir='${exec_prefix}/sbin' 275 sbindir='${exec_prefix}/sbin'
274 libexecdir='${exec_prefix}/libexec' 276 libexecdir='${exec_prefix}/libexec'
275 datadir='${prefix}/share' 277 datadir='${prefix}/share'
276 sysconfdir='${prefix}/etc' 278 sysconfdir='${prefix}/etc'
325 mandir='${prefix}/man/man1' 327 mandir='${prefix}/man/man1'
326 infodir='${datadir}/xemacs-${version}/info' 328 infodir='${datadir}/xemacs-${version}/info'
327 infopath='' 329 infopath=''
328 install_pp='' 330 install_pp=''
329 lispdir='${datadir}/xemacs-${version}/lisp' 331 lispdir='${datadir}/xemacs-${version}/lisp'
330 sitelispdir='${datadir}/xemacs/site-lisp' 332 dnl sitelispdir='${datadir}/xemacs/site-lisp'
331 pkgdir='${datadir}/xemacs-${version}/lisp' 333 pkgdir='${datadir}/xemacs-${version}/lisp'
332 package_path='' 334 package_path=''
333 etcdir='${datadir}/xemacs-${version}/etc' 335 etcdir='${datadir}/xemacs-${version}/etc'
334 lockdir='${statedir}/xemacs/lock' 336 lockdir='${statedir}/xemacs/lock'
335 archlibdir='${libdir}/xemacs-${version}/${configuration}' 337 archlibdir='${libdir}/xemacs-${version}/${configuration}'
680 dnl installed in odd places. 682 dnl installed in odd places.
681 683
682 dnl Has the user specified one of the path options? 684 dnl Has the user specified one of the path options?
683 prefix | exec_prefix | bindir | datadir | statedir | libdir | \ 685 prefix | exec_prefix | bindir | datadir | statedir | libdir | \
684 mandir | infodir | infopath | lispdir | etcdir | lockdir | pkgdir | \ 686 mandir | infodir | infopath | lispdir | etcdir | lockdir | pkgdir | \
685 archlibdir | sitelispdir | docdir | package_path ) 687 archlibdir | docdir | package_path )
686 dnl If the value was omitted, get it from the next argument. 688 dnl If the value was omitted, get it from the next argument.
687 if test "$valomitted" = "yes"; then 689 if test "$valomitted" = "yes"; then
688 if test "$#" = 0; then 690 if test "$#" = 0; then
689 USAGE_ERROR("The \`--$optname' option requires a value."); 691 USAGE_ERROR("The \`--$optname' option requires a value.");
690 fi 692 fi
691 val="$1"; shift 693 val="$1"; shift
692 fi 694 fi
693 eval "$opt=\"$val\"" 695 eval "$opt=\"$val\""
694 696
695 dnl Changing exec_prefix or libdir will change the default value 697 dnl You need to synchronize this with the way the
696 dnl of archlibdir. Changing datadir will change the default value 698 dnl default values are built.
697 dnl of etcdir and lispdir. Changing statedir will change the 699 case "$opt" in
698 dnl default value of lockdir.
699 case "$opt" in
700 lispdir ) AC_DEFINE(LISPDIR_USER_DEFINED) ;; 700 lispdir ) AC_DEFINE(LISPDIR_USER_DEFINED) ;;
701 sitelispdir ) AC_DEFINE(SITELISPDIR_USER_DEFINED) ;; 701 dnl sitelispdir ) AC_DEFINE(SITELISPDIR_USER_DEFINED) ;;
702 etcdir ) AC_DEFINE(ETCDIR_USER_DEFINED) ;; 702 etcdir ) AC_DEFINE(ETCDIR_USER_DEFINED) ;;
703 infodir ) AC_DEFINE(INFODIR_USER_DEFINED) ;; 703 infodir ) AC_DEFINE(INFODIR_USER_DEFINED) ;;
704 infopath ) AC_DEFINE(INFOPATH_USER_DEFINED) ;; 704 infopath ) AC_DEFINE(INFOPATH_USER_DEFINED) ;;
705 package_path ) AC_DEFINE(PACKAGE_PATH_USER_DEFINED) ;; 705 package_path ) AC_DEFINE(PACKAGE_PATH_USER_DEFINED) ;;
706 datadir ) AC_DEFINE(ETCDIR_USER_DEFINED) ;; 706 datadir )
707 AC_DEFINE(INFODIR_USER_DEFINED)
708 AC_DEFINE(LISPDIR_USER_DEFINED)
709 AC_DEFINE(ETCDIR_USER_DEFINED) ;;
707 statedir | lockdir ) AC_DEFINE(LOCKDIR_USER_DEFINED) ;; 710 statedir | lockdir ) AC_DEFINE(LOCKDIR_USER_DEFINED) ;;
708 exec_prefix | libdir | archlibdir ) AC_DEFINE(ARCHLIBDIR_USER_DEFINED) ;; 711 exec_prefix | libdir | archlibdir ) AC_DEFINE(ARCHLIBDIR_USER_DEFINED) ;;
709 esac 712 esac
710 ;; 713 ;;
711 714
903 version="${version}-b${emacs_beta_version}" 906 version="${version}-b${emacs_beta_version}"
904 AC_DEFINE_UNQUOTED(EMACS_BETA_VERSION, $emacs_beta_version) 907 AC_DEFINE_UNQUOTED(EMACS_BETA_VERSION, $emacs_beta_version)
905 fi 908 fi
906 AC_DEFINE_UNQUOTED(XEMACS_CODENAME, "$xemacs_codename") 909 AC_DEFINE_UNQUOTED(XEMACS_CODENAME, "$xemacs_codename")
907 AC_DEFINE_UNQUOTED(EMACS_VERSION, "$version") 910 AC_DEFINE_UNQUOTED(EMACS_VERSION, "$version")
911
912 dnl InfoDock version numbers. XEmacs will use the same numbering after
913 dnl the release of 21.0.
914 AC_DEFINE_UNQUOTED(INFODOCK_MAJOR_VERSION, $infodock_major_version)
915 AC_DEFINE_UNQUOTED(INFODOCK_MINOR_VERSION, $infodock_minor_version)
916 AC_DEFINE_UNQUOTED(INFODOCK_BUILD_VERSION, $infodock_build_version)
908 917
909 dnl ---------------------------------- 918 dnl ----------------------------------
910 dnl Error checking and debugging flags 919 dnl Error checking and debugging flags
911 dnl ---------------------------------- 920 dnl ----------------------------------
912 dnl Error checking default to "yes" in beta versions, to "no" in releases. 921 dnl Error checking default to "yes" in beta versions, to "no" in releases.
2106 AC_CHECK_LIB(kstat, kstat_open) 2115 AC_CHECK_LIB(kstat, kstat_open)
2107 2116
2108 dnl Another way to get the load average 2117 dnl Another way to get the load average
2109 AC_CHECK_LIB(kvm, kvm_read) 2118 AC_CHECK_LIB(kvm, kvm_read)
2110 2119
2111 AC_CHECK_LIB(pthreads, cma_open) 2120 case "$opsys" in decosf*)
2112 if test "$ac_cv_lib_pthreads_cma_open" = "yes"; then 2121 AC_CHECK_LIB(pthreads, cma_open)
2113 case "$opsys" in decosf*) c_switch_site="$c_switch_site -threads";; esac 2122 test "$ac_cv_lib_pthreads_cma_open" = "yes" && \
2114 fi 2123 c_switch_site="$c_switch_site -threads" ;;
2124 esac
2115 2125
2116 AC_MSG_CHECKING(whether the -xildoff compiler flag is required) 2126 AC_MSG_CHECKING(whether the -xildoff compiler flag is required)
2117 if ${CC-cc} '-###' -xildon no_such_file.c 2>&1 | grep '^[^ ]*/ild ' > /dev/null ; then 2127 if ${CC-cc} '-###' -xildon no_such_file.c 2>&1 | grep '^[^ ]*/ild ' > /dev/null ; then
2118 if ${CC-cc} '-###' -xildoff no_such_file.c 2>&1 | grep '^[^ ]*/ild ' > /dev/null ; 2128 if ${CC-cc} '-###' -xildoff no_such_file.c 2>&1 | grep '^[^ ]*/ild ' > /dev/null ;
2119 then AC_MSG_RESULT(no); 2129 then AC_MSG_RESULT(no);
2192 XE_APPEND(lwlib, MAKE_SUBDIR) 2202 XE_APPEND(lwlib, MAKE_SUBDIR)
2193 XE_APPEND(lwlib, SRC_SUBDIR_DEPS) 2203 XE_APPEND(lwlib, SRC_SUBDIR_DEPS)
2194 2204
2195 dnl Try to find Motif/CDE/Tooltalk dirs 2205 dnl Try to find Motif/CDE/Tooltalk dirs
2196 dnl These take precedence over other X libs/includes, so PRE-pend 2206 dnl These take precedence over other X libs/includes, so PRE-pend
2197 for lib_dir in "/usr/dt/lib" "/usr/lib/Motif1.2" "/usr/lib/Motif1.1"; do 2207 for lib_dir in "/usr/dt/lib" "/usr/lib/Motif2.1" "/usr/lib/Motif1.2" "/usr/lib/Motif1.1"; do
2198 inc_dir=`echo $lib_dir | sed -e 's/lib/include/'` 2208 inc_dir=`echo $lib_dir | sed -e 's/lib/include/'`
2199 if test -d "$lib_dir" -a -d "$inc_dir"; then 2209 if test -d "$lib_dir" -a -d "$inc_dir"; then
2200 case "$x_libraries" in *"$lib_dir"* ) ;; *) 2210 case "$x_libraries" in *"$lib_dir"* ) ;; *)
2201 x_libraries="$lib_dir $x_libraries" 2211 x_libraries="$lib_dir $x_libraries"
2202 XE_PREPEND(-L${lib_dir}, X_LIBS) ;; 2212 XE_PREPEND(-L${lib_dir}, X_LIBS) ;;
2372 else 2382 else
2373 test "$with_scrollbars" != "no" && XE_ADD_OBJS(scrollbar-msw.o) 2383 test "$with_scrollbars" != "no" && XE_ADD_OBJS(scrollbar-msw.o)
2374 test "$with_menubars" != "no" && XE_ADD_OBJS(menubar-msw.o) 2384 test "$with_menubars" != "no" && XE_ADD_OBJS(menubar-msw.o)
2375 test "$with_toolbars" != "no" && XE_ADD_OBJS(toolbar-msw.o) 2385 test "$with_toolbars" != "no" && XE_ADD_OBJS(toolbar-msw.o)
2376 fi 2386 fi
2387 dnl check for our special version of select
2388 AC_TRY_RUN([#include <fcntl.h>
2389 int main() { return (open("/dev/windows", O_RDONLY, 0) > 0)? 0 : 1; }],
2390 [AC_DEFINE(HAVE_MSG_SELECT)])
2377 const_is_losing=no 2391 const_is_losing=no
2378 with_file_coding=yes 2392 with_file_coding=yes
2393 use_minimal_tagbits=yes
2394 use_indexed_lrecord_implementation=yes
2379 XE_ADD_OBJS(console-msw.o device-msw.o event-msw.o frame-msw.o objects-msw.o select-msw.o redisplay-msw.o glyphs-msw.o) 2395 XE_ADD_OBJS(console-msw.o device-msw.o event-msw.o frame-msw.o objects-msw.o select-msw.o redisplay-msw.o glyphs-msw.o)
2380 fi 2396 fi
2381 fi 2397 fi
2382 2398
2383 AC_SUBST(install_pp) 2399 AC_SUBST(install_pp)
2417 dnl XEmacs in --batch mode. 2433 dnl XEmacs in --batch mode.
2418 dnl if test "$with_tty" = "no" ; then 2434 dnl if test "$with_tty" = "no" ; then
2419 dnl AC_MSG_ERROR([No window system support and no TTY support - Unable to proceed.]) 2435 dnl AC_MSG_ERROR([No window system support and no TTY support - Unable to proceed.])
2420 dnl fi 2436 dnl fi
2421 for feature in tooltalk cde offix session xim xmu \ 2437 for feature in tooltalk cde offix session xim xmu \
2422 tiff png jpeg gif xface xpm 2438 xface
2423 do 2439 do
2424 if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then 2440 if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
2425 AC_MSG_WARN([--with-$feature ignored: Not valid without X support]) 2441 AC_MSG_WARN([--with-$feature ignored: Not valid without X support])
2426 fi 2442 fi
2427 eval "with_${feature}=no" 2443 eval "with_${feature}=no"
2534 XE_PREPEND(-lldap, LIBS) 2550 XE_PREPEND(-lldap, LIBS)
2535 fi 2551 fi
2536 fi 2552 fi
2537 2553
2538 dnl ---------------------- 2554 dnl ----------------------
2539 dnl X11 Graphics libraries 2555 dnl Graphics libraries
2540 dnl ---------------------- 2556 dnl ----------------------
2541 2557
2542 if test "$with_x11" = "yes"; then 2558 if test "$window_system" != "none"; then
2543 2559 AC_CHECKING(for graphics libraries)
2544 AC_CHECKING(for X11 graphics libraries)
2545
2546 dnl Too many stupid linkers can't detect cascaded lib dependencies until runtime
2547 dnl So we always search for libz compression support.
2548 if test "$with_png $with_tiff" != "no no"; then
2549 AC_CHECK_LIB(c, inflate, [:], [
2550 AC_CHECK_LIB(z, inflate, [XE_PREPEND(-lz, libs_x)],[
2551 AC_CHECK_LIB(gz, inflate, [XE_PREPEND(-lgz, libs_x)])])])
2552 fi
2553 2560
2554 dnl Autodetect Xpm 2561 dnl Autodetect Xpm
2555 if test -z "$with_xpm"; then 2562 if test -z "$with_xpm"; then
2556 AC_MSG_CHECKING(for Xpm - no older than 3.4f) 2563 AC_MSG_CHECKING(for Xpm - no older than 3.4f)
2557 xe_check_libs=-lXpm 2564 xe_check_libs=-lXpm
2571 xpm_problem="Xpm library version is too old!" 2578 xpm_problem="Xpm library version is too old!"
2572 else 2579 else
2573 xpm_problem="Internal xpm detection logic error!" 2580 xpm_problem="Internal xpm detection logic error!"
2574 fi 2581 fi
2575 echo " 2582 echo "
2576 *** WARNING *** $problem 2583 *** WARNING *** $problem
2577 I'm not touching that with a 10-foot pole! 2584 I'm not touching that with a 10-foot pole!
2578 If you really want to use the installed version of Xpm, rerun 2585 If you really want to use the installed version of Xpm, rerun
2579 configure --with-xpm=yes, but don't blame me if XEmacs crashes!" 2586 configure --with-xpm=yes, but don't blame me if XEmacs crashes!"
2580 fi], 2587 fi],
2581 [with_xpm=no]) 2588 [with_xpm=no])
2582 xe_check_libs= 2589 xe_check_libs=
2583 AC_MSG_RESULT($with_xpm) 2590 AC_MSG_RESULT($with_xpm)
2584 fi 2591 fi
2585 if test "$with_xpm" = "yes"; then 2592 if test "$with_xpm" = "yes"; then
2586 AC_DEFINE(HAVE_XPM) 2593 AC_DEFINE(HAVE_XPM)
2587 XE_PREPEND(-lXpm, libs_x) 2594 XE_PREPEND(-lXpm, libs_x)
2588 fi 2595 AC_MSG_CHECKING(for \"FOR_MSW\" xpm)
2589 2596 xe_check_libs=-lXpm
2590 dnl Autodetect XFACE 2597 AC_TRY_LINK(, [XpmCreatePixmapFromData()],
2591 test -z "$with_xface" && { AC_CHECK_HEADER(compface.h, ,with_xface=no) } 2598 [xpm_for_msw=no],
2592 test -z "$with_xface" && { AC_CHECK_LIB(compface, UnGenFace,[:] ,with_xface=no) } 2599 [xpm_for_msw=yes])
2593 test -z "$with_xface" && with_xface=yes 2600 xe_check_libs=
2594 if test "$with_xface" = "yes"; then 2601 AC_MSG_RESULT($xpm_for_msw)
2595 AC_DEFINE(HAVE_XFACE) 2602 if test "$xpm_for_msw" = "yes"; then
2596 XE_PREPEND(-lcompface, libs_x) 2603 AC_DEFINE(FOR_MSW)
2604 fi
2605 fi
2606
2607 dnl Too many stupid linkers can't detect cascaded lib dependencies until runtime
2608 dnl So we always search for libz compression support.
2609 if test "$with_png $with_tiff" != "no no"; then
2610 AC_CHECK_LIB(c, inflate, [:], [
2611 AC_CHECK_LIB(z, inflate, [XE_PREPEND(-lz, libs_x)],[
2612 AC_CHECK_LIB(gz, inflate, [XE_PREPEND(-lgz, libs_x)])])])
2597 fi 2613 fi
2598 2614
2599 dnl Autodetect GIFlib 2615 dnl Autodetect GIFlib
2600 AC_MSG_CHECKING(for giflib - no older than 3.1) 2616 AC_MSG_CHECKING(for giflib - no older than 3.1)
2601 test -z "$with_gif" && { AC_CHECK_HEADER(gif_lib.h, ,with_gif=no) } 2617 test -z "$with_gif" && { AC_CHECK_HEADER(gif_lib.h, ,with_gif=no) }
2638 test -z "$with_tiff" && { AC_CHECK_LIB(tiff, TIFFReadScanline,[:],with_tiff=no) } 2654 test -z "$with_tiff" && { AC_CHECK_LIB(tiff, TIFFReadScanline,[:],with_tiff=no) }
2639 test -z "$with_tiff" && with_tiff=yes 2655 test -z "$with_tiff" && with_tiff=yes
2640 if test "$with_tiff" = "yes"; then 2656 if test "$with_tiff" = "yes"; then
2641 AC_DEFINE(HAVE_TIFF) 2657 AC_DEFINE(HAVE_TIFF)
2642 XE_PREPEND(-ltiff, libs_x) 2658 XE_PREPEND(-ltiff, libs_x)
2659 fi
2660 fi
2661
2662 dnl ----------------------
2663 dnl Graphics libraries
2664 dnl ----------------------
2665
2666 if test "$with_x11" = "yes"; then
2667
2668 AC_CHECKING(for X11 graphics libraries)
2669
2670 dnl Autodetect XFACE
2671 test -z "$with_xface" && { AC_CHECK_HEADER(compface.h, ,with_xface=no) }
2672 test -z "$with_xface" && { AC_CHECK_LIB(compface, UnGenFace,[:] ,with_xface=no) }
2673 test -z "$with_xface" && with_xface=yes
2674 if test "$with_xface" = "yes"; then
2675 AC_DEFINE(HAVE_XFACE)
2676 XE_PREPEND(-lcompface, libs_x)
2643 fi 2677 fi
2644 2678
2645 dnl Autodetect -lXaw 2679 dnl Autodetect -lXaw
2646 AC_CHECK_LIB(Xaw, XawScrollbarSetThumb, have_xaw=yes, have_xaw=no) 2680 AC_CHECK_LIB(Xaw, XawScrollbarSetThumb, have_xaw=yes, have_xaw=no)
2647 dnl if test "$have_xaw" = "yes"; then 2681 dnl if test "$have_xaw" = "yes"; then
3503 3537
3504 AC_SUBST(version) 3538 AC_SUBST(version)
3505 AC_SUBST(configuration) 3539 AC_SUBST(configuration)
3506 AC_SUBST(canonical) 3540 AC_SUBST(canonical)
3507 AC_SUBST(srcdir) 3541 AC_SUBST(srcdir)
3508 AC_SUBST(prefix)
3509 AC_SUBST(exec_prefix)
3510 AC_SUBST(bindir) 3542 AC_SUBST(bindir)
3511 AC_SUBST(datadir) 3543 AC_SUBST(datadir)
3512 AC_SUBST(pkgdir) 3544 AC_SUBST(pkgdir)
3513 AC_SUBST(statedir) 3545 AC_SUBST(statedir)
3514 AC_SUBST(libdir) 3546 AC_SUBST(libdir)
3515 AC_SUBST(mandir) 3547 AC_SUBST(mandir)
3516 3548
3549 AC_SUBST(prefix)
3550 dnl Yo, Stephen Bourne! I want to marry you!
3551 PREFIX=$prefix
3552 while true; do
3553 case "$PREFIX" in
3554 *\$* ) eval "PREFIX=$PREFIX" ;;
3555 *) break ;;
3556 esac
3557 done
3558 AC_SUBST(PREFIX)
3559
3560 AC_SUBST(exec_prefix)
3561 EXEC_PREFIX=$exec_prefix
3562 while true; do
3563 case "$EXEC_PREFIX" in
3564 *\$* ) eval "EXEC_PREFIX=$EXEC_PREFIX" ;;
3565 *) break ;;
3566 esac
3567 done
3568 AC_SUBST(EXEC_PREFIX)
3569
3517 AC_SUBST(infodir) 3570 AC_SUBST(infodir)
3518 AC_SUBST(INFODIR_USER_DEFINED) 3571 AC_SUBST(INFODIR_USER_DEFINED)
3519 dnl Yo, Stephen Bourne! I want to marry you!
3520 INFODIR=$infodir 3572 INFODIR=$infodir
3521 while true; do 3573 while true; do
3522 case "$INFODIR" in 3574 case "$INFODIR" in
3523 *\$* ) eval "INFODIR=$INFODIR" ;; 3575 *\$* ) eval "INFODIR=$INFODIR" ;;
3524 *) break ;; 3576 *) break ;;
3557 *) break ;; 3609 *) break ;;
3558 esac 3610 esac
3559 done 3611 done
3560 AC_SUBST(LISPDIR) 3612 AC_SUBST(LISPDIR)
3561 3613
3562 AC_SUBST(sitelispdir) 3614 dnl AC_SUBST(sitelispdir)
3563 AC_SUBST(SITELISPDIR_USER_DEFINED) 3615 dnl AC_SUBST(SITELISPDIR_USER_DEFINED)
3564 SITELISPDIR=$sitelispdir 3616 dnl SITELISPDIR=$sitelispdir
3565 while true; do 3617 dnl while true; do
3566 case "$SITELISPDIR" in 3618 dnl case "$SITELISPDIR" in
3567 *\$* ) eval "SITELISPDIR=$SITELISPDIR" ;; 3619 dnl *\$* ) eval "SITELISPDIR=$SITELISPDIR" ;;
3568 *) break ;; 3620 dnl *) break ;;
3569 esac 3621 dnl esac
3570 done 3622 dnl done
3571 AC_SUBST(SITELISPDIR) 3623 dnl AC_SUBST(SITELISPDIR)
3572 3624
3573 AC_SUBST(etcdir) 3625 AC_SUBST(etcdir)
3574 AC_SUBST(ETCDIR_USER_DEFINED) 3626 AC_SUBST(ETCDIR_USER_DEFINED)
3575 ETCDIR=$etcdir 3627 ETCDIR=$etcdir
3576 while true; do 3628 while true; do