Mercurial > hg > xemacs-beta
comparison configure.in @ 151:59463afc5666 r20-3b2
Import from CVS: tag r20-3b2
author | cvs |
---|---|
date | Mon, 13 Aug 2007 09:37:19 +0200 |
parents | 538048ae2ab8 |
children | 25f70ba0133c |
comparison
equal
deleted
inserted
replaced
150:8ebb1c0f0f6f | 151:59463afc5666 |
---|---|
66 define([AC_CACHE_LOAD], )dnl | 66 define([AC_CACHE_LOAD], )dnl |
67 define([AC_CACHE_SAVE], )dnl | 67 define([AC_CACHE_SAVE], )dnl |
68 define([AC_CACHE_VAL], [ | 68 define([AC_CACHE_VAL], [ |
69 $2 | 69 $2 |
70 ])dnl | 70 ])dnl |
71 | |
72 dnl Redefine AC_TRY_RUN_NATIVE to not throw away stderr while running | |
73 dnl AC_TRY_RUN_NATIVE(PROGRAM, [ACTION-IF-TRUE [, ACTION-IF-FALSE]]) | |
74 define([AC_TRY_RUN_NATIVE], | |
75 [cat > conftest.$ac_ext <<EOF | |
76 [#]line __oline__ "configure" | |
77 #include "confdefs.h" | |
78 [$1] | |
79 EOF | |
80 if AC_TRY_EVAL(ac_link) && test -s conftest && (./conftest; exit) 2>&AC_FD_CC | |
81 then | |
82 dnl Do not remove the temporary files here, so they can be examined. | |
83 ifelse([$2], , :, [$2]) | |
84 else | |
85 echo "configure: failed program was:" >&AC_FD_CC | |
86 cat conftest.$ac_ext >&AC_FD_CC | |
87 ifelse([$3], , , [ rm -fr conftest* | |
88 $3 | |
89 ])dnl | |
90 fi | |
91 rm -fr conftest*]) | |
92 | |
71 | 93 |
72 dnl Avoid spurious cross-compiling warnings from AC_TRY_RUN | 94 dnl Avoid spurious cross-compiling warnings from AC_TRY_RUN |
73 dnl XEmacs is unlikely to ever cross-compile | 95 dnl XEmacs is unlikely to ever cross-compile |
74 define([AC_TRY_RUN],[AC_TRY_RUN_NATIVE([$1], [$2], [$3])])dnl | 96 define([AC_TRY_RUN],[AC_TRY_RUN_NATIVE([$1], [$2], [$3])])dnl |
75 | 97 |
104 dnl Support --with-dnet=no | 126 dnl Support --with-dnet=no |
105 | 127 |
106 dnl AC_CHECK_LIB(LIBRARY, FUNCTION [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND | 128 dnl AC_CHECK_LIB(LIBRARY, FUNCTION [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND |
107 dnl [, OTHER-LIBRARIES] [, LDFLAGS]]]]) | 129 dnl [, OTHER-LIBRARIES] [, LDFLAGS]]]]) |
108 define([AC_CHECK_LIB], | 130 define([AC_CHECK_LIB], |
109 [ifelse([$1],dnet, [if test "$with_dnet" = "no"; then | 131 [ifelse([$1],dnet, [if test "$with_dnet" = "no" ; then |
110 ac_cv_lib_dnet_dnet_ntoa=no | 132 ac_cv_lib_dnet_dnet_ntoa=no |
111 ifelse([$4], , , [$4] | 133 ifelse([$4], , , [$4] |
112 )dnl | 134 )dnl |
113 else | 135 else |
114 ])] | 136 ])] |
143 [$2()], | 165 [$2()], |
144 eval "ac_cv_lib_$ac_lib_var=yes", | 166 eval "ac_cv_lib_$ac_lib_var=yes", |
145 eval "ac_cv_lib_$ac_lib_var=no") | 167 eval "ac_cv_lib_$ac_lib_var=no") |
146 xe_check_libs="" | 168 xe_check_libs="" |
147 ])dnl | 169 ])dnl |
148 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | 170 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then |
149 AC_MSG_RESULT(yes) | 171 AC_MSG_RESULT(yes) |
150 ifelse([$3], , | 172 ifelse([$3], , |
151 [changequote(, )dnl | 173 [changequote(, )dnl |
152 ac_tr_lib=HAVE_LIB`echo $1 | sed -e 's/[^a-zA-Z0-9_]/_/g' \ | 174 ac_tr_lib=HAVE_LIB`echo $1 | sed -e 's/[^a-zA-Z0-9_]/_/g' \ |
153 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` | 175 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` |
154 changequote([, ])dnl | 176 changequote([, ])dnl |
155 AC_DEFINE_UNQUOTED($ac_tr_lib) | 177 AC_DEFINE_UNQUOTED($ac_tr_lib) |
156 LIBS="-l$1 $LIBS" | 178 XE_PREPEND([-l$1], LIBS) |
157 ], [$3]) | 179 ], [$3]) |
158 else | 180 else |
159 AC_MSG_RESULT(no) | 181 AC_MSG_RESULT(no) |
160 ifelse([$4], , , [$4 | 182 ifelse([$4], , , [$4 |
161 ])dnl | 183 ])dnl |
169 ac_ext=c | 191 ac_ext=c |
170 dnl CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. | 192 dnl CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. |
171 dnl ac_cpp='$CPP $CPPFLAGS' | 193 dnl ac_cpp='$CPP $CPPFLAGS' |
172 dnl ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&AC_FD_CC' | 194 dnl ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&AC_FD_CC' |
173 dnl ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&AC_FD_CC' | 195 dnl ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&AC_FD_CC' |
174 xe_cppflags='$c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS $CPPFLAGS' # $c_switch_x_machine $c_switch_x_system' | 196 dnl # $c_switch_x_machine $c_switch_x_system |
175 xe_ldflags='$ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site' # $ld_switch_x_machine $ld_switch_x_system' | 197 dnl # $ld_switch_x_machine $ld_switch_x_system |
198 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS' | |
199 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run' | |
176 xe_libs='$xe_check_libs $X_PRE_LIBS $libs_x $X_EXTRA_LIBS $LIBS $libs_machine $libs_system $libs_standard' | 200 xe_libs='$xe_check_libs $X_PRE_LIBS $libs_x $X_EXTRA_LIBS $LIBS $libs_machine $libs_system $libs_standard' |
177 ac_cpp='$CPP '"$xe_cppflags" | 201 ac_cpp='$CPP '"$xe_cppflags" |
178 ac_compile='${CC-cc} -c '"$CFLAGS $xe_cppflags"' conftest.$ac_ext 1>&AC_FD_CC' | 202 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&AC_FD_CC' |
179 ac_link='${CC-cc} -o conftest '"$CFLAGS $xe_cppflags $LDFLAGS $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&AC_FD_CC' | 203 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&AC_FD_CC' |
180 cross_compiling=no | 204 cross_compiling=no |
181 ]) | 205 ]) |
206 | |
207 | |
208 dnl XE_ADD_OBJS(foo.o ...) | |
209 define([XE_ADD_OBJS], | |
210 [extra_objs="$extra_objs [$1]" && dnl | |
211 if test "$extra_verbose" = "yes"; then | |
212 echo " xemacs will be linked with \"[$1]\"" | |
213 fi]) | |
214 | |
215 dnl XE_APPEND(value, varname) | |
216 define([XE_APPEND], | |
217 [[$2]="$[$2] [$1]" && dnl | |
218 if test "$extra_verbose" = "yes"; then echo " Appending \"[$1]\" to \$[$2]"; fi]) | |
219 | |
220 dnl XE_PREPEND(value, varname) | |
221 define([XE_PREPEND], | |
222 [[$2]="[$1] $[$2]" && dnl | |
223 if test "$extra_verbose" = "yes"; then echo " Prepending \"[$1]\" to \$[$2]"; fi]) | |
224 | |
225 | |
226 dnl Initialize some variables set by options. | |
227 dnl The variables have the same names as the options, with | |
228 dnl dashes changed to underlines. | |
182 | 229 |
183 define([AC_INIT_PARSE_ARGS],[ | 230 define([AC_INIT_PARSE_ARGS],[ |
184 dnl Initialize some variables set by options. | 231 dnl Initialize some variables set by options. |
185 dnl The variables have the same names as the options, with | 232 dnl The variables have the same names as the options, with |
186 dnl dashes changed to underlines. | 233 dnl dashes changed to underlines. |
247 dnl ----------------------------- | 294 dnl ----------------------------- |
248 | 295 |
249 dnl Prevent autoconf2 caching | 296 dnl Prevent autoconf2 caching |
250 cache_file=/dev/null | 297 cache_file=/dev/null |
251 | 298 |
252 MAKE_SUBDIR="src lib-src" | 299 XE_APPEND(lib-src, MAKE_SUBDIR) |
253 | 300 |
254 dnl run_in_place='no' | 301 dnl run_in_place='no' |
255 prefix='/usr/local' | 302 prefix='/usr/local' |
256 exec_prefix='${prefix}' | 303 exec_prefix='${prefix}' |
257 bindir='${exec_prefix}/bin' | 304 bindir='${exec_prefix}/bin' |
286 use_system_malloc='default' | 333 use_system_malloc='default' |
287 energize_version='' | 334 energize_version='' |
288 native_sound_lib='' | 335 native_sound_lib='' |
289 dnl make normal error-checking be the default in alpha and beta versions, so | 336 dnl make normal error-checking be the default in alpha and beta versions, so |
290 dnl that bugs get noticed. Change this for released versions. | 337 dnl that bugs get noticed. Change this for released versions. |
291 error_check_default='no' | 338 error_check_default='yes' |
292 error_check_extents=$error_check_default | 339 error_check_extents=$error_check_default |
293 error_check_typecheck=$error_check_default | 340 error_check_typecheck=$error_check_default |
294 error_check_bufpos=$error_check_default | 341 error_check_bufpos=$error_check_default |
295 error_check_gc=$error_check_default | 342 error_check_gc=$error_check_default |
296 error_check_malloc=$error_check_default | 343 error_check_malloc=$error_check_default |
297 dnl debug=yes must be set when error checking is present. This should be | 344 dnl debug=yes must be set when error checking is present. This should be |
298 dnl fixed up. | 345 dnl fixed up. |
299 debug=$error_check_default | 346 debug=$error_check_default |
347 dnl Default to --extra-verbose when debugging | |
348 extra_verbose=$error_check_default | |
300 dnl use-assertions should be 'yes' by default. Too many people in this | 349 dnl use-assertions should be 'yes' by default. Too many people in this |
301 dnl world have core dumps turned off by default or \"cannot find where the | 350 dnl world have core dumps turned off by default or \"cannot find where the |
302 dnl core file went\". At least we should get some useful output ... | 351 dnl core file went\". At least we should get some useful output ... |
303 use_assertions='yes' | 352 use_assertions='yes' |
304 dnl the following is set to yes or no later. | 353 dnl the following is set to yes or no later. |
436 --with-kerberos support Kerberos-authenticated POP | 485 --with-kerberos support Kerberos-authenticated POP |
437 --with-hesiod support Hesiod to get the POP server host | 486 --with-hesiod support Hesiod to get the POP server host |
438 --with-dnet (*) Compile with support for DECnet. | 487 --with-dnet (*) Compile with support for DECnet. |
439 --mail-locking=TYPE (*) Specify the locking to be used by movemail to prevent | 488 --mail-locking=TYPE (*) Specify the locking to be used by movemail to prevent |
440 concurrent updates of mail spool files. Valid types | 489 concurrent updates of mail spool files. Valid types |
441 are \`lockf', \`flock', and \`lock-file'. | 490 are \`lockf', \`flock', and \`file'. |
442 | 491 |
443 Internationalization options: | 492 Internationalization options: |
444 | 493 |
445 --with-mule Compile with Mule (MUlti-Lingual Emacs) support, | 494 --with-mule Compile with Mule (MUlti-Lingual Emacs) support, |
446 needed to suport non-Latin-1 (including Asian) languages. | 495 needed to suport non-Latin-1 (including Asian) languages. |
447 --with-xim=xlib Compile with support for X input methods, | 496 --with-xim=xlib Compile with support for X input methods, |
448 --with-xim=motif (*) Used in conjunction with Mule support. | 497 --with-xim=motif (*) Used in conjunction with Mule support. |
449 Use either raw Xlib to provide XIM support, or | 498 Use either raw Xlib to provide XIM support, or |
450 the Motif XmIm* routines (when available). | 499 the Motif XmIm* routines (when available). |
451 If the XmIm* routines are autodetected, | 500 NOTE: On some systems bugs in X11's XIM support |
452 then the default is --with-xim=motif, else --with-xim=no. | 501 will cause XEmacs to crash, so by default, |
453 NOTE: On some systems like SunOS4 use of this option | 502 no XIM support is compiled in, unless running |
454 will cause XEmacs to crash at startup. | 503 on Solaris and the XmIm* routines are detected. |
455 --with-canna (*) Compile with support for Canna (a Japanese input method | 504 --with-canna (*) Compile with support for Canna (a Japanese input method |
456 used in conjunction with Mule support). | 505 used in conjunction with Mule support). |
457 --with-wnn (*) Compile with support for WNN (a multi-language input method | 506 --with-wnn (*) Compile with support for WNN (a multi-language input method |
458 used in conjunction with Mule support). | 507 used in conjunction with Mule support). |
459 This is beta level code. | 508 This is beta level code. |
681 with_database_berkdb=no | 730 with_database_berkdb=no |
682 with_database_dbm=no | 731 with_database_dbm=no |
683 with_database_gnudbm=no | 732 with_database_gnudbm=no |
684 for x in `echo "$val" | sed 's/,/ /'` ; do | 733 for x in `echo "$val" | sed 's/,/ /'` ; do |
685 case "$x" in | 734 case "$x" in |
686 no ) : ;; | 735 no ) ;; |
687 b | be | ber | berk | berkd | berkdb ) with_database_berkdb=yes ;; | 736 b | be | ber | berk | berkd | berkdb ) with_database_berkdb=yes ;; |
688 d | db | dbm ) with_database_dbm=yes ;; | 737 d | db | dbm ) with_database_dbm=yes ;; |
689 g | gn | gnu | gnud | gnudb | gnudbm ) with_database_gnudbm=yes ;; | 738 g | gn | gnu | gnud | gnudb | gnudbm ) with_database_gnudbm=yes ;; |
690 * ) USAGE_ERROR(["The \`--$optname' option value | 739 * ) USAGE_ERROR(["The \`--$optname' option value |
691 must be either \`no' or a comma-separated list | 740 must be either \`no' or a comma-separated list |
692 of one or more of \`berkdb', \`dbm', or \`gnudbm'."]) ;; | 741 of one or more of \`berkdb', \`dbm', or \`gnudbm'."]) ;; |
693 esac | 742 esac |
694 done | 743 done |
695 if test "$with_database_dbm" = "yes" -a \ | 744 if test "$with_database_dbm" = "yes" -a \ |
696 "$with_database_gnudbm" = "yes" ; then | 745 "$with_database_gnudbm" = "yes"; then |
697 USAGE_ERROR("Only one of \`dbm' and \`gnudbm' may be specified | 746 USAGE_ERROR("Only one of \`dbm' and \`gnudbm' may be specified |
698 with the \`--$optname' option.") | 747 with the \`--$optname' option.") |
699 fi | 748 fi |
700 ;; | 749 ;; |
701 | 750 |
731 dnl Mail locking specification | 780 dnl Mail locking specification |
732 "mail_locking" ) | 781 "mail_locking" ) |
733 case "$val" in | 782 case "$val" in |
734 lockf ) val=lockf ;; | 783 lockf ) val=lockf ;; |
735 flock ) val=flock ;; | 784 flock ) val=flock ;; |
736 file ) val=file ;; | 785 file ) val=file ;; |
737 * ) USAGE_ERROR(["The \`--$optname' option must have one of these values: | 786 * ) USAGE_ERROR(["The \`--$optname' option must have one of these values: |
738 \`lockf', \`flock', or \`file'."]) ;; | 787 \`lockf', \`flock', or \`file'."]) ;; |
739 esac | 788 esac |
740 eval "$opt=\"$val\"" | 789 eval "$opt=\"$val\"" |
741 ;; | 790 ;; |
776 else | 825 else |
777 types="\`all', \`none' (default), \`extents', \`typecheck', \`bufpos', \`gc', and \`malloc'." | 826 types="\`all', \`none' (default), \`extents', \`typecheck', \`bufpos', \`gc', and \`malloc'." |
778 fi | 827 fi |
779 USAGE_ERROR(["Valid types for the \`--$optname' option are: | 828 USAGE_ERROR(["Valid types for the \`--$optname' option are: |
780 $types."]) | 829 $types."]) |
781 elif test "$new_default" ; then | 830 elif test -n "$new_default" ; then |
782 error_check_extents=$new_default | 831 error_check_extents=$new_default |
783 error_check_typecheck=$new_default | 832 error_check_typecheck=$new_default |
784 error_check_bufpos=$new_default | 833 error_check_bufpos=$new_default |
785 error_check_gc=$new_default | 834 error_check_gc=$new_default |
786 error_check_malloc=$new_default | 835 error_check_malloc=$new_default |
798 dnl Has the user specified one of the path options? | 847 dnl Has the user specified one of the path options? |
799 prefix | exec_prefix | bindir | datadir | statedir | libdir | \ | 848 prefix | exec_prefix | bindir | datadir | statedir | libdir | \ |
800 mandir | infodir | lispdir | etcdir | lockdir | archlibdir | \ | 849 mandir | infodir | lispdir | etcdir | lockdir | archlibdir | \ |
801 sitelispdir | docdir ) | 850 sitelispdir | docdir ) |
802 dnl If the value was omitted, get it from the next argument. | 851 dnl If the value was omitted, get it from the next argument. |
803 if test "$valomitted" = "yes" ; then | 852 if test "$valomitted" = "yes"; then |
804 if test "$#" = 0 ; then | 853 if test "$#" = 0; then |
805 USAGE_ERROR("The \`--$optname' option requires a value."); | 854 USAGE_ERROR("The \`--$optname' option requires a value."); |
806 fi | 855 fi |
807 val="$1"; shift | 856 val="$1"; shift |
808 fi | 857 fi |
809 eval "$opt=\"$val\"" | 858 eval "$opt=\"$val\"" |
877 eval set x "$quoted_arguments"; shift | 926 eval set x "$quoted_arguments"; shift |
878 | 927 |
879 dnl Argument interdependencies | 928 dnl Argument interdependencies |
880 if test "$with_energize" = "yes" ; then | 929 if test "$with_energize" = "yes" ; then |
881 with_menubars=lucid with_scrollbars=motif with_dialogs=motif with_tooltalk=yes | 930 with_menubars=lucid with_scrollbars=motif with_dialogs=motif with_tooltalk=yes |
882 MAKE_SUBDIR="$MAKE_SUBDIR lwlib/energize" | 931 XE_APPEND(lwlib/energize, MAKE_SUBDIR) |
883 fi | 932 fi |
884 | 933 |
885 dnl --extra-verbose implies --verbose | 934 dnl --extra-verbose implies --verbose |
886 test "$extra_verbose" = "yes" && verbose=yes | 935 test "$extra_verbose" = "yes" && verbose=yes |
887 | |
888 dnl Sun Development environment support | |
889 test "$with_sparcworks" = "yes" && with_workshop=yes # compatibility alias | |
890 if test "$with_workshop" = "yes"; then | |
891 AC_DEFINE(SUNPRO) | |
892 extra_objs="$extra_objs sunpro.o" | |
893 with_tooltalk=yes | |
894 fi | |
895 | 936 |
896 dnl Allow use of either ":" or spaces for lists of directories | 937 dnl Allow use of either ":" or spaces for lists of directories |
897 define(COLON_TO_SPACE, | 938 define(COLON_TO_SPACE, |
898 [case "[$1]" in *:* [)] [$1]="`echo $[$1] | sed 's/:/ /g'`";; esac])dnl | 939 [case "[$1]" in *:* [)] [$1]="`echo $[$1] | sed 's/:/ /g'`";; esac])dnl |
899 COLON_TO_SPACE(site_includes) | 940 COLON_TO_SPACE(site_includes) |
900 COLON_TO_SPACE(site_libraries) | 941 COLON_TO_SPACE(site_libraries) |
901 COLON_TO_SPACE(site_runtime_libraries) | 942 COLON_TO_SPACE(site_runtime_libraries) |
902 | |
903 dnl debug implies other options | |
904 if test "$debug" = "yes"; then | |
905 use_assertions=yes memory_usage_stats=yes | |
906 extra_objs="$extra_objs debug.o" | |
907 fi | |
908 | 943 |
909 dnl with_x is obsolete synonym for with_x11 | 944 dnl with_x is obsolete synonym for with_x11 |
910 test -n "$with_x" && with_x11="$with_x" | 945 test -n "$with_x" && with_x11="$with_x" |
911 | 946 |
912 dnl# Ignore useless run-in-place flag | 947 dnl# Ignore useless run-in-place flag |
1010 vpath %.l $(srcdir)\ | 1045 vpath %.l $(srcdir)\ |
1011 vpath %.s $(srcdir)\ | 1046 vpath %.s $(srcdir)\ |
1012 vpath %.in $(srcdir)' | 1047 vpath %.in $(srcdir)' |
1013 fi | 1048 fi |
1014 | 1049 |
1015 dnl Make the necessary directories, if they do not exist. | |
1016 for dir in ./src ./lib-src ./dynodump ./lwlib ./lock ; do | |
1017 test ! -d "$dir" && mkdir "$dir" | |
1018 done | |
1019 if test "$with_energize" = "yes" -a ! -d ./lwlib/energize; then | |
1020 mkdir ./lwlib/energize | |
1021 fi | |
1022 | |
1023 dnl ------------------------------ | 1050 dnl ------------------------------ |
1024 dnl Determine the s&m files to use | 1051 dnl Determine the s&m files to use |
1025 dnl ------------------------------ | 1052 dnl ------------------------------ |
1026 dnl Given the configuration name, set machfile and opsysfile to the | 1053 dnl Given the configuration name, set machfile and opsysfile to the |
1027 dnl names of the m/*.h and s/*.h files we should use. | 1054 dnl names of the m/*.h and s/*.h files we should use. |
1055 | 1082 |
1056 dnl Eric Raymond says we should accept strings like "sysvr4" to mean | 1083 dnl Eric Raymond says we should accept strings like "sysvr4" to mean |
1057 dnl "System V Release 4"; he writes, "The old convention encouraged" | 1084 dnl "System V Release 4"; he writes, "The old convention encouraged" |
1058 dnl "confusion between `system' and `release' levels'." | 1085 dnl "confusion between `system' and `release' levels'." |
1059 | 1086 |
1060 machine='' opsys='' need_dynodump=no | 1087 machine='' opsys='' |
1061 | 1088 |
1062 dnl Straightforward machine determination | 1089 dnl Straightforward machine determination |
1063 case "$canonical" in | 1090 case "$canonical" in |
1064 sparc-*-* ) machine=sparc ;; | 1091 sparc-*-* ) machine=sparc ;; |
1065 alpha-*-* ) machine=alpha ;; | 1092 alpha-*-* ) machine=alpha ;; |
1116 *-*-sysv2.2 | *-*-sysvr2.2 ) opsys=usg5-2-2 ;; | 1143 *-*-sysv2.2 | *-*-sysvr2.2 ) opsys=usg5-2-2 ;; |
1117 *-*-sysv3* | *-*-sysvr3* ) opsys=usg5-3 ;; | 1144 *-*-sysv3* | *-*-sysvr3* ) opsys=usg5-3 ;; |
1118 *-*-sysv4.1* | *-*-sysvr4.1* )opsys=usg5-4 NON_GNU_CPP=/usr/lib/cpp ;; | 1145 *-*-sysv4.1* | *-*-sysvr4.1* )opsys=usg5-4 NON_GNU_CPP=/usr/lib/cpp ;; |
1119 *-*-sysv4.[[2-9]]* | *-sysvr4.[[2-9]]* ) | 1146 *-*-sysv4.[[2-9]]* | *-sysvr4.[[2-9]]* ) |
1120 if test -z "$NON_GNU_CPP" ; then | 1147 if test -z "$NON_GNU_CPP" ; then |
1121 if test -f /usr/ccs/lib/cpp | 1148 for prog in "/usr/ccs/lib/cpp" "/lib/cpp"; do |
1122 then NON_GNU_CPP=/usr/ccs/lib/cpp | 1149 if test -f "$prog"; then NON_GNU_CPP="$prog"; break; fi |
1123 else NON_GNU_CPP=/lib/cpp | 1150 done |
1124 fi | |
1125 fi | 1151 fi |
1126 opsys=usg5-4-2 ;; | 1152 opsys=usg5-4-2 ;; |
1127 *-sysv4* | *-sysvr4* ) opsys=usg5-4 ;; | 1153 *-sysv4* | *-sysvr4* ) opsys=usg5-4 ;; |
1128 *-*-mach_bsd4.3* ) opsys=mach-bsd4-3 ;; | 1154 *-*-mach_bsd4.3* ) opsys=mach-bsd4-3 ;; |
1129 esac | 1155 esac |
1251 case "$canonical" in | 1277 case "$canonical" in |
1252 *-hp-hpux7* ) opsys=hpux ;; | 1278 *-hp-hpux7* ) opsys=hpux ;; |
1253 *-hp-hpux8* ) opsys=hpux8 ;; | 1279 *-hp-hpux8* ) opsys=hpux8 ;; |
1254 *-hp-hpux9* ) opsys=hpux9 ;; | 1280 *-hp-hpux9* ) opsys=hpux9 ;; |
1255 *-hp-hpux10* ) opsys=hpux10 ;; | 1281 *-hp-hpux10* ) opsys=hpux10 ;; |
1256 * ) | 1282 * ) opsys=hpux ;; |
1257 case "`uname -r`" in | |
1258 *.B8.* ) opsys=hpux8 ;; | |
1259 *.08.* ) opsys=hpux8 ;; | |
1260 *.09.* ) opsys=hpux9 ;; | |
1261 *.10.* ) opsys=hpux10 ;; | |
1262 * ) opsys=hpux ;; | |
1263 esac | |
1264 ;; | |
1265 esac | 1283 esac |
1266 | 1284 |
1267 dnl HP has a broken "strcat" | 1285 dnl HP has a broken "strcat" |
1268 case "$opsys" in hpux9 | hpux10 ) extra_objs="$extra_objs strcat.o";; esac | 1286 case "$opsys" in hpux9 | hpux10 ) XE_ADD_OBJS(strcat.o) ;; esac |
1269 | 1287 |
1270 if test "$opsys" = "hpux10"; then ansi_flag="-Ae"; else ansi_flag="-Aa"; fi | 1288 if test "$opsys" = "hpux10"; then ansi_flag="-Ae"; else ansi_flag="-Aa"; fi |
1271 NON_GNU_CC="cc $ansi_flag" NON_GNU_CPP="cc $ansi_flag -E" | 1289 NON_GNU_CC="cc $ansi_flag" NON_GNU_CPP="cc $ansi_flag -E" |
1272 | 1290 |
1273 case "$canonical" in *-hp-hpux*shr* ) opsys="${opsys}-shr" ;; esac | 1291 case "$canonical" in *-hp-hpux*shr* ) opsys="${opsys}-shr" ;; esac |
1411 *-sunos4* ) | 1429 *-sunos4* ) |
1412 test -f /usr/lib/cpp && NON_GNU_CPP=/usr/lib/cpp ;; | 1430 test -f /usr/lib/cpp && NON_GNU_CPP=/usr/lib/cpp ;; |
1413 *-solaris2* ) | 1431 *-solaris2* ) |
1414 test -f /usr/ccs/lib/cpp && NON_GNU_CPP=/usr/ccs/lib/cpp | 1432 test -f /usr/ccs/lib/cpp && NON_GNU_CPP=/usr/ccs/lib/cpp |
1415 RANLIB=':' | 1433 RANLIB=':' |
1416 case "$canonical" in *-solaris2.[[0-5]]* ) need_dynodump=yes ;; esac | 1434 esac |
1417 esac | |
1418 | 1435 |
1419 case "$canonical" in | 1436 case "$canonical" in |
1420 dnl The last Sun386 ran 4.0. | 1437 dnl The last Sun386 ran 4.0. |
1421 i[[3-9]]86-*-sunos4*) opsys=sunos4-0 ;; | 1438 i[[3-9]]86-*-sunos4*) opsys=sunos4-0 ;; |
1422 *-sunos4.0* ) opsys=sunos4-0 ;; | 1439 *-sunos4.0* ) opsys=sunos4-0 ;; |
1550 | 1567 |
1551 dnl -------------------------------------------------- | 1568 dnl -------------------------------------------------- |
1552 dnl Determine the compiler, set up for feature testing | 1569 dnl Determine the compiler, set up for feature testing |
1553 dnl -------------------------------------------------- | 1570 dnl -------------------------------------------------- |
1554 | 1571 |
1572 dnl debug implies other options | |
1573 if test "$debug" = "yes"; then | |
1574 use_assertions=yes memory_usage_stats=yes | |
1575 XE_ADD_OBJS(debug.o) | |
1576 fi | |
1577 | |
1578 dnl Sun Development environment support | |
1579 test "$with_sparcworks" = "yes" && with_workshop=yes # compatibility alias | |
1580 if test "$with_workshop" = "yes"; then | |
1581 AC_DEFINE(SUNPRO) | |
1582 XE_ADD_OBJS(sunpro.o) | |
1583 with_tooltalk=yes | |
1584 fi | |
1585 | |
1555 dnl Choose a compiler. | 1586 dnl Choose a compiler. |
1556 test -n "$CC" && cc_specified=yes | 1587 test -n "$CC" && cc_specified=yes |
1557 | 1588 |
1558 dnl Save the value of CFLAGS that the user specified. | 1589 dnl Save the value of CFLAGS that the user specified. |
1559 SPECIFIED_CFLAGS="$CFLAGS" | 1590 SPECIFIED_CFLAGS="$CFLAGS" |
1562 | 1593 |
1563 dnl Some systems specify a CPP or CC to use unless we are using GCC. | 1594 dnl Some systems specify a CPP or CC to use unless we are using GCC. |
1564 test -n "$NON_GNU_CC" -a "$with_gcc" = "no" -a -z "$CC" && CC="$NON_GNU_CC" | 1595 test -n "$NON_GNU_CC" -a "$with_gcc" = "no" -a -z "$CC" && CC="$NON_GNU_CC" |
1565 AC_PROG_CC | 1596 AC_PROG_CC |
1566 | 1597 |
1567 if test "$with_gcc" = "no" -a "$ac_cv_prog_gcc" = "yes"; then | 1598 if test "$with_gcc" = "no" -a "$ac_cv_prog_gcc" = "yes"; then |
1568 CC=${NON_GNU_CC-cc} | 1599 CC=${NON_GNU_CC-cc} |
1569 AC_PROG_CC | 1600 AC_PROG_CC |
1570 elif test "$with_gcc" = "yes" -a "$ac_cv_prog_gcc" = "no" ; then | 1601 elif test "$with_gcc" = "yes" -a "$ac_cv_prog_gcc" = "no" ; then |
1571 CC=gcc | 1602 CC=gcc |
1572 AC_PROG_CC | 1603 AC_PROG_CC |
1573 fi | 1604 fi |
1574 | 1605 |
1575 if test "$GCC" = "yes"; then with_gcc=yes; else with_gcc=no; fi | 1606 if test "$GCC" = "yes"; then with_gcc=yes; else with_gcc=no; fi |
1576 test -n "$NON_GNU_CPP" -a "$with_gcc" = "no" -a -z "$CPP" && CPP="$NON_GNU_CPP" | 1607 test -n "$NON_GNU_CPP" -a "$with_gcc" = "no" -a -z "$CPP" && CPP="$NON_GNU_CPP" |
1577 | 1608 |
1578 AC_PROG_CPP | 1609 AC_PROG_CPP |
1579 | 1610 |
1580 case "$canonical" in | 1611 case "$canonical" in |
1581 *-sun-sunos* ) test "$CPP" = "acc -E" && CPP="acc -E -Xs" ;; | 1612 *-sun-sunos* ) test "$CPP" = "acc -E" && CPP="acc -E -Xs" ;; |
1582 esac | 1613 esac |
1583 | 1614 |
1584 dnl -------------------------------------------------------------------- | 1615 dnl -------------------------------------------------------------------- |
1585 dnl Extract some information from the operating system and machine files | 1616 dnl Extract some information from the operating system and machine files |
1586 dnl -------------------------------------------------------------------- | 1617 dnl -------------------------------------------------------------------- |
1603 tempcname="conftest.c" | 1634 tempcname="conftest.c" |
1604 | 1635 |
1605 dnl CPP_to_sh(CPP_SYMBOL, SH_VAR, DEFAULT_VALUE) | 1636 dnl CPP_to_sh(CPP_SYMBOL, SH_VAR, DEFAULT_VALUE) |
1606 define([CPP_to_sh], | 1637 define([CPP_to_sh], |
1607 [[#]ifndef [$1] | 1638 [[#]ifndef [$1] |
1608 [#]define [$1] [$3] | 1639 [#]define [$1]ifelse([$3],,, [ $3]) |
1609 [#]endif | 1640 [#]endif |
1610 configure___ [$2]=[$1] | 1641 configure___ [$2]=[$1] |
1611 ]) | 1642 ]) |
1612 | 1643 |
1613 dnl CPP_boolean_to_sh(CPP_SYMBOL, SH_VAR) | 1644 dnl CPP_boolean_to_sh(CPP_SYMBOL, SH_VAR) |
1645 | 1676 |
1646 CPP_boolean_to_sh(SYSTEM_MALLOC, system_malloc) | 1677 CPP_boolean_to_sh(SYSTEM_MALLOC, system_malloc) |
1647 CPP_boolean_to_sh(TERMINFO, have_terminfo) | 1678 CPP_boolean_to_sh(TERMINFO, have_terminfo) |
1648 CPP_boolean_to_sh(MAIL_USE_FLOCK, mail_use_flock) | 1679 CPP_boolean_to_sh(MAIL_USE_FLOCK, mail_use_flock) |
1649 CPP_boolean_to_sh(MAIL_USE_LOCKF, mail_use_lockf) | 1680 CPP_boolean_to_sh(MAIL_USE_LOCKF, mail_use_lockf) |
1650 CPP_boolean_to_sh(__SUNPRO_C, sunpro_c) | |
1651 | 1681 |
1652 #ifdef THIS_IS_CONFIGURE | 1682 #ifdef THIS_IS_CONFIGURE |
1653 | 1683 |
1654 /* Get the CFLAGS for tests in configure. */ | 1684 /* Get the CFLAGS for tests in configure. */ |
1655 #ifdef __GNUC__ | 1685 #ifdef __GNUC__ |
1683 REAL_CFLAGS="$CFLAGS" | 1713 REAL_CFLAGS="$CFLAGS" |
1684 fi | 1714 fi |
1685 rm $tempcname | 1715 rm $tempcname |
1686 | 1716 |
1687 dnl override CFLAGS if user wishes | 1717 dnl override CFLAGS if user wishes |
1688 if test "$cflags" != "NO_CFLAGS_DEFINED" ; then | 1718 test "$cflags" != "NO_CFLAGS_DEFINED" && REAL_CFLAGS="$cflags" |
1689 REAL_CFLAGS=$cflags | 1719 |
1690 fi | 1720 dnl Add unexec object to link line |
1691 | 1721 XE_ADD_OBJS($unexec) |
1692 dnl Compute the unexec source name from the object name. | 1722 |
1693 UNEXEC_SRC="`echo $unexec | sed 's/\.o/.c/'`" | 1723 dnl --------------------------------------------------------------- |
1724 dnl Add site and system specific flags to compile and link commands | |
1725 dnl --------------------------------------------------------------- | |
1726 | |
1727 dnl --site-libraries (multiple dirs) | |
1728 if test -n "$site_libraries"; then | |
1729 for arg in $site_libraries; do | |
1730 case "$arg" in -* ) ;; * ) arg="-L${arg}" ;; esac | |
1731 XE_APPEND($arg, ld_switch_site) | |
1732 done | |
1733 fi | |
1734 | |
1735 dnl --site-includes (multiple dirs) | |
1736 if test -n "$site_includes" ; then | |
1737 for arg in $site_includes; do | |
1738 case "$arg" in -* ) ;; * ) arg="-I${arg}" ;; esac | |
1739 XE_APPEND($arg, c_switch_site) | |
1740 done | |
1741 fi | |
1742 | |
1743 dnl Extra system-specific library directories - please add to list | |
1744 for dir in "/usr/ccs/lib"; do | |
1745 test -d "$dir" && XE_APPEND(-L${dir}, ld_switch_site) | |
1746 done | |
1747 | |
1748 dnl --site-runtime-libraries (multiple dirs) | |
1749 if test -n "$site_runtime_libraries" ; then | |
1750 LD_RUN_PATH="`echo $site_runtime_libraries | sed 's/ */:/'`" | |
1751 export LD_RUN_PATH | |
1752 fi | |
1753 | |
1754 dnl ------------------------------------- | |
1755 dnl Compute runtime library path | |
1756 dnl ------------------------------------- | |
1757 | |
1758 if test "$dynamic" = "no"; then add_runtime_path=no | |
1759 elif test -n "$LD_RUN_PATH"; then add_runtime_path=yes | |
1760 else case "$canonical" in | |
1761 *-solaris2.* | *-sgi-irix* ) add_runtime_path=yes ;; | |
1762 * ) add_runtime_path=no ;; | |
1763 esac | |
1764 fi | |
1765 | |
1766 if test "$add_runtime_path" = "yes"; then | |
1767 dnl Try to autodetect runtime library flag (usually -R), | |
1768 dnl and whether it works (or at least does no harm) | |
1769 AC_MSG_CHECKING("for runtime libraries flag") | |
1770 dash_r="" | |
1771 for try_dash_r in "-R" "-R " "-rpath "; do | |
1772 xe_check_libs="${try_dash_r}/no/such/file-or-directory" | |
1773 AC_TRY_LINK(, , dash_r="$try_dash_r") | |
1774 xe_check_libs="" | |
1775 test -n "$dash_r" && break | |
1776 done | |
1777 if test -n "$dash_r"; | |
1778 then AC_MSG_RESULT("\"${dash_r}\"") | |
1779 else AC_MSG_RESULT(NONE) | |
1780 fi | |
1781 fi | |
1782 | |
1783 define([XE_COMPUTE_RUNPATH],[ | |
1784 if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then | |
1785 dnl Remove runtime paths from current ld switches | |
1786 ld_switch_site="`echo $ld_switch_site | sed \"s/${dash_r}[[^ ]]*//\"`" | |
1787 ld_switch_x_site="`echo $ld_switch_x_site | sed \"s/${dash_r}[[^ ]]*//\"`" | |
1788 dnl PRINT_VAR(ld_switch_site, ld_switch_x_site) | |
1789 | |
1790 dnl Fix up Runtime path | |
1791 dnl If LD_RUN_PATH is set in environment, use that. | |
1792 dnl In this case, assume user has set the right value. | |
1793 if test -n "$LD_RUN_PATH"; then | |
1794 runpath="$LD_RUN_PATH" | |
1795 else | |
1796 dnl Add all directories with .so files to runpath | |
1797 runpath="" | |
1798 for arg in $ld_switch_site $ld_switch_x_site; do | |
1799 case "$arg" in -L* ) | |
1800 dir=`echo "$arg" | sed 's/^-L//'` | |
1801 if test -n "`ls ${dir}/*.s[[ol]] 2>/dev/null`"; then | |
1802 test -n "$runpath" && runpath="${runpath}:" | |
1803 runpath="${runpath}${dir}" | |
1804 fi | |
1805 ;; | |
1806 esac | |
1807 done | |
1808 dnl Sometimes /opt/SUNWdt/lib is the only installed Motif available | |
1809 case "$canonical" in *-solaris2.[[1-4]]* ) | |
1810 test "$need_motif" = "yes" && runpath="${runpath}:/opt/SUNWdt/lib" ;; | |
1811 esac | |
1812 fi | |
1813 | |
1814 if test -n "$runpath"; then | |
1815 ld_switch_run="${dash_r}${runpath}" | |
1816 test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath" | |
1817 fi | |
1818 fi | |
1819 ])dnl | |
1820 XE_COMPUTE_RUNPATH() | |
1821 | |
1822 dnl ----------------------------------- | |
1823 dnl Do some misc autoconf-special tests | |
1824 dnl ----------------------------------- | |
1694 | 1825 |
1695 dnl Do the opsystem or machine files prohibit the use of the GNU malloc? | 1826 dnl Do the opsystem or machine files prohibit the use of the GNU malloc? |
1696 dnl Assume not, until told otherwise. | 1827 dnl Assume not, until told otherwise. |
1697 GNU_MALLOC=yes | 1828 GNU_MALLOC=yes |
1698 if test "$system_malloc" = "yes" ; then | 1829 if test "$system_malloc" = "yes" ; then |
1702 elif test "$use_system_malloc" = "yes" ; then | 1833 elif test "$use_system_malloc" = "yes" ; then |
1703 GNU_MALLOC=no | 1834 GNU_MALLOC=no |
1704 GNU_MALLOC_reason=" | 1835 GNU_MALLOC_reason=" |
1705 (User chose not to use GNU allocators.)" | 1836 (User chose not to use GNU allocators.)" |
1706 fi | 1837 fi |
1707 | |
1708 dnl ----------------------------------- | |
1709 dnl Do some misc autoconf-special tests | |
1710 dnl ----------------------------------- | |
1711 | 1838 |
1712 dnl Some other nice autoconf tests. If you add a test here which | 1839 dnl Some other nice autoconf tests. If you add a test here which |
1713 dnl should make an entry in src/config.h, do not forget to add an | 1840 dnl should make an entry in src/config.h, do not forget to add an |
1714 dnl #undef clause to src/config.h.in for autoconf to modify. | 1841 dnl #undef clause to src/config.h.in for autoconf to modify. |
1715 | 1842 |
1778 AC_PROG_MAKE_SET | 1905 AC_PROG_MAKE_SET |
1779 | 1906 |
1780 dnl check byte order | 1907 dnl check byte order |
1781 AC_C_BIGENDIAN | 1908 AC_C_BIGENDIAN |
1782 | 1909 |
1910 dnl define SIZEOF_TYPE | |
1911 AC_CHECK_SIZEOF(short) | |
1912 AC_CHECK_SIZEOF(int) | |
1913 AC_CHECK_SIZEOF(long) | |
1914 | |
1783 dnl check for long file names | 1915 dnl check for long file names |
1784 AC_SYS_LONG_FILE_NAMES | 1916 AC_SYS_LONG_FILE_NAMES |
1785 | 1917 |
1786 dnl other checks for UNIX variants | 1918 dnl other checks for UNIX variants |
1787 | 1919 |
1788 dnl -lm might be required for some X libraries to link with later | 1920 dnl -lm might be required for some X libraries to link with later |
1789 AC_CHECK_LIB(m, sqrt) | 1921 AC_CHECK_LIB(m, sqrt) |
1922 | |
1923 dnl Floating operation support is now unconditional | |
1924 AC_DEFINE(LISP_FLOAT_TYPE) | |
1790 | 1925 |
1791 dnl Determine type of mail locking from configure args and s&m headers | 1926 dnl Determine type of mail locking from configure args and s&m headers |
1792 AC_CHECKING(type of mail spool file locking) | 1927 AC_CHECKING(type of mail spool file locking) |
1793 test -z "$mail_locking" -a "$mail_use_flock" = "yes" && mail_locking=flock | 1928 test -z "$mail_locking" -a "$mail_use_flock" = "yes" && mail_locking=flock |
1794 test -z "$mail_locking" -a "$mail_use_lockf" = "yes" && mail_locking=lockf | 1929 test -z "$mail_locking" -a "$mail_use_lockf" = "yes" && mail_locking=lockf |
1795 if test "$mail_locking" = "lockf"; then AC_DEFINE(REAL_MAIL_USE_LOCKF) | 1930 if test "$mail_locking" = "lockf"; then AC_DEFINE(REAL_MAIL_USE_LOCKF) |
1796 elif test "$mail_locking" = "flock"; then AC_DEFINE(REAL_MAIL_USE_FLOCK) | 1931 elif test "$mail_locking" = "flock"; then AC_DEFINE(REAL_MAIL_USE_FLOCK) |
1797 fi | 1932 fi |
1798 | 1933 |
1799 dnl Dynodump | 1934 dnl Used by getloadavg() - does not require root priveleges |
1800 if test "$need_dynodump" = "yes" ; then | 1935 AC_CHECK_LIB(kstat, kstat_open) |
1936 | |
1937 dnl Another way to get the load average | |
1938 AC_CHECK_LIB(kvm, kvm_read) | |
1939 | |
1940 AC_CHECK_LIB(pthreads, cma_open) | |
1941 if test "$ac_cv_lib_pthreads_cma_open" = "yes"; then | |
1942 case "$opsys" in decosf*) c_switch_site="$c_switch_site -threads";; esac | |
1943 fi | |
1944 | |
1945 AC_MSG_CHECKING(whether the -xildoff compiler flag is required) | |
1946 if ${CC-cc} '-###' -xildon no_such_file.c 2>&1 | grep '^[^ ]*/ild ' > /dev/null ; then | |
1947 if ${CC-cc} '-###' -xildoff no_such_file.c 2>&1 | grep '^[^ ]*/ild ' > /dev/null ; | |
1948 then AC_MSG_RESULT(no); | |
1949 else AC_MSG_RESULT(yes); XE_APPEND(-xildoff, ld_switch_site) | |
1950 fi | |
1951 else AC_MSG_RESULT(no) | |
1952 fi | |
1953 | |
1954 dnl Dynodump (Solaris 2.x, x<6) | |
1955 AC_MSG_CHECKING(for dynodump) | |
1956 case "$canonical" in *-solaris2.[[0-5]]* ) | |
1957 AC_MSG_RESULT(yes) | |
1801 AC_DEFINE(DYNODUMP) | 1958 AC_DEFINE(DYNODUMP) |
1802 MAKE_SUBDIR="$MAKE_SUBDIR dynodump" | 1959 XE_APPEND(dynodump, MAKE_SUBDIR) |
1803 case "$canonical" in | 1960 case "$canonical" in |
1804 sparc* ) dynodump_arch=sparc ;; | 1961 sparc* ) dynodump_arch=sparc ;; |
1805 powerpc* ) dynodump_arch=ppc ;; | 1962 powerpc* ) dynodump_arch=ppc ;; |
1806 i*86* ) dynodump_arch=i386 ;; | 1963 i*86* ) dynodump_arch=i386 ;; |
1807 esac | 1964 esac |
1808 dnl Dynodump requires the system linker | 1965 dnl Dynodump requires the system linker |
1809 test "$GCC" = "yes" && ld_switch_site="-fno-gnu-linker $ld_switch_site" | 1966 test "$GCC" = "yes" && XE_APPEND(-fno-gnu-linker, ld_switch_site) ;; |
1810 fi | 1967 *) AC_MSG_RESULT(no) ;; |
1811 | 1968 esac |
1812 dnl Extra library directories - please add to list | |
1813 for dir in "/usr/ccs/lib"; do | |
1814 test -d "$dir" && ld_switch_site="$ld_switch_site -L${dir}" | |
1815 done | |
1816 | 1969 |
1817 dnl ---------------------- | 1970 dnl ---------------------- |
1818 dnl Choose a window system | 1971 dnl Choose a window system |
1819 dnl ---------------------- | 1972 dnl ---------------------- |
1820 | 1973 |
1849 no ) window_system=none HAVE_X_WINDOWS=no ;; | 2002 no ) window_system=none HAVE_X_WINDOWS=no ;; |
1850 esac | 2003 esac |
1851 | 2004 |
1852 if test "$with_x11" = "yes"; then | 2005 if test "$with_x11" = "yes"; then |
1853 AC_DEFINE(HAVE_X_WINDOWS) | 2006 AC_DEFINE(HAVE_X_WINDOWS) |
1854 MAKE_SUBDIR="$MAKE_SUBDIR lwlib" | 2007 XE_APPEND(lwlib, MAKE_SUBDIR) |
1855 | 2008 |
1856 dnl Try to find Motif/CDE/Tooltalk dirs | 2009 dnl Try to find Motif/CDE/Tooltalk dirs |
1857 dnl These take precedence over other X libs/includes, so PRE-pend | 2010 dnl These take precedence over other X libs/includes, so PRE-pend |
1858 for lib_dir in "/usr/dt/lib" "/usr/lib/Motif1.2" "/usr/lib/Motif1.1"; do | 2011 for lib_dir in "/usr/dt/lib" "/usr/lib/Motif1.2" "/usr/lib/Motif1.1"; do |
1859 inc_dir="`echo $lib_dir | sed 's/lib/include/'`" | 2012 inc_dir="`echo $lib_dir | sed 's/lib/include/'`" |
1860 if test -d "$lib_dir" -a -d "$inc_dir"; then | 2013 if test -d "$lib_dir" -a -d "$inc_dir"; then |
1861 case "$x_libraries" in *"$lib_dir"* ) : ;; *) | 2014 case "$x_libraries" in *"$lib_dir"* ) ;; *) |
1862 x_libraries="$lib_dir $x_libraries" X_LIBS="-L${lib_dir} $X_LIBS" | 2015 x_libraries="$lib_dir $x_libraries" |
2016 XE_PREPEND(-L${lib_dir}, X_LIBS) ;; | |
1863 esac | 2017 esac |
1864 case "$x_includes" in "$inc_dir"* ) : ;; *) | 2018 case "$x_includes" in "$inc_dir"* ) ;; *) |
1865 x_includes="$inc_dir $x_includes" X_CFLAGS="-I${inc_dir} $X_CFLAGS" | 2019 x_includes="$inc_dir $x_includes" |
2020 XE_PREPEND(-I${inc_dir}, X_CFLAGS) ;; | |
1866 esac | 2021 esac |
1867 break; dnl only need ONE Motif implementation! | 2022 break; dnl only need ONE Motif implementation! |
1868 fi | 2023 fi |
1869 done | 2024 done |
1870 | 2025 |
1871 dnl Contrib X libs/includes do NOT take precedence, so AP-pend | 2026 dnl Contrib X libs/includes do NOT take precedence, so AP-pend |
1872 for rel in "X11R6" "X11R5" "X11R4"; do | 2027 for rel in "X11R6" "X11R5" "X11R4"; do |
1873 lib_dir="/usr/contrib/$rel/lib" inc_dir="/usr/contrib/$rel/include" | 2028 lib_dir="/usr/contrib/$rel/lib" inc_dir="/usr/contrib/$rel/include" |
1874 if test -d "$lib_dir" -a -d "$inc_dir"; then | 2029 if test -d "$lib_dir" -a -d "$inc_dir"; then |
1875 case "$x_libraries" in *"$lib_dir"* ) : ;; *) | 2030 case "$x_libraries" in *"$lib_dir"* ) ;; *) |
1876 x_libraries="$x_libraries $lib_dir" X_LIBS="$X_LIBS -L${lib_dir}" | 2031 x_libraries="$x_libraries $lib_dir" |
2032 XE_APPEND(-L${lib_dir}, X_LIBS) | |
1877 esac | 2033 esac |
1878 case "$x_includes" in "$inc_dir"* ) : ;; *) | 2034 case "$x_includes" in "$inc_dir"* ) ;; *) |
1879 x_includes="$x_includes $inc_dir" X_CFLAGS="$X_CFLAGS -I${inc_dir}" | 2035 x_includes="$x_includes $inc_dir" |
2036 XE_APPEND(-I${inc_dir}, X_CFLAGS) | |
1880 esac | 2037 esac |
1881 break; dnl Only need ONE X11 implementation ! | 2038 break; dnl Only need ONE X11 implementation ! |
1882 fi | 2039 fi |
1883 done | 2040 done |
1884 | 2041 |
1885 ld_switch_x_site="$X_LIBS" | 2042 ld_switch_x_site="$X_LIBS" |
2043 | |
2044 XE_COMPUTE_RUNPATH() | |
1886 | 2045 |
1887 if test "$extra_verbose" = "yes"; then | 2046 if test "$extra_verbose" = "yes"; then |
1888 echo; echo "X11 compilation variables:" | 2047 echo; echo "X11 compilation variables:" |
1889 PRINT_VAR(x_libraries, x_includes, X_CFLAGS, X_LIBS, X_PRE_LIBS, X_EXTRA_LIBS) | 2048 PRINT_VAR(x_libraries, x_includes, X_CFLAGS, X_LIBS, X_PRE_LIBS, X_EXTRA_LIBS) |
1890 echo | 2049 echo |
1902 ld_switch_x_site="-b i486-linuxaout $ld_switch_x_site", | 2061 ld_switch_x_site="-b i486-linuxaout $ld_switch_x_site", |
1903 [AC_MSG_ERROR("Unable to find X11 libraries.")], | 2062 [AC_MSG_ERROR("Unable to find X11 libraries.")], |
1904 -b i486-linuxaout) | 2063 -b i486-linuxaout) |
1905 fi | 2064 fi |
1906 libs_x="-lX11" | 2065 libs_x="-lX11" |
2066 test "$extra_verbose" = "yes" && echo " Setting libs_x to \"-lX11\"" | |
1907 | 2067 |
1908 case "$canonical" in *-sunos4.* ) # Bug workaround | 2068 case "$canonical" in *-sunos4.* ) # Bug workaround |
1909 ld_switch_x_site="$ld_switch_x_site -u _XtToolkitInitialize" ;; | 2069 ld_switch_x_site="$ld_switch_x_site -u _XtToolkitInitialize" ;; |
1910 esac | 2070 esac |
1911 AC_CHECK_LIB(Xt, XtOpenDisplay, libs_x="-lXt $libs_x", | 2071 AC_CHECK_LIB(Xt, XtOpenDisplay, XE_PREPEND(-lXt, libs_x), |
1912 [AC_MSG_ERROR("Unable to find X11 libraries.")]) | 2072 [AC_MSG_ERROR("Unable to find X11 libraries.")]) |
1913 | 2073 |
1914 AC_MSG_CHECKING(the version of X11 being used) | 2074 AC_MSG_CHECKING(the version of X11 being used) |
1915 AC_TRY_RUN([#include <X11/Intrinsic.h> | 2075 AC_TRY_RUN([#include <X11/Intrinsic.h> |
1916 main(int c, char* v[]) { return c>1 ? XlibSpecificationRelease : 0; }], | 2076 main(int c, char* v[]) { return c>1 ? XlibSpecificationRelease : 0; }], |
1917 [./conftest foobar; rc=$?],[rc=4],[rc=4]) | 2077 [./conftest foobar; x11_release=$?],[x11_release=4],[x11_release=4]) |
1918 AC_MSG_RESULT(R${rc}) | 2078 AC_MSG_RESULT(R${x11_release}) |
1919 AC_DEFINE_UNQUOTED(THIS_IS_X11R${rc}) | 2079 AC_DEFINE_UNQUOTED(THIS_IS_X11R${x11_release}) |
1920 | 2080 |
1921 AC_CHECK_HEADERS(X11/Xlocale.h) | 2081 AC_CHECK_HEADERS(X11/Xlocale.h) |
1922 | 2082 |
1923 dnl remove this - we should avoid checking for specific OS | 2083 dnl remove this - we should avoid checking for specific OS |
1924 AC_MSG_CHECKING(for XFree86) | 2084 AC_MSG_CHECKING(for XFree86) |
1931 else | 2091 else |
1932 AC_MSG_RESULT(no) | 2092 AC_MSG_RESULT(no) |
1933 fi | 2093 fi |
1934 | 2094 |
1935 dnl Autodetect -lXext | 2095 dnl Autodetect -lXext |
1936 AC_CHECK_LIB(Xext, XShapeSelectInput, libs_x="-lXext $libs_x") | 2096 AC_CHECK_LIB(Xext, XShapeSelectInput, XE_PREPEND(-lXext, libs_x)) |
1937 | 2097 |
1938 dnl autodetect -lXmu | 2098 dnl autodetect -lXmu |
1939 case "$canonical" in *-sunos4.* ) # Bug workaround | 2099 case "$canonical" in *-sunos4.* ) # Bug workaround |
1940 ld_switch_x_site="$ld_switch_x_site -u _get_applicationShellWidgetClass" ;; | 2100 ld_switch_x_site="$ld_switch_x_site -u _get_applicationShellWidgetClass" ;; |
1941 esac | 2101 esac |
1942 if test -z "$with_xmu"; then | 2102 if test -z "$with_xmu"; then |
1943 AC_CHECK_LIB(Xmu, XmuConvertStandardSelection, with_xmu=yes, with_xmu=no) | 2103 AC_CHECK_LIB(Xmu, XmuConvertStandardSelection, with_xmu=yes, with_xmu=no) |
1944 fi | 2104 fi |
1945 if test "$with_xmu" = "no"; then | 2105 if test "$with_xmu" = "no"; then |
1946 extra_objs="$extra_objs xmu.o" | 2106 XE_ADD_OBJS(xmu.o) |
1947 else | 2107 else |
1948 libs_x="-lXmu $libs_x" | 2108 XE_PREPEND(-lXmu, libs_x) |
1949 fi | 2109 fi |
1950 | 2110 |
1951 dnl Autodetect -lXbsd | 2111 dnl Autodetect -lXbsd |
1952 dnl #### Someone, please add a better function than main | 2112 dnl #### Someone, please add a better function than main |
1953 AC_CHECK_LIB(Xbsd, main, libs_x="-lXbsd $libs_x") | 2113 AC_CHECK_LIB(Xbsd, main, XE_PREPEND(-lXbsd, libs_x)) |
1954 | |
1955 dnl autodetect Motif - but only add to libs_x later (if necessary) | |
1956 AC_CHECK_HEADER(Xm/Xm.h, | |
1957 [AC_CHECK_LIB(Xm, XmStringFree, have_motif=yes, have_motif=no)], | |
1958 have_motif=no) | |
1959 | 2114 |
1960 dnl Autodetect -lXaw | 2115 dnl Autodetect -lXaw |
1961 AC_CHECK_LIB(Xaw, XawScrollbarSetThumb, have_xaw=yes, have_xaw=no) | 2116 AC_CHECK_LIB(Xaw, XawScrollbarSetThumb, have_xaw=yes, have_xaw=no) |
1962 | 2117 |
1963 fi dnl $with_x11 = yes | 2118 fi dnl $with_x11 = yes |
2010 add_runtime_flag=yes; | 2165 add_runtime_flag=yes; |
2011 runtime_arg="-rpath " ;; | 2166 runtime_arg="-rpath " ;; |
2012 esac | 2167 esac |
2013 fi | 2168 fi |
2014 | 2169 |
2015 dnl --site-libraries (multiple dirs) | |
2016 if test -n "$site_libraries"; then | |
2017 for arg in $site_libraries; do | |
2018 test -d "$arg" && arg="-L${arg}" | |
2019 ld_switch_site="$ld_switch_site $arg" | |
2020 done | |
2021 fi | |
2022 | |
2023 dnl --site-runtime-libraries (multiple dirs) | |
2024 if test -n "$site_runtime_libraries" ; then | |
2025 LD_RUN_PATH="`echo $site_runtime_libraries | sed 's/ */:/'`" | |
2026 export LD_RUN_PATH | |
2027 fi | |
2028 | |
2029 dnl --site-includes (multiple dirs) | |
2030 if test -n "$site_includes" ; then | |
2031 for arg in $site_includes; do | |
2032 test -d "$arg" && arg="-I${arg}" | |
2033 c_switch_site="$c_switch_site $arg" | |
2034 done | |
2035 fi | |
2036 | |
2037 | 2170 |
2038 dnl FSF 19.29 has some bitmapdir stuff here. | 2171 dnl FSF 19.29 has some bitmapdir stuff here. |
2039 bitmapdir= | 2172 bitmapdir= |
2040 | 2173 |
2041 case "$window_system" in | 2174 case "$window_system" in |
2045 | 2178 |
2046 case "$x_libraries" in *X11R4* ) | 2179 case "$x_libraries" in *X11R4* ) |
2047 test "$opsys" = "hpux9" && opsysfile="s/hpux9-x11r4.h" | 2180 test "$opsys" = "hpux9" && opsysfile="s/hpux9-x11r4.h" |
2048 test "$opsys" = "hpux9-shr" && opsysfile="s/hpux9shxr4.h" | 2181 test "$opsys" = "hpux9-shr" && opsysfile="s/hpux9shxr4.h" |
2049 esac | 2182 esac |
2050 | |
2051 AC_DEFINE(LISP_FLOAT_TYPE) dnl Uhconditional | |
2052 | |
2053 dnl Used by getloadavg() - does not require root priveleges | |
2054 AC_CHECK_LIB(kstat, kstat_open) | |
2055 | |
2056 dnl Another way to get the load average | |
2057 AC_CHECK_LIB(kvm, kvm_read) | |
2058 | |
2059 AC_CHECK_LIB(pthreads, cma_open) | |
2060 if test "$ac_cv_lib_pthreads_cma_open" = "yes"; then | |
2061 case "$opsys" in decosf*) c_switch_site="$c_switch_site -threads";; esac | |
2062 fi | |
2063 | |
2064 AC_MSG_CHECKING(whether the -xildoff compiler flag is required) | |
2065 if ${CC-cc} '-###' -xildon no_such_file.c 2>&1 | grep '^[^ ]*/ild ' > /dev/null ; then | |
2066 if ${CC-cc} '-###' -xildoff no_such_file.c 2>&1 | grep '^[^ ]*/ild ' > /dev/null ; | |
2067 then AC_MSG_RESULT(no); | |
2068 else AC_MSG_RESULT(yes); ld_switch_site="$ld_switch_site -xildoff" | |
2069 fi | |
2070 else AC_MSG_RESULT(no) | |
2071 fi | |
2072 | 2183 |
2073 dnl Autodetect Xauth | 2184 dnl Autodetect Xauth |
2074 test -z "$with_xauth" && test "$window_system" = "none" && with_xauth=no | 2185 test -z "$with_xauth" && test "$window_system" = "none" && with_xauth=no |
2075 test -z "$with_xauth" && { AC_CHECK_HEADER(X11/Xauth.h, ,with_xauth=no) } | 2186 test -z "$with_xauth" && { AC_CHECK_HEADER(X11/Xauth.h, ,with_xauth=no) } |
2076 test -z "$with_xauth" && { AC_CHECK_LIB(Xau, XauGetAuthByAddr,[:],with_xauth=no) } | 2187 test -z "$with_xauth" && { AC_CHECK_LIB(Xau, XauGetAuthByAddr,[:],with_xauth=no) } |
2077 test -z "$with_xauth" && with_xauth=yes | 2188 test -z "$with_xauth" && with_xauth=yes |
2078 if test "$with_xauth" = "yes"; then | 2189 if test "$with_xauth" = "yes"; then |
2079 AC_DEFINE(HAVE_XAUTH) | 2190 AC_DEFINE(HAVE_XAUTH) |
2080 libs_x="-lXau $libs_x" | 2191 XE_PREPEND(-lXau, libs_x) |
2081 fi | 2192 fi |
2082 | 2193 |
2083 dnl Autodetect OffiX | 2194 dnl Autodetect OffiX |
2084 test -z "$with_offix" && { AC_CHECK_HEADER(OffiX/DragAndDrop.h, , with_offix=no) } | 2195 test -z "$with_offix" && { AC_CHECK_HEADER(OffiX/DragAndDrop.h, , with_offix=no) } |
2085 test -z "$with_offix" && { AC_CHECK_LIB(Dnd, DndInitialize, [:] , with_offix=no) } | 2196 test -z "$with_offix" && { AC_CHECK_LIB(Dnd, DndInitialize, [:] , with_offix=no) } |
2086 test -z "$with_offix" && with_offix=yes | 2197 test -z "$with_offix" && with_offix=yes |
2087 if test "$with_offix" = "yes"; then | 2198 if test "$with_offix" = "yes"; then |
2088 AC_DEFINE(HAVE_OFFIX_DND) | 2199 AC_DEFINE(HAVE_OFFIX_DND) |
2089 libs_x="-lDnd $libs_x" | 2200 XE_PREPEND(-lDnd, libs_x) |
2090 fi | 2201 fi |
2091 | 2202 |
2092 dnl Autodetect tooltalk | 2203 dnl Autodetect tooltalk |
2093 test "$with_cde" = "yes" && with_tooltalk=yes # CDE requires tooltalk | 2204 test "$with_cde" = "yes" && with_tooltalk=yes # CDE requires tooltalk |
2094 if test "$with_tooltalk" != "no" ; then | 2205 if test "$with_tooltalk" != "no" ; then |
2107 fi | 2218 fi |
2108 test -z "$with_tooltalk" && with_tooltalk=no | 2219 test -z "$with_tooltalk" && with_tooltalk=no |
2109 if test "$with_tooltalk" = "yes"; then | 2220 if test "$with_tooltalk" = "yes"; then |
2110 AC_DEFINE(TOOLTALK) | 2221 AC_DEFINE(TOOLTALK) |
2111 AC_DEFINE_UNQUOTED(TT_C_H_PATH, "$tt_c_h_path") | 2222 AC_DEFINE_UNQUOTED(TT_C_H_PATH, "$tt_c_h_path") |
2112 libs_x="$tt_libs $libs_x" | 2223 XE_PREPEND($tt_libs, libs_x) |
2113 extra_objs="$extra_objs tooltalk.o" | 2224 XE_ADD_OBJS(tooltalk.o) |
2114 fi | 2225 fi |
2115 | 2226 |
2116 dnl Autodetect CDE | 2227 dnl Autodetect CDE |
2117 test -z "$with_cde" && { AC_CHECK_HEADER(Dt/Dt.h, , with_cde=no) } | 2228 test -z "$with_cde" && { AC_CHECK_HEADER(Dt/Dt.h, , with_cde=no) } |
2118 test -z "$with_cde" && { AC_CHECK_LIB(DtSvc, DtDndDragStart, [:], with_cde=no) } | 2229 test -z "$with_cde" && { AC_CHECK_LIB(DtSvc, DtDndDragStart, [:], with_cde=no) } |
2119 test -z "$with_cde" && with_cde=yes | 2230 test -z "$with_cde" && with_cde=yes |
2120 if test "$with_cde" = "yes" ; then | 2231 if test "$with_cde" = "yes" ; then |
2121 AC_DEFINE(HAVE_CDE) | 2232 AC_DEFINE(HAVE_CDE) |
2122 libs_x="-lDtSvc $libs_x" | 2233 XE_PREPEND(-lDtSvc, libs_x) |
2123 with_tooltalk=yes # CDE requires Tooltalk | 2234 with_tooltalk=yes # CDE requires Tooltalk |
2124 with_motif=yes # CDE requires Motif | 2235 with_motif=yes # CDE requires Motif |
2125 fi | 2236 fi |
2126 | 2237 |
2127 dnl if Energize specified, make sure we can find its need libraries/headers | 2238 dnl if Energize specified, make sure we can find its need libraries/headers |
2128 if test "$with_energize" = "yes" ; then | 2239 if test "$with_energize" = "yes" ; then |
2129 AC_DEFINE(ENERGIZE) | 2240 AC_DEFINE(ENERGIZE) |
2130 AC_CHECK_LIB(energize, main, [ | 2241 AC_CHECK_LIB(energize, main, [ |
2131 LIBS="$LIBS -lenergize" | 2242 XE_PREPEND(-lenergize, LIBS) |
2132 energize_version="3.X" | 2243 energize_version="3.X" |
2133 AC_DEFINE(ENERGIZE_3)]) | 2244 AC_DEFINE(ENERGIZE_3)]) |
2134 if test -z "$energize_version"; then | 2245 if test -z "$energize_version"; then |
2135 AC_CHECK_LIB(conn, main, [ | 2246 AC_CHECK_LIB(conn, main, [ |
2136 LIBS="$LIBS -lconn" | 2247 XE_PREPEND(-lconn, LIBS) |
2137 energize_version="2.X" | 2248 energize_version="2.X" |
2138 AC_DEFINE(ENERGIZE_2)], | 2249 AC_DEFINE(ENERGIZE_2)], |
2139 [AC_MSG_ERROR(Unable to find Energize library.)]) | 2250 [AC_MSG_ERROR(Unable to find Energize library.)]) |
2140 fi | 2251 fi |
2141 AC_CHECK_HEADER(editorconn.h, , | 2252 AC_CHECK_HEADER(editorconn.h, , |
2142 [AC_MSG_ERROR(Unable to find Energize editorconn.h header file.)]) | 2253 [AC_MSG_ERROR(Unable to find Energize editorconn.h header file.)]) |
2143 | 2254 |
2144 test "$energize_version" = "2.X" && AC_DEFINE(ENERGIZE_2) | 2255 test "$energize_version" = "2.X" && AC_DEFINE(ENERGIZE_2) |
2145 test "$energize_version" = "3.X" && AC_DEFINE(ENERGIZE_3) | 2256 test "$energize_version" = "3.X" && AC_DEFINE(ENERGIZE_3) |
2152 AC_CHECKING(for graphics libraries) | 2263 AC_CHECKING(for graphics libraries) |
2153 dnl Built-in GIF support defaults to yes | 2264 dnl Built-in GIF support defaults to yes |
2154 test -z "$with_gif" && with_gif=yes; | 2265 test -z "$with_gif" && with_gif=yes; |
2155 if test "$with_gif" = "yes"; then | 2266 if test "$with_gif" = "yes"; then |
2156 AC_DEFINE(HAVE_GIF) | 2267 AC_DEFINE(HAVE_GIF) |
2157 extra_objs="$extra_objs dgif_lib.o gif_err.o gifalloc.o" | 2268 XE_ADD_OBJS(dgif_lib.o gif_err.o gifalloc.o) |
2158 fi | 2269 fi |
2159 | 2270 |
2160 dnl Autodetect Xpm | 2271 dnl Autodetect Xpm |
2161 test -z "$with_xpm" && { AC_CHECK_HEADER(X11/xpm.h, ,with_xpm=no) } | 2272 test -z "$with_xpm" && { AC_CHECK_HEADER(X11/xpm.h, ,with_xpm=no) } |
2162 test -z "$with_xpm" && { AC_CHECK_LIB(Xpm, XpmReadFileToData,[:],with_xpm=no) } | 2273 test -z "$with_xpm" && { AC_CHECK_LIB(Xpm, XpmReadFileToData,[:],with_xpm=no) } |
2163 test -z "$with_xpm" && with_xpm=yes | 2274 test -z "$with_xpm" && with_xpm=yes |
2164 if test "$with_xpm" = "yes"; then | 2275 if test "$with_xpm" = "yes"; then |
2165 AC_DEFINE(HAVE_XPM) | 2276 AC_DEFINE(HAVE_XPM) |
2166 libs_x="-lXpm $libs_x" | 2277 XE_PREPEND(-lXpm, libs_x) |
2167 fi | 2278 fi |
2168 | 2279 |
2169 dnl Autodetect XFACE | 2280 dnl Autodetect XFACE |
2170 test -z "$with_xface" && { AC_CHECK_HEADER(compface.h, ,with_xface=no) } | 2281 test -z "$with_xface" && { AC_CHECK_HEADER(compface.h, ,with_xface=no) } |
2171 test -z "$with_xface" && { AC_CHECK_LIB(compface, UnGenFace,[:] ,with_xface=no) } | 2282 test -z "$with_xface" && { AC_CHECK_LIB(compface, UnGenFace,[:] ,with_xface=no) } |
2172 test -z "$with_xface" && with_xface=yes | 2283 test -z "$with_xface" && with_xface=yes |
2173 if test "$with_xface" = "yes"; then | 2284 if test "$with_xface" = "yes"; then |
2174 AC_DEFINE(HAVE_XFACE) | 2285 AC_DEFINE(HAVE_XFACE) |
2175 libs_x="-lcompface $libs_x" | 2286 XE_PREPEND(-lcompface, libs_x) |
2176 fi | 2287 fi |
2177 | 2288 |
2178 dnl autodetect JPEG | 2289 dnl autodetect JPEG |
2179 test -z "$with_jpeg" && { AC_CHECK_HEADER(jpeglib.h, ,with_jpeg=no) } | 2290 test -z "$with_jpeg" && { AC_CHECK_HEADER(jpeglib.h, ,with_jpeg=no) } |
2180 test -z "$with_jpeg" && { AC_CHECK_LIB(jpeg, jpeg_destroy_decompress,[:],with_jpeg=no) } | 2291 test -z "$with_jpeg" && { AC_CHECK_LIB(jpeg, jpeg_destroy_decompress,[:],with_jpeg=no) } |
2181 test -z "$with_jpeg" && with_jpeg=yes | 2292 test -z "$with_jpeg" && with_jpeg=yes |
2182 if test "$with_jpeg" = "yes"; then | 2293 if test "$with_jpeg" = "yes"; then |
2183 AC_DEFINE(HAVE_JPEG) | 2294 AC_DEFINE(HAVE_JPEG) |
2184 libs_x="-ljpeg $libs_x" | 2295 XE_PREPEND(-ljpeg, libs_x) |
2185 fi | 2296 fi |
2186 | 2297 |
2187 dnl autodetect PNG | 2298 dnl autodetect PNG |
2188 test -z "$with_png" && { AC_CHECK_HEADER(png.h, , with_png=no) } | 2299 test -z "$with_png" && { AC_CHECK_HEADER(png.h, , with_png=no) } |
2189 test -z "$with_png" && { AC_CHECK_FUNC(pow, , with_png=no) } | 2300 test -z "$with_png" && { AC_CHECK_FUNC(pow, , with_png=no) } |
2194 done | 2305 done |
2195 fi | 2306 fi |
2196 test -z "$with_png" && with_png=no | 2307 test -z "$with_png" && with_png=no |
2197 if test "$with_png" = "yes"; then | 2308 if test "$with_png" = "yes"; then |
2198 AC_DEFINE(HAVE_PNG) | 2309 AC_DEFINE(HAVE_PNG) |
2199 libs_x="$png_libs $libs_x" | 2310 XE_PREPEND($png_libs, libs_x) |
2200 fi | 2311 fi |
2201 | 2312 |
2202 dnl autodetect TIFF (not yet implemented) | 2313 dnl autodetect TIFF (not yet implemented) |
2203 if test "$with_tiff" = "yes"; then | 2314 if test "$with_tiff" = "yes"; then |
2204 AC_DEFINE(HAVE_TIFF) | 2315 AC_DEFINE(HAVE_TIFF) |
2205 libs_x="-ltiff $libs_x" | 2316 XE_PREPEND(-ltiff, libs_x) |
2206 fi | 2317 fi |
2318 | |
2319 dnl autodetect Motif - but only add to libs_x later (if necessary) | |
2320 AC_CHECK_HEADER(Xm/Xm.h, | |
2321 [AC_CHECK_LIB(Xm, XmStringFree, have_motif=yes, have_motif=no)], | |
2322 have_motif=no) | |
2207 | 2323 |
2208 dnl Finish ensuring that we have values for the various toolkit items. | 2324 dnl Finish ensuring that we have values for the various toolkit items. |
2209 dnl Not all toolkits support all widgets | 2325 dnl Not all toolkits support all widgets |
2210 dnl if Motif is available we use it for the dialog boxes. | 2326 dnl if Motif is available we use it for the dialog boxes. |
2211 | 2327 |
2224 | 2340 |
2225 all_widgets="$with_menubars $with_scrollbars $with_dialogs $with_toolbars" | 2341 all_widgets="$with_menubars $with_scrollbars $with_dialogs $with_toolbars" |
2226 | 2342 |
2227 case "$all_widgets" in *athena* ) | 2343 case "$all_widgets" in *athena* ) |
2228 AC_DEFINE(LWLIB_USES_ATHENA) | 2344 AC_DEFINE(LWLIB_USES_ATHENA) |
2229 libs_x="-lXaw $libs_x" ;; | 2345 XE_PREPEND(-lXaw, libs_x) ;; |
2230 esac | 2346 esac |
2231 | 2347 |
2232 case "$all_widgets" in *motif* ) | 2348 case "$all_widgets" in *motif* ) |
2233 AC_DEFINE(LWLIB_USES_MOTIF) | 2349 AC_DEFINE(LWLIB_USES_MOTIF) |
2234 need_motif=yes ;; | 2350 need_motif=yes ;; |
2249 | 2365 |
2250 test "$with_menubars" = "motif" && AC_DEFINE(LWLIB_MENUBARS_MOTIF) | 2366 test "$with_menubars" = "motif" && AC_DEFINE(LWLIB_MENUBARS_MOTIF) |
2251 test "$with_scrollbars" = "motif" && AC_DEFINE(LWLIB_SCROLLBARS_MOTIF) | 2367 test "$with_scrollbars" = "motif" && AC_DEFINE(LWLIB_SCROLLBARS_MOTIF) |
2252 test "$with_dialogs" = "motif" && AC_DEFINE(LWLIB_DIALOGS_MOTIF) | 2368 test "$with_dialogs" = "motif" && AC_DEFINE(LWLIB_DIALOGS_MOTIF) |
2253 | 2369 |
2254 test "$with_menubars" != "no" && extra_objs="$extra_objs menubar.o" | 2370 test "$with_menubars" != "no" && XE_ADD_OBJS(menubar.o) |
2255 test "$with_scrollbars" != "no" && extra_objs="$extra_objs scrollbar.o" | 2371 test "$with_scrollbars" != "no" && XE_ADD_OBJS(scrollbar.o) |
2256 test "$with_dialogs" != "no" && extra_objs="$extra_objs dialog.o" | 2372 test "$with_dialogs" != "no" && XE_ADD_OBJS(dialog.o) |
2257 test "$with_toolbars" != "no" && extra_objs="$extra_objs toolbar.o" | 2373 test "$with_toolbars" != "no" && XE_ADD_OBJS(toolbar.o) |
2258 test "$all_widgets" != "no no no no" && extra_objs="$extra_objs gui.o" | 2374 test "$all_widgets" != "no no no no" && XE_ADD_OBJS(gui.o) |
2259 | 2375 |
2260 if test "$with_x11" = "yes"; then | 2376 if test "$with_x11" = "yes"; then |
2261 test "$with_menubars" != "no" && extra_objs="$extra_objs menubar-x.o" | 2377 test "$with_menubars" != "no" && XE_ADD_OBJS(menubar-x.o) |
2262 test "$with_scrollbars" != "no" && extra_objs="$extra_objs scrollbar-x.o" | 2378 test "$with_scrollbars" != "no" && XE_ADD_OBJS(scrollbar-x.o) |
2263 test "$with_dialogs" != "no" && extra_objs="$extra_objs dialog-x.o" | 2379 test "$with_dialogs" != "no" && XE_ADD_OBJS(dialog-x.o) |
2264 test "$with_toolbars" != "no" && extra_objs="$extra_objs toolbar-x.o" | 2380 test "$with_toolbars" != "no" && XE_ADD_OBJS(toolbar-x.o) |
2265 test "$all_widgets" != "no no no no" && extra_objs="$extra_objs gui-x.o" | 2381 test "$all_widgets" != "no no no no" && XE_ADD_OBJS(gui-x.o) |
2266 fi | 2382 fi |
2267 | 2383 |
2268 dnl ------------------------ | 2384 dnl ---------------------- |
2269 dnl Misc other feature tests | 2385 dnl Mule-dependent options |
2270 dnl ------------------------ | 2386 dnl ---------------------- |
2271 | 2387 |
2272 dnl Mule-dependent option processing | |
2273 test -z "$with_mule" && with_mule=no | 2388 test -z "$with_mule" && with_mule=no |
2274 | 2389 |
2275 if test "$with_mule" = "yes" ; then | 2390 if test "$with_mule" = "yes" ; then |
2391 AC_CHECKING(for Mule-related features) | |
2276 AC_DEFINE(MULE) | 2392 AC_DEFINE(MULE) |
2277 extra_objs="$extra_objs mule.o mule-ccl.o mule-charset.o mule-coding.o" | 2393 XE_ADD_OBJS(mule.o mule-ccl.o mule-charset.o mule-coding.o) |
2278 | 2394 |
2279 dnl Use -lintl to get internationalized strerror for Mule | 2395 dnl Use -lintl to get internationalized strerror for Mule |
2280 AC_CHECK_LIB(intl, strerror) | 2396 AC_CHECK_LIB(intl, strerror) |
2281 | 2397 |
2282 AC_CHECKING(for Mule input methods) | 2398 AC_CHECKING(for Mule input methods) |
2283 dnl Do we have the XmIm* routines? And if so, do we want to use them? | 2399 dnl Do we have the XmIm* routines? And if so, do we want to use them? |
2400 dnl XIM seems to be flaky except on Solaris... | |
2401 test -z "$with_xim" && case "$opsys" in sol2* ) ;; *) with_xim=no ;; esac | |
2284 case "$with_xim" in "" | "yes" ) | 2402 case "$with_xim" in "" | "yes" ) |
2285 AC_CHECKING(for XIM) | 2403 AC_CHECKING(for XIM) |
2286 AC_CHECK_LIB(Xm, XmImMbLookupString, with_xim=motif, with_xim=xlib) | 2404 AC_CHECK_LIB(Xm, XmImMbLookupString, with_xim=motif, with_xim=xlib) |
2287 esac | 2405 esac |
2288 if test "$with_xim" != "no" ; then | 2406 if test "$with_xim" != "no" ; then |
2289 AC_DEFINE(HAVE_XIM) | 2407 AC_DEFINE(HAVE_XIM) |
2290 if test "$with_xim" = "xlib"; then | 2408 if test "$with_xim" = "xlib"; then |
2291 AC_DEFINE(XIM_XLIB) | 2409 AC_DEFINE(XIM_XLIB) |
2292 extra_objs="$extra_objs input-method-xlib.o" | 2410 XE_ADD_OBJS(input-method-xlib.o) |
2293 fi | 2411 fi |
2294 if test "$with_xim" = "motif"; then | 2412 if test "$with_xim" = "motif"; then |
2295 AC_DEFINE(XIM_MOTIF) | 2413 AC_DEFINE(XIM_MOTIF) |
2296 need_motif=yes | 2414 need_motif=yes |
2297 extra_objs="$extra_objs input-method-motif.o" | 2415 XE_ADD_OBJS(input-method-motif.o) |
2298 fi | |
2299 fi | 2416 fi |
2417 fi dnl with_xim | |
2300 | 2418 |
2301 dnl Autodetect WNN | 2419 dnl Autodetect WNN |
2302 test "$with_wnn6" = "yes" && with_wnn=yes # wnn6 implies wnn support | 2420 test "$with_wnn6" = "yes" && with_wnn=yes # wnn6 implies wnn support |
2303 test -z "$with_wnn" && { AC_CHECK_HEADER(wnn/wnnerror.h, ,with_wnn=no) } | 2421 test -z "$with_wnn" && { AC_CHECK_HEADER(wnn/jllib.h, ,with_wnn=no) } |
2304 test -z "$with_wnn" && { AC_CHECK_LIB(wnn,jl_dic_list,[:],with_wnn=no) } | 2422 test -z "$with_wnn" && { AC_CHECK_LIB(wnn,jl_dic_list,[:],with_wnn=no) } |
2305 test -z "$with_wnn" && with_wnn=yes | 2423 test -z "$with_wnn" && with_wnn=yes |
2306 if test "$with_wnn" = "yes"; then | 2424 if test "$with_wnn" = "yes"; then |
2307 AC_DEFINE(HAVE_WNN) | 2425 AC_DEFINE(HAVE_WNN) |
2308 libs_x="-lwnn $libs_x" | 2426 XE_PREPEND(-lwnn, libs_x) |
2309 extra_objs="$extra_objs mule-wnnfns.o" | 2427 XE_ADD_OBJS(mule-wnnfns.o) |
2310 AC_CHECK_LIB(wnn, jl_fi_dic_list, with_wnn6=yes) | 2428 AC_CHECK_LIB(wnn, jl_fi_dic_list, with_wnn6=yes) |
2311 test "$with_wnn6" = "yes" && AC_DEFINE(HAVE_WNN6) | 2429 test "$with_wnn6" = "yes" && AC_DEFINE(WNN6) |
2312 fi | 2430 fi |
2313 | 2431 |
2314 dnl Autodetect canna | 2432 dnl Autodetect canna |
2315 test -z "$with_canna" && { AC_CHECK_HEADER(canna/RK.h, , with_canna=no) } | 2433 test -z "$with_canna" && { AC_CHECK_HEADER(canna/RK.h, , with_canna=no) } |
2316 test -z "$with_canna" && { AC_CHECK_LIB(RKC, RkBgnBun, [:],with_canna=no) } | 2434 test -z "$with_canna" && { AC_CHECK_LIB(RKC, RkBgnBun, [:],with_canna=no) } |
2317 test -z "$with_canna" && { AC_CHECK_LIB(canna,jrKanjiControl,[:],with_canna=no) } | 2435 test -z "$with_canna" && { AC_CHECK_LIB(canna,jrKanjiControl,[:],with_canna=no) } |
2318 test -z "$with_canna" && with_canna=yes | 2436 test -z "$with_canna" && with_canna=yes |
2319 if test "$with_canna" = "yes"; then | 2437 if test "$with_canna" = "yes"; then |
2320 AC_DEFINE(HAVE_CANNA) | 2438 AC_DEFINE(HAVE_CANNA) |
2321 libs_x="-lcanna -lRKC $libs_x" | 2439 XE_PREPEND(-lcanna -lRKC, libs_x) |
2322 extra_objs="$extra_objs mule-canna.o" | 2440 XE_ADD_OBJS(mule-canna.o) |
2323 fi | 2441 fi |
2324 else # "$with_mule" = "no" | 2442 else dnl "$with_mule" = "no" |
2325 for feature in xim canna wnn; do | 2443 for feature in xim canna wnn; do |
2326 if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then | 2444 if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then |
2327 AC_MSG_WARN("--with-${feature} ignored: Not valid without Mule support") | 2445 AC_MSG_WARN("--with-${feature} ignored: Not valid without Mule support") |
2328 fi | 2446 fi |
2329 eval "with_${feature}=no" | 2447 eval "with_${feature}=no" |
2330 done | 2448 done |
2331 fi | 2449 fi dnl with_mule |
2332 | 2450 |
2333 | 2451 |
2334 dnl At this point, we know whether we need the motif lib or not. | 2452 dnl At this point, we know whether we need the motif lib or not. |
2335 test "$need_motif" = "yes" && libs_x="-lXm $libs_x" | 2453 if test "$need_motif" = "yes" ; then |
2336 | 2454 XE_PREPEND(-lXm, libs_x) |
2337 AC_CHECK_FUNCS(acosh asinh atanh cbrt closedir dup2 eaccess fmod fpathconf frexp ftime gethostname getpagesize gettimeofday getcwd getwd logb lrand48 matherr mkdir mktime perror poll random realpath rename res_init rint rmdir select setitimer setpgid setlocale setsid sigblock sighold sigprocmask strcasecmp strerror tzset utimes waitpid) | 2455 XE_COMPUTE_RUNPATH() |
2338 | 2456 fi |
2339 test "$ac_cv_func_realpath" = "yes" && extra_objs="$extra_objs realpath.o" | 2457 |
2458 AC_CHECK_FUNCS(acosh asinh atanh cbrt closedir dup2 eaccess fmod fpathconf frexp ftime gethostname getpagesize gettimeofday getcwd getwd logb lrand48 matherr mkdir mktime perror poll random rename res_init rint rmdir select setitimer setpgid setlocale setsid sigblock sighold sigprocmask strcasecmp strerror tzset utimes waitpid) | |
2459 | |
2460 dnl realpath is buggy on linux, decosf and aix4 | |
2461 | |
2462 dnl The realpath() in linux libc (4.6.27) sometimes fails with ELOOP. | |
2463 dnl For example, call realpath on a file thirty-five or so directories deep | |
2464 dnl and you get ELOOP even if no symlinks at all are involved. | |
2465 case "$opsys" in | |
2466 linux* | decosf4-0* | aix4* ) XE_ADD_OBJS(realpath.o) ;; | |
2467 * ) | |
2468 AC_CHECK_FUNCS(realpath) | |
2469 test "$ac_cv_func_realpath" != "yes" && XE_ADD_OBJS(realpath.o) ;; | |
2470 esac | |
2471 | |
2472 dnl mocklisp support - probably should excise it... | |
2473 test "$with_mocklisp" = "yes" && XE_ADD_OBJS(mocklisp.o) | |
2340 | 2474 |
2341 dnl If netdb.h does not declare h_errno, we must declare it by hand. | 2475 dnl If netdb.h does not declare h_errno, we must declare it by hand. |
2342 AC_MSG_CHECKING(whether netdb declares h_errno) | 2476 AC_MSG_CHECKING(whether netdb declares h_errno) |
2343 AC_TRY_LINK([#include <netdb.h>], | 2477 AC_TRY_LINK([#include <netdb.h>], |
2344 [return h_errno;], | 2478 [return h_errno;], |
2428 AC_C_INLINE | 2562 AC_C_INLINE |
2429 test "$ac_cv_c_inline" != "no" && AC_DEFINE(HAVE_INLINE) | 2563 test "$ac_cv_c_inline" != "no" && AC_DEFINE(HAVE_INLINE) |
2430 | 2564 |
2431 | 2565 |
2432 AC_FUNC_ALLOCA | 2566 AC_FUNC_ALLOCA |
2433 test -n "$ALLOCA" && extra_objs="$extra_objs $ALLOCA" | 2567 test -n "$ALLOCA" && XE_ADD_OBJS($ALLOCA) |
2434 | 2568 |
2435 dnl Check whether vfork exists and works correctly. (This does more | 2569 dnl Check whether vfork exists and works correctly. (This does more |
2436 dnl than just check for its existence.) If so, it defines HAVE_VFORK_H. | 2570 dnl than just check for its existence.) If so, it defines HAVE_VFORK_H. |
2437 dnl If not, it defines vfork to be fork. | 2571 dnl If not, it defines vfork to be fork. |
2438 AC_FUNC_VFORK | 2572 AC_FUNC_VFORK |
2439 | 2573 |
2440 dnl Check whether strcoll exists and works correctly. (This does more | 2574 dnl Check whether strcoll exists and works correctly. (This does more |
2441 dnl than just check for its existence.) If so, it defines HAVE_STRCOLL. | 2575 dnl than just check for its existence.) If so, it defines HAVE_STRCOLL. |
2442 AC_FUNC_STRCOLL | 2576 AC_FUNC_STRCOLL |
2443 | |
2444 AC_CHECK_SIZEOF(short) | |
2445 AC_CHECK_SIZEOF(int) | |
2446 AC_CHECK_SIZEOF(long) | |
2447 | 2577 |
2448 AC_FUNC_MMAP | 2578 AC_FUNC_MMAP |
2449 | 2579 |
2450 dnl rel_alloc requires either GNU malloc or system malloc with mmap | 2580 dnl rel_alloc requires either GNU malloc or system malloc with mmap |
2451 dnl We only turn rel_alloc on by default if mmap is available. | 2581 dnl We only turn rel_alloc on by default if mmap is available. |
2495 if test -z "$version"; then | 2625 if test -z "$version"; then |
2496 echo "$progname: can't find current emacs version in \"$file\"." >&2 | 2626 echo "$progname: can't find current emacs version in \"$file\"." >&2 |
2497 exit 1 | 2627 exit 1 |
2498 fi | 2628 fi |
2499 beta=`sed -ne 's/^.*XEmacs Lucid (beta\([[0-9]][[0-9]]*\)).*$/\1/p' "$file"` | 2629 beta=`sed -ne 's/^.*XEmacs Lucid (beta\([[0-9]][[0-9]]*\)).*$/\1/p' "$file"` |
2500 test -n "$beta" && version="${version}-b${beta}" | 2630 test -n "$beta" && version="${version}-b${beta}" |
2631 AC_DEFINE_UNQUOTED(EMACS_VERSION, $version) | |
2632 main_1_id="`echo main_1_xemacs_${version}_${canonical} | sed 'y/.-/__/'`" | |
2633 AC_DEFINE_UNQUOTED(main_1, $main_1_id) | |
2501 | 2634 |
2502 | 2635 |
2503 dnl Check for sound of various sorts. | 2636 dnl Check for sound of various sorts. |
2504 | 2637 |
2505 dnl Autodetect native sound | 2638 dnl Autodetect native sound |
2509 nas | no ) with_native_sound=no;; | 2642 nas | no ) with_native_sound=no;; |
2510 esac | 2643 esac |
2511 if test "$with_native_sound" != "no"; then | 2644 if test "$with_native_sound" != "no"; then |
2512 dnl Autodetect Sun native sound from SUNWaudmo package | 2645 dnl Autodetect Sun native sound from SUNWaudmo package |
2513 if test -d "/usr/demo/SOUND"; then | 2646 if test -d "/usr/demo/SOUND"; then |
2514 sound_found="yes" extra_objs="$extra_objs sunplay.o" | 2647 sound_found="yes" |
2648 XE_ADD_OBJS(sunplay.o) | |
2515 if test -d "/usr/demo/SOUND/include" | 2649 if test -d "/usr/demo/SOUND/include" |
2516 then sound_cflags="-I/usr/demo/SOUND/include" | 2650 then sound_cflags="-I/usr/demo/SOUND/include" |
2517 else sound_cflags="-I/usr/demo/SOUND" | 2651 else sound_cflags="-I/usr/demo/SOUND" |
2518 fi | 2652 fi |
2519 if test -z "$native_sound_lib" ; then | 2653 if test -z "$native_sound_lib" ; then |
2525 else | 2659 else |
2526 case "$canonical" in \ | 2660 case "$canonical" in \ |
2527 *-sgi-* ) | 2661 *-sgi-* ) |
2528 AC_CHECK_LIB(audio, ALopenport, native_sound_lib="-laudio") | 2662 AC_CHECK_LIB(audio, ALopenport, native_sound_lib="-laudio") |
2529 if test "$native_sound_lib" = "-laudio"; then | 2663 if test "$native_sound_lib" = "-laudio"; then |
2530 sound_found="yes" extra_objs="$extra_objs sgiplay.o" sound_cflags="" | 2664 sound_found="yes" sound_cflags="" |
2665 XE_ADD_OBJS(sgiplay.o) | |
2531 fi ;; | 2666 fi ;; |
2532 hppa*-hp-hpux* ) | 2667 hppa*-hp-hpux* ) |
2533 AC_CHECK_LIB(Alib, AOpenAudio, native_sound_lib="-lAlib") | 2668 AC_CHECK_LIB(Alib, AOpenAudio, native_sound_lib="-lAlib") |
2534 if test "$native_sound_lib" = "-lAlib"; then | 2669 if test "$native_sound_lib" = "-lAlib"; then |
2535 sound_found="yes" extra_objs="$extra_objs hpplay.o" | 2670 sound_found="yes" |
2671 XE_ADD_OBJS(hpplay.o) | |
2536 if test "$with_gcc" = "yes" # Kludge city | 2672 if test "$with_gcc" = "yes" # Kludge city |
2537 then sound_cflags="-Dconst= -Dvolatile= -I/usr/audio/examples" | 2673 then sound_cflags="-Dconst= -Dvolatile= -I/usr/audio/examples" |
2538 else sound_cflags="+e -I/usr/audio/examples" | 2674 else sound_cflags="+e -I/usr/audio/examples" |
2539 fi | 2675 fi |
2540 fi ;; | 2676 fi ;; |
2543 | 2679 |
2544 if test -z "$sound_found"; then | 2680 if test -z "$sound_found"; then |
2545 for dir in "machine" "sys" "linux"; do | 2681 for dir in "machine" "sys" "linux"; do |
2546 AC_CHECK_HEADER(${dir}/soundcard.h, | 2682 AC_CHECK_HEADER(${dir}/soundcard.h, |
2547 sound_found=yes | 2683 sound_found=yes |
2548 extra_objs="$extra_objs linuxplay.o" | 2684 XE_ADD_OBJS(linuxplay.o) |
2549 [AC_DEFINE_UNQUOTED(SOUNDCARD_H_PATH, "${dir}/soundcard.h")] | 2685 [AC_DEFINE_UNQUOTED(SOUNDCARD_H_PATH, "${dir}/soundcard.h")] |
2550 break) | 2686 break) |
2551 done | 2687 done |
2552 fi | 2688 fi |
2553 | 2689 |
2560 fi | 2696 fi |
2561 fi | 2697 fi |
2562 | 2698 |
2563 if test "$with_native_sound" = "yes"; then | 2699 if test "$with_native_sound" = "yes"; then |
2564 AC_DEFINE(HAVE_NATIVE_SOUND) | 2700 AC_DEFINE(HAVE_NATIVE_SOUND) |
2565 test -n "$native_sound_lib" && LIBS="$LIBS $native_sound_lib" | 2701 test -n "$native_sound_lib" && XE_PREPEND($native_sound_lib, LIBS) |
2566 fi | 2702 fi |
2567 | 2703 |
2568 case "$with_sound" in both | nas ) | 2704 case "$with_sound" in both | nas ) |
2569 AC_DEFINE(HAVE_NAS_SOUND) | 2705 AC_DEFINE(HAVE_NAS_SOUND) |
2570 extra_objs="$extra_objs nas.o" | 2706 XE_ADD_OBJS(nas.o) |
2571 LIBS="$LIBS -laudio" | 2707 XE_PREPEND(-laudio, LIBS) |
2572 dnl If the nas library does not contain the error jump point, | 2708 dnl If the nas library does not contain the error jump point, |
2573 dnl then we force safer behaviour. | 2709 dnl then we force safer behaviour. |
2574 AC_EGREP_HEADER(AuXtErrorJump,audio/Xtutil.h,,[AC_DEFINE(NAS_NO_ERROR_JUMP)]) | 2710 AC_EGREP_HEADER(AuXtErrorJump,audio/Xtutil.h,,[AC_DEFINE(NAS_NO_ERROR_JUMP)]) |
2575 esac | 2711 esac |
2576 | 2712 |
2577 | 2713 dnl --------------------- |
2578 dnl TTY-dependent options | 2714 dnl TTY-dependent options |
2579 | 2715 dnl --------------------- |
2580 | |
2581 AC_CHECKING("how to do terminal I/O") | |
2582 | 2716 |
2583 test -z "$with_tty" && with_tty=yes | 2717 test -z "$with_tty" && with_tty=yes |
2584 | 2718 |
2585 if test "$with_tty" = "yes" ; then | 2719 if test "$with_tty" = "yes" ; then |
2720 AC_CHECKING(for TTY-related features) | |
2586 AC_DEFINE(HAVE_TTY) | 2721 AC_DEFINE(HAVE_TTY) |
2722 XE_ADD_OBJS(console-tty.o device-tty.o event-tty.o frame-tty.o objects-tty.o redisplay-tty.o cm.o) | |
2587 | 2723 |
2588 dnl Check for terminal I/O variants | 2724 dnl Check for terminal I/O variants |
2589 dnl TERMIOS systems may have termio.h, but not vice-versa, I think. | 2725 dnl TERMIOS systems may have termio.h, but not vice-versa, I think. |
2590 AC_CHECK_HEADER(termios.h, [AC_DEFINE(HAVE_TERMIOS)], | 2726 AC_CHECK_HEADER(termios.h, [AC_DEFINE(HAVE_TERMIOS)], |
2591 [AC_CHECK_HEADER(termio.h, [AC_DEFINE(HAVE_TERMIO)])]) | 2727 [AC_CHECK_HEADER(termio.h, [AC_DEFINE(HAVE_TERMIO)])]) |
2596 | 2732 |
2597 test -z "$with_gpm" && { AC_CHECK_HEADER(gpm.h, , with_gpm=no) } | 2733 test -z "$with_gpm" && { AC_CHECK_HEADER(gpm.h, , with_gpm=no) } |
2598 test -z "$with_gpm" && { AC_CHECK_LIB(gpm, connect_to_gpm, with_gpm=yes, with_gpm=no) } | 2734 test -z "$with_gpm" && { AC_CHECK_LIB(gpm, connect_to_gpm, with_gpm=yes, with_gpm=no) } |
2599 if test "$with_gpm" = "yes"; then | 2735 if test "$with_gpm" = "yes"; then |
2600 AC_DEFINE(HAVE_GPM) | 2736 AC_DEFINE(HAVE_GPM) |
2601 extra_objs="$extra_objs gpmevent.o" | 2737 XE_ADD_OBJS(gpmevent.o) |
2602 LIBS="$LIBS -lgpm" | 2738 XE_PREPEND(-lgpm, LIBS) |
2603 fi | 2739 fi |
2604 | 2740 |
2605 dnl Autodetect ncurses. | 2741 dnl Autodetect ncurses. |
2606 if test -z "$with_ncurses"; then | 2742 if test -z "$with_ncurses"; then |
2607 AC_CHECK_LIB(ncurses, tparm, with_ncurses=yes, with_ncurses=no) | 2743 AC_CHECK_LIB(ncurses, tgetent, with_ncurses=yes, with_ncurses=no) |
2608 fi | 2744 fi |
2609 if test "$with_ncurses" = "yes"; then | 2745 if test "$with_ncurses" = "yes"; then |
2610 AC_DEFINE(HAVE_NCURSES) | 2746 AC_DEFINE(HAVE_NCURSES) |
2611 AC_CHECK_HEADER(ncurses/curses.h, curses_h_path=ncurses/curses.h) | 2747 AC_CHECK_HEADER(ncurses/curses.h, curses_h_path=ncurses/curses.h) |
2612 AC_CHECK_HEADER(ncurses/term.h, term_h_path=ncurses/term.h) | 2748 AC_CHECK_HEADER(ncurses/term.h, term_h_path=ncurses/term.h) |
2613 extra_objs="$extra_objs terminfo.o" | 2749 XE_ADD_OBJS(terminfo.o) |
2614 LIBS="$LIBS -lncurses" | 2750 XE_PREPEND(-lncurses, LIBS) |
2615 | 2751 |
2616 if test "$ac_cv_header_ncurses_curses_h" != "yes" ; then | 2752 if test "$ac_cv_header_ncurses_curses_h" != "yes" ; then |
2617 dnl Try again, and check for the bogus ncurses/ include bug. | 2753 dnl Try again, and check for the bogus ncurses/ include bug. |
2618 dnl (i.e. ncurses/curses.h bogusly includes <unctrl.h> instead of | 2754 dnl (i.e. ncurses/curses.h bogusly includes <unctrl.h> instead of |
2619 dnl <ncurses/unctrl.h>) | 2755 dnl <ncurses/unctrl.h>) |
2624 then AC_MSG_WARN("Your system has the bogus ncurses include bug.") | 2760 then AC_MSG_WARN("Your system has the bogus ncurses include bug.") |
2625 else c_switch_site="$save_c_switch_site" | 2761 else c_switch_site="$save_c_switch_site" |
2626 fi | 2762 fi |
2627 fi | 2763 fi |
2628 else dnl "$with_ncurses" = "no" | 2764 else dnl "$with_ncurses" = "no" |
2629 dnl Autodetect terminfo/-ltermlib/-ltermcap/-lcurses | 2765 dnl Autodetect terminfo/-lcurses/-ltermlib/-ltermcap |
2630 AC_CHECK_LIB(termlib, tgoto, have_libtermlib=yes, have_libtermlib=no) | |
2631 AC_CHECK_LIB(termcap, tgoto, have_libtermcap=yes, have_libtermcap=no) | |
2632 AC_CHECK_LIB(curses, tparm, have_libcurses=yes, have_libcurses=no) | |
2633 | |
2634 if test "$have_terminfo" = "yes"; then | 2766 if test "$have_terminfo" = "yes"; then |
2635 extra_objs="$extra_objs terminfo.o" | 2767 XE_ADD_OBJS(terminfo.o) |
2636 if test -n "$libs_termcap"; then LIBS="$LIBS $libs_termcap" | 2768 if test -n "$libs_termcap"; then |
2637 elif test "$have_libcurses" = "yes"; then LIBS="$LIBS -lcurses" | 2769 XE_PREPEND($libs_termcap, LIBS) |
2638 elif test "$have_libtermlib" = "yes"; then LIBS="$LIBS -ltermlib" | 2770 else |
2639 elif test "$have_libtermcap" = "yes"; then LIBS="$LIBS -ltermcap" | 2771 for lib in curses termlib termcap; do |
2640 fi | 2772 AC_CHECK_LIB($lib, tgetent, [XE_PREPEND(-l${lib}, LIBS)]; break) |
2773 done | |
2774 fi | |
2641 else dnl "$have_terminfo" = "no" && "with_ncurses" = "no" | 2775 else dnl "$have_terminfo" = "no" && "with_ncurses" = "no" |
2642 extra_objs="$extra_objs tparam.o" | 2776 XE_ADD_OBJS(tparam.o) |
2643 if test -n "$libs_termcap"; then LIBS="$LIBS $libs_termcap" | 2777 dnl The HP-UX curses library seems to have a badly broken version of select(2) |
2644 elif test "$have_libtermcap" = "yes"; then LIBS="$LIBS -ltermcap" | 2778 dnl that makes "poll: interrupted system call" messages to appear and |
2645 elif test "$have_libcurses" = "yes"; then LIBS="$LIBS -lcurses" | 2779 dnl Emacs suprocesses to hang (e.g. TeX compilation w/ AUCTeX) */ |
2646 else extra_objs="$extra_objs termcap.o" | 2780 case "$opsys" in *-hp-hpux* ) libs_termcap="-ltermcap" ;; esac |
2781 if test -n "$libs_termcap"; then | |
2782 XE_PREPEND($libs_termcap, LIBS) | |
2783 else | |
2784 AC_CHECK_LIB(curses, tgetent, [XE_PREPEND(-lcurses, LIBS)],[ | |
2785 AC_CHECK_LIB(termcap, tgetent, [XE_PREPEND(-ltermcap, LIBS)], [ | |
2786 XE_ADD_OBJS(termcap.o)])]) | |
2647 fi | 2787 fi |
2648 fi | 2788 fi |
2649 fi | 2789 fi |
2650 AC_DEFINE_UNQUOTED(CURSES_H_PATH, "${curses_h_path-curses.h}") | 2790 AC_DEFINE_UNQUOTED(CURSES_H_PATH, "${curses_h_path-curses.h}") |
2651 AC_DEFINE_UNQUOTED(TERM_H_PATH, "${term_h_path-term.h}") | 2791 AC_DEFINE_UNQUOTED(TERM_H_PATH, "${term_h_path-term.h}") |
2652 else # "$with_tty" = "no" | 2792 else dnl "$with_tty" = "no" |
2653 for feature in ncurses gpm; do | 2793 for feature in ncurses gpm; do |
2654 if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then | 2794 if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then |
2655 AC_MSG_WARN("--with-${feature} ignored: Not valid without TTY support") | 2795 AC_MSG_WARN("--with-${feature} ignored: Not valid without TTY support") |
2656 fi | 2796 fi |
2657 eval "with_${feature}=no" | 2797 eval "with_${feature}=no" |
2658 done | 2798 done |
2659 fi | 2799 fi dnl with_tty |
2660 | 2800 |
2661 dnl Database support | 2801 dnl Database support |
2662 dnl <mdiers@logware.de> | 2802 dnl <mdiers@logware.de> |
2663 dnl We do not necessarily have to have libdb/lib(g)dbm for DB/(G)DBM support. | 2803 dnl We do not necessarily have to have libdb/lib(g)dbm for DB/(G)DBM support. |
2664 dnl On FreeBSD, both DB and DBM are part of libc. | 2804 dnl On FreeBSD, both DB and DBM are part of libc. |
2668 dnl If support for DB/(G)DBM is requested, but we neither have libdb/lib(g)dbm, | 2808 dnl If support for DB/(G)DBM is requested, but we neither have libdb/lib(g)dbm, |
2669 dnl nor does libc implement it, we are a bit lost :) | 2809 dnl nor does libc implement it, we are a bit lost :) |
2670 | 2810 |
2671 AC_CHECKING(for database support) | 2811 AC_CHECKING(for database support) |
2672 | 2812 |
2673 if test "$with_database_gnudbm" != "no" ; then | 2813 if test "$with_database_gnudbm" != "no"; then |
2674 AC_CHECK_LIB(gdbm, dbm_open, with_database_gnudbm=yes have_libgdbm=yes) | 2814 AC_CHECK_LIB(gdbm, dbm_open, with_database_gnudbm=yes have_libgdbm=yes) |
2675 if test "$with_database_gnudbm" != "yes"; then | 2815 if test "$with_database_gnudbm" != "yes"; then |
2676 AC_CHECK_FUNC(dbm_open, with_database_gnudbm=yes) | 2816 AC_CHECK_FUNC(dbm_open, with_database_gnudbm=yes) |
2677 fi | 2817 fi |
2678 if test "$with_database_gnudbm" = "yes" ; then | 2818 if test "$with_database_gnudbm" = "yes"; then |
2679 AC_DEFINE(HAVE_DBM) | 2819 AC_DEFINE(HAVE_DBM) |
2680 test "$have_libgdbm" = "yes" && LIBS="$LIBS -lgdbm" | 2820 test "$have_libgdbm" = "yes" && XE_PREPEND(-lgdbm, LIBS) |
2681 with_database_dbm=no | 2821 with_database_dbm=no |
2682 else with_database_gnudbm=no | 2822 else with_database_gnudbm=no |
2683 fi | 2823 fi |
2684 fi | 2824 fi |
2685 | 2825 |
2686 if test "$with_database_dbm" != "no" ; then | 2826 if test "$with_database_dbm" != "no"; then |
2687 AC_CHECK_FUNC(dbm_open, with_database_dbm=yes need_libdbm=no) | 2827 AC_CHECK_FUNC(dbm_open, with_database_dbm=yes need_libdbm=no) |
2688 if test "$need_libdbm" != "no"; then | 2828 if test "$need_libdbm" != "no"; then |
2689 AC_CHECK_LIB(dbm, dbm_open, with_database_dbm=yes need_libdbm=yes) | 2829 AC_CHECK_LIB(dbm, dbm_open, with_database_dbm=yes need_libdbm=yes) |
2690 fi | 2830 fi |
2691 if test "$with_database_dbm" = "yes" ; then | 2831 if test "$with_database_dbm" = "yes"; then |
2692 AC_DEFINE(HAVE_DBM) | 2832 AC_DEFINE(HAVE_DBM) |
2693 test "$need_libdbm" = "yes" && LIBS="$LIBS -ldbm" | 2833 test "$need_libdbm" = "yes" && XE_PREPEND(-ldbm, LIBS) |
2694 else with_database_dbm=no | 2834 else with_database_dbm=no |
2695 fi | 2835 fi |
2696 fi | 2836 fi |
2697 | 2837 |
2698 if test "$with_database_berkdb" != "no"; then | 2838 if test "$with_database_berkdb" != "no"; then |
2718 test -z "$db_h_path" && with_database_berkdb=no | 2858 test -z "$db_h_path" && with_database_berkdb=no |
2719 fi | 2859 fi |
2720 if test "$with_database_berkdb" = "yes"; then | 2860 if test "$with_database_berkdb" = "yes"; then |
2721 AC_DEFINE_UNQUOTED(DB_H_PATH, "$db_h_path") | 2861 AC_DEFINE_UNQUOTED(DB_H_PATH, "$db_h_path") |
2722 AC_DEFINE(HAVE_BERKELEY_DB) | 2862 AC_DEFINE(HAVE_BERKELEY_DB) |
2723 test "$need_libdb" = "yes" && LIBS="$LIBS -ldb" | 2863 test "$need_libdb" = "yes" && XE_PREPEND(-ldb, LIBS) |
2724 else with_database_berkdb=no | 2864 else with_database_berkdb=no |
2725 fi | 2865 fi |
2726 fi | 2866 fi |
2727 | 2867 |
2728 if test "$with_database_gnudbm" = "yes" -o \ | 2868 if test "$with_database_gnudbm" = "yes" -o \ |
2729 "$with_database_dbm" = "yes" -o \ | 2869 "$with_database_dbm" = "yes" -o \ |
2730 "$with_database_berkdb" = "yes"; then | 2870 "$with_database_berkdb" = "yes"; then |
2731 AC_DEFINE(HAVE_DATABASE) | 2871 AC_DEFINE(HAVE_DATABASE) |
2732 extra_objs="$extra_objs database.o" | 2872 XE_ADD_OBJS(database.o) |
2733 fi | 2873 fi |
2734 | 2874 |
2735 dnl Socks support | 2875 dnl Socks support |
2736 if test "$with_socks" = "yes"; then | 2876 if test "$with_socks" = "yes"; then |
2737 AC_CHECK_LIB(socks, SOCKSinit) | 2877 AC_CHECK_LIB(socks, SOCKSinit) |
2739 fi | 2879 fi |
2740 | 2880 |
2741 dnl Usage tracking (undocumented and likely unused option) | 2881 dnl Usage tracking (undocumented and likely unused option) |
2742 if test "$usage_tracking" = "yes"; then | 2882 if test "$usage_tracking" = "yes"; then |
2743 AC_DEFINE(USAGE_TRACKING) | 2883 AC_DEFINE(USAGE_TRACKING) |
2744 LIBS="$LIBS -Bstatic -lut -Bdynamic" | 2884 XE_PREPEND(-Bstatic -lut -Bdynamic, LIBS) |
2745 fi | |
2746 | |
2747 dnl ------------------------------------- | |
2748 dnl Compute runtime library path | |
2749 dnl ------------------------------------- | |
2750 | |
2751 if test "$dynamic" = "no"; then add_runtime_path=no | |
2752 elif test -n "$LD_RUN_PATH"; then add_runtime_path=yes | |
2753 else case "$canonical" in | |
2754 *-solaris2.* | *-sgi-irix* ) add_runtime_path=yes ;; | |
2755 * ) add_runtime_path=no ;; | |
2756 esac | |
2757 fi | |
2758 | |
2759 if test "$add_runtime_path" = "yes"; then | |
2760 dnl Try to autodetect runtime library flag (usually -R), | |
2761 dnl and whether it works (or at least does no harm) | |
2762 AC_MSG_CHECKING("for runtime libraries flag") | |
2763 dash_r="" | |
2764 for try_dash_r in "-R" "-R " "-rpath "; do | |
2765 xe_check_libs="${try_dash_r}/no/such/file-or-directory" | |
2766 AC_TRY_LINK(, , dash_r="$try_dash_r") | |
2767 xe_check_libs="" | |
2768 test -n "$dash_r" && break | |
2769 done | |
2770 if test -n "$dash_r"; | |
2771 then AC_MSG_RESULT("\"${dash_r}\"") | |
2772 else AC_MSG_RESULT(NONE) | |
2773 fi | |
2774 fi | |
2775 | |
2776 if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then | |
2777 dnl Remove runtime paths from current ld switches | |
2778 ld_switch_site="`echo $ld_switch_site | sed \"s/${dash_r}[[^ ]]*//\"`" | |
2779 ld_switch_x_site="`echo $ld_switch_x_site | sed \"s/${dash_r}[[^ ]]*//\"`" | |
2780 dnl PRINT_VAR(ld_switch_site, ld_switch_x_site) | |
2781 | |
2782 dnl Fix up Runtime path | |
2783 dnl If LD_RUN_PATH is set in environment, use that. | |
2784 dnl In this case, assume user has set the right value. | |
2785 if test -n "$LD_RUN_PATH"; then | |
2786 runpath="$LD_RUN_PATH" | |
2787 else | |
2788 dnl Add all directories with .so files to runpath | |
2789 runpath="" | |
2790 for arg in $ld_switch_site $ld_switch_x_site; do | |
2791 case "$arg" in -L* ) | |
2792 dir=`echo $arg | sed 's/^-L//'` | |
2793 if test -n "`ls ${dir}/*.so 2>/dev/null`"; then | |
2794 test -n "$runpath" && runpath="${runpath}:" | |
2795 runpath="${runpath}${dir}" | |
2796 fi | |
2797 ;; | |
2798 esac | |
2799 done | |
2800 dnl Sometimes /opt/SUNWdt/lib is the only installed Motif available | |
2801 case "$canonical" in *-solaris2.* ) | |
2802 test "$have_motif" = "yes" && runpath="${runpath}:/opt/SUNWdt/lib" ;; | |
2803 esac | |
2804 fi | |
2805 | |
2806 if test -n "$runpath"; then | |
2807 ld_switch_site="$ld_switch_site ${dash_r}${runpath}" | |
2808 test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath" | |
2809 fi | |
2810 fi | 2885 fi |
2811 | 2886 |
2812 dnl -------------------------------- | 2887 dnl -------------------------------- |
2813 dnl Compute SUBST-itutable variables | 2888 dnl Compute SUBST-itutable variables |
2814 dnl -------------------------------- | 2889 dnl -------------------------------- |
2815 dnl We ignore (C|LD)_SWITCH_X_(MACHINE|SYSTEM) | 2890 dnl We ignore (C|LD)_SWITCH_X_(MACHINE|SYSTEM) |
2816 c_switch_general="-DHAVE_CONFIG_H $c_switch_site $c_switch_machine $c_switch_system" | 2891 c_switch_general="-DHAVE_CONFIG_H $c_switch_site $c_switch_machine $c_switch_system" |
2817 c_switch_window_system="$c_switch_x_site $X_CFLAGS" | 2892 c_switch_window_system="$c_switch_x_site $X_CFLAGS" |
2818 c_switch_all="$c_switch_general $c_switch_window_system" | 2893 c_switch_all="$c_switch_general $c_switch_window_system" |
2819 ld_switch_general="$ld_switch_site $ld_switch_machine $ld_switch_system" | 2894 ld_switch_general="$ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_run" |
2820 ld_switch_window_system="$ld_switch_x_site" | 2895 ld_switch_window_system="$ld_switch_x_site" |
2821 ld_switch_all="$ld_switch_general $ld_switch_window_system" | 2896 ld_switch_all="$ld_switch_general $ld_switch_window_system" |
2822 ld_libs_general="$LIBS $libs_machine $libs_system $libs_standard" | 2897 ld_libs_general="$LIBS $libs_machine $libs_system $libs_standard" |
2823 ld_libs_window_system="$X_PRE_LIBS $libs_x $X_EXTRA_LIBS" | 2898 ld_libs_window_system="$X_PRE_LIBS $libs_x $X_EXTRA_LIBS" |
2824 ld_libs_all="$ld_libs_window_system $ld_libs_general" | 2899 ld_libs_all="$ld_libs_window_system $ld_libs_general" |
2825 | 2900 |
2826 dnl Compute lists of Makefiles | 2901 dnl Compute lists of Makefiles and subdirs |
2902 SRC_SUBDIR_DEPS="$MAKE_SUBDIR" | |
2903 AC_SUBST(SRC_SUBDIR_DEPS) | |
2904 XE_APPEND(src, MAKE_SUBDIR) | |
2827 internal_makefile_list="Makefile" | 2905 internal_makefile_list="Makefile" |
2828 SUBDIR_MAKEFILES='' | 2906 SUBDIR_MAKEFILES='' |
2907 test -d lock || mkdir lock | |
2829 for dir in $MAKE_SUBDIR; do | 2908 for dir in $MAKE_SUBDIR; do |
2909 test -d "$dir" || mkdir "$dir" | |
2830 SUBDIR_MAKEFILES="$SUBDIR_MAKEFILES $dir/Makefile" | 2910 SUBDIR_MAKEFILES="$SUBDIR_MAKEFILES $dir/Makefile" |
2831 internal_makefile_list="$internal_makefile_list $dir/Makefile.in" | 2911 internal_makefile_list="$internal_makefile_list $dir/Makefile.in" |
2832 done | 2912 done |
2833 AC_SUBST(MAKE_SUBDIR) | 2913 AC_SUBST(MAKE_SUBDIR) |
2834 AC_SUBST(SUBDIR_MAKEFILES) | 2914 AC_SUBST(SUBDIR_MAKEFILES) |
2835 | 2915 |
2836 if test "$extra_verbose" = "yes"; then | 2916 if test "$extra_verbose" = "yes"; then |
2837 echo "" | 2917 echo "" |
2838 PRINT_VAR(extra_objs, | 2918 PRINT_VAR(extra_objs, |
2839 c_switch_general, c_switch_window_system, c_switch_all, | 2919 c_switch_general, c_switch_window_system, c_switch_all, |
2840 ld_switch_general, ld_switch_window_system, ld_switch_all, | 2920 ld_switch_general, ld_switch_window_system, ld_switch_all, |
2841 ld_libs_general, ld_libs_window_system, ld_libs_all) | 2921 ld_libs_general, ld_libs_window_system, ld_libs_all) |
2842 echo "" | 2922 echo "" |
2843 fi | 2923 fi |
2924 | |
2925 dnl Create some auxiliary files | |
2926 if test -f $srcdir/src/gdbinit -a ! -f src/gdbinit ; then | |
2927 echo "creating src/gdbinit" | |
2928 echo "source $srcdir/src/gdbinit" > src/gdbinit | |
2929 fi | |
2930 | |
2931 dnl Create top level .sbinit for Sun compilers | |
2932 AC_TRY_COMPILE([],[#ifndef __SUNPRO_C | |
2933 #error No Sun source browser capability | |
2934 #endif | |
2935 ],[echo "creating .sbinit" | |
2936 ( echo "# For use with Sun WorkShop's Source browser." | |
2937 echo "# See sbquery(1) and sbinit(4) for more information" | |
2938 for dir in $MAKE_SUBDIR; do echo "import $dir"; done | |
2939 ) > .sbinit | |
2940 ]) | |
2941 | |
2942 dnl There are no more compile tests; remove the core they created. | |
2943 rm -f core | |
2844 | 2944 |
2845 dnl ------------------------------------- | 2945 dnl ------------------------------------- |
2846 dnl Substitute into Makefile and config.h | 2946 dnl Substitute into Makefile and config.h |
2847 dnl ------------------------------------- | 2947 dnl ------------------------------------- |
2848 | 2948 |
2899 AC_SUBST(native_sound_lib) | 2999 AC_SUBST(native_sound_lib) |
2900 AC_SUBST(sound_cflags) | 3000 AC_SUBST(sound_cflags) |
2901 AC_SUBST(RANLIB) | 3001 AC_SUBST(RANLIB) |
2902 AC_SUBST(dynodump_arch) | 3002 AC_SUBST(dynodump_arch) |
2903 | 3003 |
2904 AC_DEFINE_UNQUOTED(EMACS_VERSION, $version) | |
2905 AC_DEFINE_UNQUOTED(EMACS_CONFIGURATION, "$canonical") | 3004 AC_DEFINE_UNQUOTED(EMACS_CONFIGURATION, "$canonical") |
2906 AC_DEFINE_UNQUOTED(config_machfile, "$machfile") | 3005 AC_DEFINE_UNQUOTED(config_machfile, "$machfile") |
2907 AC_DEFINE_UNQUOTED(config_opsysfile, "$opsysfile") | 3006 AC_DEFINE_UNQUOTED(config_opsysfile, "$opsysfile") |
2908 AC_DEFINE_UNQUOTED(UNEXEC_SRC, $UNEXEC_SRC) | |
2909 | 3007 |
2910 dnl Following are deprecated | 3008 dnl Following are deprecated |
2911 | 3009 |
2912 null_string="" | 3010 null_string="" |
2913 AC_DEFINE_UNQUOTED(LD_SWITCH_X_SITE, $null_string) | 3011 AC_DEFINE_UNQUOTED(LD_SWITCH_X_SITE, $null_string) |
3001 if test "$with_xmu" != yes -a "$with_x11" = yes; then | 3099 if test "$with_xmu" != yes -a "$with_x11" = yes; then |
3002 echo " No Xmu; substituting equivalent routines." | 3100 echo " No Xmu; substituting equivalent routines." |
3003 fi | 3101 fi |
3004 | 3102 |
3005 test "$with_gif" = yes && echo " Compiling in support for GIF image conversion." | 3103 test "$with_gif" = yes && echo " Compiling in support for GIF image conversion." |
3006 test "$with_xpm" = yes && echo " Compiling in support for XPM images." | 3104 if test "$with_xpm" = yes; then |
3105 echo " Compiling in support for XPM images." | |
3106 else | |
3107 echo " --------------------------------------------------------------------" | |
3108 echo " WARNING: Compiling without XPM support." | |
3109 echo " WARNING: You should strongly considering installing XPM." | |
3110 echo " WARNING: Otherwise toolbars and other graphics will look suboptimal." | |
3111 echo " --------------------------------------------------------------------" | |
3112 fi | |
3007 test "$with_xface" = yes && echo " Compiling in support for X-Face message headers." | 3113 test "$with_xface" = yes && echo " Compiling in support for X-Face message headers." |
3008 test "$with_jpeg" = yes && echo " Compiling in support for JPEG image conversion." | 3114 test "$with_jpeg" = yes && echo " Compiling in support for JPEG image conversion." |
3009 test "$with_png" = yes && echo " Compiling in support for PNG image conversion." | 3115 test "$with_png" = yes && echo " Compiling in support for PNG image conversion." |
3010 test "$with_tiff" = yes && echo " Compiling in support for TIFF image conversion (not implemented)." | 3116 test "$with_tiff" = yes && echo " Compiling in support for TIFF image conversion (not implemented)." |
3011 | 3117 |
3028 test "$with_xim" = motif && echo " Using Motif to provide XIM support." | 3134 test "$with_xim" = motif && echo " Using Motif to provide XIM support." |
3029 test "$with_xim" = xlib && echo " Using raw Xlib to provide XIM support." | 3135 test "$with_xim" = xlib && echo " Using raw Xlib to provide XIM support." |
3030 test "$with_canna" = yes && echo " Compiling in support for Canna on Mule." | 3136 test "$with_canna" = yes && echo " Compiling in support for Canna on Mule." |
3031 if test "$with_wnn" = yes; then | 3137 if test "$with_wnn" = yes; then |
3032 echo " Compiling in support for the WNN input method on Mule." | 3138 echo " Compiling in support for the WNN input method on Mule." |
3033 test "$with_wnn6" = yes && echo " WNN support for version 6." | 3139 test "$with_wnn6" = yes && echo " Using WNN version 6." |
3034 fi | 3140 fi |
3035 test "$with_i18n3" = yes && echo " Compiling in I18N support, level 3 (doesn't currently work)." | 3141 test "$with_i18n3" = yes && echo " Compiling in I18N support, level 3 (doesn't currently work)." |
3036 | 3142 |
3037 test "$with_cde" = yes && echo " Compiling in support for CDE." | 3143 test "$with_cde" = yes && echo " Compiling in support for CDE." |
3038 test "$with_tooltalk" = yes && echo " Compiling in support for ToolTalk." | 3144 test "$with_tooltalk" = yes && echo " Compiling in support for ToolTalk." |
3064 | 3170 |
3065 test "$use_union_type" = yes && echo " Using the union type for Lisp_Objects." | 3171 test "$use_union_type" = yes && echo " Using the union type for Lisp_Objects." |
3066 test "$debug" = yes && echo " Compiling in extra code for debugging." | 3172 test "$debug" = yes && echo " Compiling in extra code for debugging." |
3067 test "$memory_usage_stats" = yes && echo " Compiling in code for checking XEmacs memory usage." | 3173 test "$memory_usage_stats" = yes && echo " Compiling in code for checking XEmacs memory usage." |
3068 test "$usage_tracking" = yes && echo " Compiling with usage tracking active (Sun internal)." | 3174 test "$usage_tracking" = yes && echo " Compiling with usage tracking active (Sun internal)." |
3175 if test "$error_check_extents $error_check_typecheck $error_check_bufpos $error_check_gc $error_check_malloc" \ | |
3176 != "no no no no no"; then | |
3177 echo " WARNING: ---------------------------------------------------------" | |
3178 echo " WARNING: Compiling in support for runtime error checking." | |
3179 echo " WARNING: XEmacs will run noticeably more slowly as a result." | |
3180 echo " WARNING: Error checking is on by default for XEmacs beta releases." | |
3181 echo " WARNING: ---------------------------------------------------------" | |
3182 fi | |
3069 echo "" | 3183 echo "" |
3070 ) | tee -a Installation | 3184 ) | tee -a Installation |
3071 echo 'The above configure report is appended to "Installation" file.' | 3185 echo "The above configure report is appended to \"Installation\" file." |
3072 echo "" | 3186 echo "" |
3073 | 3187 |
3074 dnl ----------------------------------- | 3188 dnl ----------------------------------- |
3075 dnl Now generate config.h and Makefiles | 3189 dnl Now generate config.h and Makefiles |
3076 dnl ----------------------------------- | 3190 dnl ----------------------------------- |
3087 dnl except ./Makefile from $srcdir/Makefile.in | 3201 dnl except ./Makefile from $srcdir/Makefile.in |
3088 | 3202 |
3089 AC_OUTPUT($internal_makefile_list,[ | 3203 AC_OUTPUT($internal_makefile_list,[ |
3090 for dir in $MAKE_SUBDIR; do | 3204 for dir in $MAKE_SUBDIR; do |
3091 echo creating $dir/Makefile | 3205 echo creating $dir/Makefile |
3092 ( set -e | 3206 ( |
3093 cd $dir | 3207 cd $dir |
3094 rm -f junk.c | 3208 rm -f junk.c |
3095 sed -e 's/^# Generated.*//' -e 's%/\*\*/#.*%%' < Makefile.in > junk.c; | 3209 sed -e 's/^# Generated.*//' -e 's%/\*\*/#.*%%' < Makefile.in > junk.c; |
3096 $CPP -I. -I${top_srcdir}/src $CPPFLAGS junk.c > junk.cpp; | 3210 $CPP -I. -I${top_srcdir}/src $CPPFLAGS junk.c > junk.cpp; |
3097 < junk.cpp \ | 3211 < junk.cpp \ |
3102 > Makefile.new | 3216 > Makefile.new |
3103 chmod 444 Makefile.new | 3217 chmod 444 Makefile.new |
3104 mv -f Makefile.new Makefile | 3218 mv -f Makefile.new Makefile |
3105 rm -f junk.c junk.cpp | 3219 rm -f junk.c junk.cpp |
3106 ) | 3220 ) |
3107 test "$?" != 0 && exit "$?" # For debugging | |
3108 done | 3221 done |
3109 ], | 3222 ], |
3110 [CPP="$CPP" | 3223 [CPP="$CPP" |
3111 CPPFLAGS="$CPPFLAGS" | 3224 CPPFLAGS="$CPPFLAGS" |
3112 top_srcdir="$srcdir" | 3225 top_srcdir="$srcdir" |
3113 MAKE_SUBDIR="$MAKE_SUBDIR" | 3226 MAKE_SUBDIR="$MAKE_SUBDIR" |
3114 ]) | 3227 ]) |
3115 | |
3116 if test ! -f src/gdbinit && test -f $topsrcdir/src/gdbinit; then | |
3117 echo "creating src/gdbinit" | |
3118 echo "source $topsrcdir/src/gdbinit" > src/gdbinit | |
3119 fi | |
3120 | |
3121 if test "$sunpro_c" = "yes"; then dnl create useful .sbinit file | |
3122 cat < EOF > .sbinit | |
3123 # For use with Sun WorkShop's Source browser. | |
3124 # See sbquery(1) and sbinit(4) for more information | |
3125 import src | |
3126 import lwlib | |
3127 import lib-src | |
3128 import dynodump | |
3129 EOF | |
3130 fi |