Mercurial > hg > xemacs-beta
comparison configure.in @ 149:538048ae2ab8 r20-3b1
Import from CVS: tag r20-3b1
author | cvs |
---|---|
date | Mon, 13 Aug 2007 09:36:16 +0200 |
parents | 318232e2a3f0 |
children | 59463afc5666 |
comparison
equal
deleted
inserted
replaced
148:f659db2a1f73 | 149:538048ae2ab8 |
---|---|
1 dnl -*- mode: m4; -*- | 1 dnl Define our own header notice with own copyrights |
2 dnl Synched up with: FSF 19.31. | 2 define([PRINT_VAR],[ifelse([$#] ,0, , [$#], 1, echo "[$1] = $[$1]", echo "[$1] = $[$1]" |
3 dnl (19.29 -- 19.31 use Autoconf 2.x instead of Autoconf 1.x. | 3 [PRINT_VAR(builtin([shift],$@))])]) |
4 dnl Some stuff related to this change has not been synched because | 4 define([AC_INIT_NOTICE], |
5 dnl it can't be until we switch to Autoconf 2.x.) | 5 [#### Configuration script for XEmacs. Largely divergent from FSF. |
6 dnl | 6 #### Guess values for system-dependent variables and create Makefiles. |
7 dnl This is an autoconf script. | 7 #### Generated automatically using autoconf version] AC_ACVERSION [ |
8 dnl To rebuild the `configure' script from this, execute the command | 8 #### Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. |
9 dnl autoconf | |
10 dnl in the directory containing this script. You must have autoconf | |
11 dnl version 1.9 or later. | |
12 dnl | |
13 dnl The following text appears in the resulting `configure' script, | |
14 dnl explaining how to rebuild it. | |
15 dnl | |
16 AC_PREREQ(1.9)dnl means 'delete newline' and this one needs to be here | |
17 #!/bin/sh | |
18 #### Configuration script for XEmacs. | |
19 #### Copyright (C) 1994 Free Software Foundation, Inc. | |
20 #### Copyright (C) 1993-1995 Board of Trustees, University of Illinois. | 9 #### Copyright (C) 1993-1995 Board of Trustees, University of Illinois. |
10 #### Copyright (C) 1996, 1997 Sun Microsystems, Inc. | |
21 #### Copyright (C) 1995, 1996 Ben Wing. | 11 #### Copyright (C) 1995, 1996 Ben Wing. |
22 | 12 |
23 ### Don't edit this script! | 13 ### Don't edit this script! |
24 ### This script was automatically generated by the `autoconf' program | 14 ### This script was automatically generated by the `autoconf' program |
25 ### from the file `./configure.in'. | 15 ### from the file `./configure.in'. |
26 ### To rebuild it, execute the command | 16 ### To rebuild it, execute the command |
27 ### autoconf | 17 ### autoconf |
28 ### in the this directory. You must have autoconf version 1.9 or later. | 18 ### in the this directory. You must have autoconf version 2.12 or later. |
29 | 19 |
30 ### This file is part of XEmacs. | 20 ### This file is part of XEmacs. |
31 | 21 |
32 ### XEmacs is free software; you can redistribute it and/or modify it | 22 ### XEmacs is free software; you can redistribute it and/or modify it |
33 ### under the terms of the GNU General Public License as published by | 23 ### under the terms of the GNU General Public License as published by |
42 ### You should have received a copy of the GNU General Public License | 32 ### You should have received a copy of the GNU General Public License |
43 ### along with XEmacs; see the file COPYING. If not, write to the Free | 33 ### along with XEmacs; see the file COPYING. If not, write to the Free |
44 ### Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA | 34 ### Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA |
45 ### 02111-1307, USA. | 35 ### 02111-1307, USA. |
46 | 36 |
47 ### Since XEmacs has configuration requirements that autoconf can't | 37 ### For usage, run `./configure --help' |
48 ### meet, this file is an unholy marriage of custom-baked | 38 ### For more detailed information on building and installing XEmacs, |
49 ### configuration code and autoconf macros. | 39 ### read the file `INSTALL'. |
50 ### | |
51 ### We use the m4 quoting characters [ ] (as established by the | |
52 ### autoconf system) to include large sections of raw sewage - Oops, I | |
53 ### mean, shell code - in the final configuration script. | |
54 ### | |
55 ### Usage: configure config_name | |
56 ### | 40 ### |
57 ### If configure succeeds, it leaves its status in config.status. | 41 ### If configure succeeds, it leaves its status in config.status. |
42 ### A log of configuration tests can be found in config.log. | |
58 ### If configure fails after disturbing the status quo, | 43 ### If configure fails after disturbing the status quo, |
59 ### config.status is removed. | 44 ### config.status is removed. |
60 | 45 ]) |
61 ### Remove any more than one leading "." element from the path name. | 46 |
62 ### If we don't remove them, then another "./" will be prepended to | 47 dnl Since XEmacs has configuration requirements that autoconf cannot |
63 ### the file name each time we use config.status, and the program name | 48 dnl meet, this file is an unholy marriage of custom-baked |
64 ### will get larger and larger. This wouldn't be a problem, except | 49 dnl configuration code and autoconf macros. |
65 ### that since progname gets recorded in all the Makefiles this script | 50 |
66 ### produces, move-if-change thinks they're different when they're | 51 dnl We use the m4 quoting characters [ ] (as established by the |
67 ### not. | 52 dnl autoconf system), so quote them like this: [[foo]] |
68 ### | 53 |
69 ### It would be nice if we could put the ./ in a \( \) group and then | 54 AC_PREREQ(2.12)dnl |
70 ### apply the * operator to that, so we remove as many leading ./././'s | 55 dnl Redefine some standard autoconf macros |
71 ### as are present, but some seds (like Ultrix's sed) don't allow you to | 56 dnl here is how XEmacs is different: |
72 ### apply * to a \( \) group. Bleah. | 57 dnl - no cache file |
58 dnl - non-standard options | |
59 dnl - suport for extra-verbosity | |
60 dnl - ordinary libs are handled separately from X libs (might be a mistake) | |
61 dnl - various random kludges (e.g. -with-dnet=no | |
62 | |
63 dnl Disable cache files: | |
64 dnl This is controversial, but I am convinced this is the right way to go, | |
65 dnl at least by default. Otherwise there are too many surprises. | |
66 define([AC_CACHE_LOAD], )dnl | |
67 define([AC_CACHE_SAVE], )dnl | |
68 define([AC_CACHE_VAL], [ | |
69 $2 | |
70 ])dnl | |
71 | |
72 dnl Avoid spurious cross-compiling warnings from AC_TRY_RUN | |
73 dnl XEmacs is unlikely to ever cross-compile | |
74 define([AC_TRY_RUN],[AC_TRY_RUN_NATIVE([$1], [$2], [$3])])dnl | |
75 | |
76 | |
77 dnl Redefine AC_DEFINE* to provide more output if extra_verbose | |
78 dnl Set VARIABLE to VALUE, verbatim, or 1. | |
79 dnl AC_DEFINE(VARIABLE [, VALUE]) | |
80 define([AC_DEFINE], | |
81 [{ test "$extra_verbose" = "yes" && cat << \EOF | |
82 Defining $1[]ifelse($#, 2, [ = $2],) | |
83 EOF | |
84 cat >> confdefs.h <<\EOF | |
85 [#define] $1 ifelse($#, 2, [$2], 1) | |
86 EOF | |
87 } | |
88 ]) | |
89 | |
90 define([AC_DEFINE_UNQUOTED], | |
91 [{ test "$extra_verbose" = "yes" && cat << EOF | |
92 Defining $1[]ifelse($#, 2, [ = $2],) | |
93 EOF | |
94 cat >> confdefs.h <<EOF | |
95 [#define] $1 ifelse($#, 2, [$2], 1) | |
96 EOF | |
97 } | |
98 ]) | |
99 | |
100 | |
101 dnl redefine AC_CHECK_LIB in accordance with our own value of ac_link | |
102 dnl Add in extra kludgy check to support with_dnet=no | |
103 dnl Add in extra LDFLAGS arg, which PRECEDE libs | |
104 dnl Support --with-dnet=no | |
105 | |
106 dnl AC_CHECK_LIB(LIBRARY, FUNCTION [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND | |
107 dnl [, OTHER-LIBRARIES] [, LDFLAGS]]]]) | |
108 define([AC_CHECK_LIB], | |
109 [ifelse([$1],dnet, [if test "$with_dnet" = "no"; then | |
110 ac_cv_lib_dnet_dnet_ntoa=no | |
111 ifelse([$4], , , [$4] | |
112 )dnl | |
113 else | |
114 ])] | |
115 AC_CHECK_LIB_ORIG_HACKED([$1],[$2],[$3],[$4],[$5], [$6]) | |
116 [ifelse([$1],dnet,[fi | |
117 ])]dnl | |
118 ) | |
119 | |
120 define([AC_CHECK_LIB_ORIG_HACKED], | |
121 [ifelse([$5],,AC_MSG_CHECKING([for $2 in -l$1]), | |
122 xe_msg_checking="for [$2] in -l[$1]" | |
123 test -n "[$5]" && xe_msg_checking="$xe_msg_checking using extra libs [$5]" | |
124 AC_MSG_CHECKING("$xe_msg_checking")) | |
125 dnl Use a cache variable name containing both the library and function name, | |
126 dnl because the test really is for library $1 defining function $2, not | |
127 dnl just for library $1. Separate tests with the same $1 and different $2s | |
128 dnl may have different results. | |
129 ac_lib_var=`echo $1['_']$2 | sed 'y%./+-%__p_%'` | |
130 AC_CACHE_VAL(ac_cv_lib_$ac_lib_var, | |
131 [xe_check_libs="$6 -l$1 $5" | |
132 AC_TRY_LINK(dnl | |
133 ifelse([$2], [main], , dnl Avoid conflicting decl of main. | |
134 [/* Override any gcc2 internal prototype to avoid an error. */ | |
135 ]ifelse(AC_LANG, CPLUSPLUS, [#ifdef __cplusplus | |
136 extern "C" | |
137 #endif | |
138 ])dnl | |
139 [/* We use char because int might match the return type of a gcc2 | |
140 builtin and then its argument prototype would still apply. */ | |
141 char $2(); | |
142 ]), | |
143 [$2()], | |
144 eval "ac_cv_lib_$ac_lib_var=yes", | |
145 eval "ac_cv_lib_$ac_lib_var=no") | |
146 xe_check_libs="" | |
147 ])dnl | |
148 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
149 AC_MSG_RESULT(yes) | |
150 ifelse([$3], , | |
151 [changequote(, )dnl | |
152 ac_tr_lib=HAVE_LIB`echo $1 | sed -e 's/[^a-zA-Z0-9_]/_/g' \ | |
153 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` | |
154 changequote([, ])dnl | |
155 AC_DEFINE_UNQUOTED($ac_tr_lib) | |
156 LIBS="-l$1 $LIBS" | |
157 ], [$3]) | |
158 else | |
159 AC_MSG_RESULT(no) | |
160 ifelse([$4], , , [$4 | |
161 ])dnl | |
162 fi | |
163 ]) | |
164 | |
165 | |
166 dnl AC_LANG_C() | |
167 define([AC_LANG_C], | |
168 [define([AC_LANG], [C])dnl | |
169 ac_ext=c | |
170 dnl CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. | |
171 dnl ac_cpp='$CPP $CPPFLAGS' | |
172 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' | |
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' | |
175 xe_ldflags='$ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site' # $ld_switch_x_machine $ld_switch_x_system' | |
176 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" | |
178 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' | |
180 cross_compiling=no | |
181 ]) | |
182 | |
183 define([AC_INIT_PARSE_ARGS],[ | |
184 dnl Initialize some variables set by options. | |
185 dnl The variables have the same names as the options, with | |
186 dnl dashes changed to underlines. | |
187 build=NONE | |
188 cache_file=/dev/null | |
189 exec_prefix=NONE | |
190 host=NONE | |
191 no_create= | |
192 nonopt=NONE | |
193 no_recursion= | |
194 prefix=NONE | |
195 program_prefix=NONE | |
196 program_suffix=NONE | |
197 program_transform_name=s,x,x, | |
198 silent= | |
199 site= | |
200 srcdir= | |
201 target=NONE | |
202 verbose= | |
203 x_includes=NONE | |
204 x_libraries=NONE | |
205 dnl Installation directory options. | |
206 dnl These are left unexpanded so users can "make install exec_prefix=/foo" | |
207 dnl and all the variables that are supposed to be based on exec_prefix | |
208 dnl by default will actually change. | |
209 dnl Use braces instead of parens because sh, perl, etc. also accept them. | |
210 bindir='${exec_prefix}/bin' | |
211 sbindir='${exec_prefix}/sbin' | |
212 libexecdir='${exec_prefix}/libexec' | |
213 datadir='${prefix}/share' | |
214 sysconfdir='${prefix}/etc' | |
215 sharedstatedir='${prefix}/com' | |
216 localstatedir='${prefix}/var' | |
217 libdir='${{exec_prefix}}/lib' | |
218 includedir='${prefix}/include' | |
219 oldincludedir='/usr/include' | |
220 infodir='${prefix}/info' | |
221 mandir='${prefix}/man' | |
222 | |
223 dnl Initialize some other variables. | |
224 subdirs= | |
225 MFLAGS= MAKEFLAGS= | |
226 dnl Maximum number of lines to put in a shell here document. | |
227 ac_max_here_lines=12 | |
228 ])dnl | |
229 AC_INIT(src/lisp.h)dnl | |
230 AC_CONFIG_HEADER(src/config.h lwlib/config.h) | |
231 dnl Remove any more than one leading "." element from the path name. | |
232 dnl If we do not remove them, then another "./" will be prepended to | |
233 dnl the file name each time we use config.status, and the program name | |
234 dnl will get larger and larger. This would not be a problem, except | |
235 dnl that since progname gets recorded in all the Makefiles this script | |
236 dnl produces, move-if-change thinks they're different when they're | |
237 dnl not. | |
238 dnl | |
239 dnl It would be nice if we could put the ./ in a \( \) group and then | |
240 dnl apply the * operator to that, so we remove as many leading './././'s | |
241 dnl as are present, but some seds (like Ultrix's sed) don't allow you to | |
242 dnl apply * to a \( \) group. Bleah. | |
73 progname="`echo $0 | sed 's:^\./\./:\./:'`" | 243 progname="`echo $0 | sed 's:^\./\./:\./:'`" |
74 | 244 |
75 ############################################################################ | 245 dnl ----------------------------- |
76 # # | 246 dnl Establish some default values |
77 # Establish some default values # | 247 dnl ----------------------------- |
78 # # | 248 |
79 ############################################################################ | 249 dnl Prevent autoconf2 caching |
80 | 250 cache_file=/dev/null |
81 #run_in_place='no' | 251 |
252 MAKE_SUBDIR="src lib-src" | |
253 | |
254 dnl run_in_place='no' | |
82 prefix='/usr/local' | 255 prefix='/usr/local' |
83 exec_prefix='${prefix}' | 256 exec_prefix='${prefix}' |
84 bindir='${exec_prefix}/bin' | 257 bindir='${exec_prefix}/bin' |
85 # FSF 19.29 changes to: | 258 dnl FSF 19.29 changes to: |
86 # datadir='${prefix}/share' | 259 dnl datadir='${prefix}/share' |
87 # sharedstatedir='${prefix}/com' | 260 dnl sharedstatedir='${prefix}/com' |
88 # libexecdir='${exec_prefix}/libexec' | 261 dnl libexecdir='${exec_prefix}/libexec' |
89 datadir='${prefix}/lib' | 262 datadir='${prefix}/lib' |
90 statedir='${prefix}/lib' | 263 statedir='${prefix}/lib' |
91 libdir='${exec_prefix}/lib' | 264 libdir='${exec_prefix}/lib' |
92 mandir='${prefix}/man/man1' | 265 mandir='${prefix}/man/man1' |
93 infodir='${prefix}/lib/xemacs-${version}/info' | 266 infodir='${prefix}/lib/xemacs-${version}/info' |
109 cflags='NO_CFLAGS_DEFINED' | 282 cflags='NO_CFLAGS_DEFINED' |
110 dynamic='' | 283 dynamic='' |
111 with_x11='' | 284 with_x11='' |
112 rel_alloc='default' | 285 rel_alloc='default' |
113 use_system_malloc='default' | 286 use_system_malloc='default' |
114 internal_makefile_list='Makefile lib-src/Makefile.in src/Makefile.in lwlib/Makefile.in dynodump/Makefile.in' | 287 energize_version='' |
115 energize_version='no' | |
116 native_sound_lib='' | 288 native_sound_lib='' |
117 # make normal error-checking be the default in alpha and beta versions, so | 289 dnl make normal error-checking be the default in alpha and beta versions, so |
118 # that bugs get noticed. Change this for released versions. | 290 dnl that bugs get noticed. Change this for released versions. |
119 error_check_default='no' | 291 error_check_default='no' |
120 error_check_extents=$error_check_default | 292 error_check_extents=$error_check_default |
121 error_check_typecheck=$error_check_default | 293 error_check_typecheck=$error_check_default |
122 error_check_bufpos=$error_check_default | 294 error_check_bufpos=$error_check_default |
123 error_check_gc=$error_check_default | 295 error_check_gc=$error_check_default |
124 error_check_malloc=$error_check_default | 296 error_check_malloc=$error_check_default |
125 # debug=yes must be set when error checking is present. This should be | 297 dnl debug=yes must be set when error checking is present. This should be |
126 # fixed up. | 298 dnl fixed up. |
127 debug=$error_check_default | 299 debug=$error_check_default |
128 quantify='no' | 300 dnl use-assertions should be 'yes' by default. Too many people in this |
129 # 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 |
130 # world have core dumps turned off by default or "can't find where the | 302 dnl core file went\". At least we should get some useful output ... |
131 # core file went". At least we should get some useful output ... | |
132 use_assertions='yes' | 303 use_assertions='yes' |
133 # the following is set to yes or no later. | 304 dnl the following is set to yes or no later. |
134 with_gif='' | 305 with_gif='' |
135 # the following is set to yes or no later. | 306 dnl the following is set to yes or no later. |
136 with_toolbars='' | 307 with_toolbars='' |
137 with_tty='yes' | |
138 use_union_type='no' | 308 use_union_type='no' |
139 with_dnet='' | 309 with_dnet='' |
140 | 310 |
141 # # gnu echo silently eats `--help', `--version', `-n', `-e', `-E', `-n'. | 311 dnl On Sun systems, people sometimes set up the variable CPP |
142 # # other versions of echo eat any strings beginning with `-n'. | 312 dnl with a value that is a directory, not an executable at all. |
143 # # when parsing arguments, special case these strings and don't | 313 dnl Detect that case, and ignore that value. |
144 # # pass them through echo | |
145 # echo=/bin/echo | |
146 # | |
147 # this approach abandoned in favor of | |
148 # | |
149 # echo "" ${stuff_to_filter} | sed -e 's:^ ::' | |
150 | |
151 # On Sun systems, people sometimes set up the variable CPP | |
152 # with a value that is a directory, not an executable at all. | |
153 # Detect that case, and ignore that value. | |
154 test -n "$CPP" -a -d "$CPP" && CPP= | 314 test -n "$CPP" -a -d "$CPP" && CPP= |
155 | 315 |
156 ############################################################################ | 316 dnl Usage message (get it via -help) |
157 # # | 317 usage="Usage: $progname CONFIGURATION [[-OPTION[=VALUE] ...]] |
158 # Usage messages # | |
159 # # | |
160 ############################################################################ | |
161 | |
162 short_usage="Usage: ${progname} CONFIGURATION [[-OPTION[=VALUE] ...]] | |
163 | 318 |
164 Set compilation and installation parameters for XEmacs, and report. | 319 Set compilation and installation parameters for XEmacs, and report. |
165 CONFIGURATION specifies the machine and operating system to build for. | 320 CONFIGURATION specifies the machine and operating system to build for. |
166 | 321 |
167 Note that for most of the following options, you can explicitly enable | 322 Note that for most of the following options, you can explicitly enable |
168 them using \`--OPTION=yes' and explicitly disable them using \`--OPTION=no'. | 323 them using \`--OPTION=yes' and explicitly disable them using \`--OPTION=no'. |
169 This is especially useful for auto-detected options. | 324 This is especially useful for auto-detected options. |
170 | 325 |
171 Options marked with a (*) are autodetected. | 326 Options marked with a (*) are autodetected. |
172 | 327 |
173 | 328 |
174 General options: | 329 General options: |
175 | 330 |
176 --help Issue this usage message. | 331 --help Issue this usage message. |
177 --verbose Display the results of configure tests. | 332 --verbose Display the results of configure tests. |
178 --extra-verbose Also display the output of any compiler invocation. | 333 --extra-verbose Display even more information, useful for debugging. |
179 (Useful when feature tests are coming out wrong.) | 334 |
180 | 335 |
181 | 336 Compilation options: |
182 Compiler options: | 337 |
183 | 338 --compiler=XXXX Specify compiler. Overrides environment variable CC. |
184 --compiler=XXXX Specify compiler. | |
185 --with-gcc (*) Use GCC to compile XEmacs. | 339 --with-gcc (*) Use GCC to compile XEmacs. |
186 --with-lcc Use Lucid's LCC to compile XEmacs. | |
187 --with-gcc=no Don't use GCC to compile XEmacs. | 340 --with-gcc=no Don't use GCC to compile XEmacs. |
188 --with-gnu-make Write the Makefiles to take advantage of | 341 --with-gnu-make Write the Makefiles to take advantage of |
189 special features of GNU Make. (GNU Make | 342 special features of GNU Make. (GNU Make |
190 works fine on the Makefiles even without this | 343 works fine on the Makefiles even without this |
191 option. This just allows for simultaneous | 344 option. This just allows for simultaneous |
192 in-place and --srcdir building.) | 345 in-place and --srcdir building.) |
193 --cflags=FLAGS Override the default values for CFLAGS. | 346 --cflags=FLAGS Compiler flags. Overrides environment variable CFLAGS. |
194 --site-includes=DIR Other header file directories. Separate multiple | 347 --site-includes=DIR Other header file directories. Separate multiple |
195 dirs with spaces and use quotes to enclose. | 348 dirs with spaces and use quotes to enclose. |
196 --site-libraries=DIR Other library directories. | 349 --site-libraries=DIR Other library directories. |
197 --site-runtime-libraries=DIR | 350 --site-runtime-libraries=DIR |
198 Paths to add with -R flag. | 351 Paths to add with -R flag. |
203 See also --with-gnu-make. | 356 See also --with-gnu-make. |
204 --const-is-losing=no Allow the use of const in the source code. | 357 --const-is-losing=no Allow the use of const in the source code. |
205 | 358 |
206 | 359 |
207 Installation options: | 360 Installation options: |
208 | 361 |
209 --prefix=DIR Install files below DIR. Defaults to \`${prefix}'. | 362 --prefix=DIR Install files below DIR. Defaults to \`$prefix'. |
210 | 363 |
211 | 364 |
212 Window-system options: | 365 Window-system options: |
213 | 366 |
214 --with-x (*) Support the X Window System. | 367 --with-x (*) Support the X Window System. |
215 --with-x=no Don't support X. | 368 --with-x=no Don't support X. |
216 --x-includes=DIR Search for X header files in DIR. | 369 --x-includes=DIR Search for X header files in DIR. |
217 --x-libraries=DIR Search for X libraries in DIR. | 370 --x-libraries=DIR Search for X libraries in DIR. |
371 --with-toolbars=no Don't compile with any toolbar support. | |
218 --with-menubars=TYPE Use TYPE menubars (lucid, motif, or no). The Lucid | 372 --with-menubars=TYPE Use TYPE menubars (lucid, motif, or no). The Lucid |
219 widgets emulate Motif (mostly) but are faster. | 373 widgets emulate Motif (mostly) but are faster. |
220 *WARNING* The Motif menubar is currently broken. | 374 *WARNING* The Motif menubar is currently broken. |
221 --with-scrollbars=TYPE Use TYPE scrollbars (lucid, motif, athena, | 375 --with-scrollbars=TYPE Use TYPE scrollbars |
222 athena3d, or no). | 376 (lucid, motif, athena, athena3d, or no). |
223 --with-dialogs=TYPE Use TYPE dialog boxes (motif, athena, athena3d, or no). | 377 --with-dialogs=TYPE Use TYPE dialog boxes (motif, athena, athena3d, or no). |
224 (Lucid menubars and scrollbars are the default. | 378 (Lucid menubars and scrollbars are the default. |
225 Motif dialog boxes will be used if Motif can be | 379 Motif dialog boxes will be used if Motif can be |
226 found.) | 380 found.) |
227 --with-cde (*) Compile in support for CDE drag and drop. | 381 --with-cde (*) Compile in support for CDE drag and drop. |
228 --with-offix (*) Compile in support for OffiX drag and drop. | 382 --with-offix (*) Compile in support for OffiX drag and drop. |
383 --with-xmu=no (*) For those unfortunates whose vendors don't ship Xmu. | |
384 --external-widget Compile with external widget support. | |
385 --with-gif Compile with support for GIF image conversion. | |
386 This support is built-in and defaults to \`yes'. | |
229 --with-xpm (*) Compile with support for XPM files. | 387 --with-xpm (*) Compile with support for XPM files. |
230 It is highly recommended that you obtain XPM | 388 It is highly recommended that you obtain XPM |
231 (version 3.4g or better) if you don't already | 389 (version 3.4h or better) if you don't already |
232 have it. Get it from the XEmacs FTP site. | 390 have it. Get it from the XEmacs FTP site. |
233 --with-xmu=no (*) For those unfortunates whose vendors don't ship Xmu. | 391 --with-xface (*) Compile with support for X-Face mail header |
392 conversion. Requires the compface library. | |
393 Get it from the XEmacs FTP site. | |
394 --with-jpeg (*) Compile with support for JPEG image conversion. | |
395 Requires libjpeg from the Independent JPEG Group. | |
396 Get it from the XEmacs FTP site. | |
397 --with-png (*) Compile with support for PNG image conversion. | |
398 Requires libpng. Get it from the XEmacs FTP site. | |
399 --with-tiff Compile with support for TIFF image conversion | |
400 (not yet implemented). | |
401 | |
402 | |
403 TTY options: | |
404 | |
405 --with-ncurses (*) Use the ncurses library for tty support. | |
406 --with-gpm (*) Compile in support for General Purpose Mouse. | |
234 | 407 |
235 | 408 |
236 Additional features: | 409 Additional features: |
237 | 410 |
238 --with-toolbars=no Don't compile with any toolbar support. | 411 --with-tooltalk (*) Support the ToolTalk IPC protocol. |
239 --with-tooltalk Support the ToolTalk IPC protocol. | 412 --with-workshop Support the Sun WorkShop (formerly Sparcworks) |
240 --with-sparcworks Support the Sun Sparcworks development environment. | 413 development environment. |
241 --with-energize Support the Lucid Energize development environment. | 414 --with-energize Support the Lucid Energize development environment. |
242 This doesn't currently work. | 415 This doesn't currently work. |
243 --with-socks Compile with support for SOCKS (an Internet proxy). | 416 --with-socks Compile with support for SOCKS (an Internet proxy). |
244 --with-term Compile with support for TERM (a way to multiplex | 417 --with-term Compile with support for TERM (a way to multiplex |
245 serial lines and provide vaguely Internet-like | 418 serial lines and provide vaguely Internet-like |
246 functionality over a simple dialup connection, | 419 functionality over a simple dialup connection, |
247 used on Linux and other systems. NOTE: We can't | 420 used on Linux and other systems. NOTE: We can't |
248 guarantee that our TERM support coexists well | 421 guarantee that our TERM support coexists well |
249 with standard Internet connections). | 422 with standard Internet connections). |
250 --with-xface (*) Compile with support for X-Face mail header | |
251 conversion. Requires the compface library. | |
252 Get it from the XEmacs FTP site. | |
253 --with-gif Compile with support for GIF image conversion. | |
254 This requires no special support and defaults to | |
255 \`yes'. | |
256 --with-jpeg (*) Compile with support for JPEG image conversion. | |
257 Requires libjpeg from the Independent JPEG Group. | |
258 Get it from the XEmacs FTP site. | |
259 --with-png (*) Compile with support for PNG image conversion. | |
260 Requires libpng. Get it from the XEmacs FTP site. | |
261 Accepted values are \`yes', \`no', and \`gnuz' | |
262 if you want to use -lgz instead of -lz. | |
263 --with-tiff Compile with support for TIFF image conversion | |
264 (not yet implemented). | |
265 --with-database=type (*) Compile with database support. Valid types are | 423 --with-database=type (*) Compile with database support. Valid types are |
266 \`no' or a comma-separated list of one or more | 424 \`no' or a comma-separated list of one or more |
267 of \`dbm', \`gnudbm', or \`berkdb'. | 425 of \`dbm', \`gnudbm', or \`berkdb'. |
268 --external-widget Compile with external widget support. | |
269 --with-sound=native (*) Compile with native sound support. | 426 --with-sound=native (*) Compile with native sound support. |
270 --with-sound=nas Compile with network sound support. | 427 --with-sound=nas Compile with network sound support. |
271 --with-sound=both Compile with native and network sound support. | 428 --with-sound=both Compile with native and network sound support. |
272 --native-sound-lib=LIB Native sound support library. Needed on Suns | 429 --native-sound-lib=LIB Native sound support library. Needed on Suns |
273 with --with-sound=both because both sound libraries | 430 with --with-sound=both because both sound libraries |
274 are called libaudio. | 431 are called libaudio. |
275 --with-mocklisp Compile with Mocklisp support. Don't do this | 432 --with-mocklisp Compile with Mocklisp support. Don't do this |
276 unless you have a Mocklisp program that you need | 433 unless you have a Mocklisp program that you need |
277 to run. | 434 to run. |
278 --usage-tracking Enable some Sun-internal code. If you don't | |
279 know what this is, you don't want it. | |
280 --with-pop support POP for mail retrieval | 435 --with-pop support POP for mail retrieval |
281 --with-kerberos support Kerberos-authenticated POP | 436 --with-kerberos support Kerberos-authenticated POP |
282 --with-hesiod support Hesiod to get the POP server host | 437 --with-hesiod support Hesiod to get the POP server host |
283 --with-dnet (*) Compile with support for DECnet. | 438 --with-dnet (*) Compile with support for DECnet. |
439 --mail-locking=TYPE (*) Specify the locking to be used by movemail to prevent | |
440 concurrent updates of mail spool files. Valid types | |
441 are \`lockf', \`flock', and \`lock-file'. | |
284 | 442 |
285 Internationalization options: | 443 Internationalization options: |
286 | 444 |
287 --with-mule Compile with Mule (MUlti-Lingual Emacs) support, | 445 --with-mule Compile with Mule (MUlti-Lingual Emacs) support, |
288 needed to suport non-Latin-1 (including Asian) languages. | 446 needed to suport non-Latin-1 (including Asian) languages. |
292 the Motif XmIm* routines (when available). | 450 the Motif XmIm* routines (when available). |
293 If the XmIm* routines are autodetected, | 451 If the XmIm* routines are autodetected, |
294 then the default is --with-xim=motif, else --with-xim=no. | 452 then the default is --with-xim=motif, else --with-xim=no. |
295 NOTE: On some systems like SunOS4 use of this option | 453 NOTE: On some systems like SunOS4 use of this option |
296 will cause XEmacs to crash at startup. | 454 will cause XEmacs to crash at startup. |
297 --with-canna Compile with support for Canna (a Japanese input method | 455 --with-canna (*) Compile with support for Canna (a Japanese input method |
298 used in conjunction with Mule support). | 456 used in conjunction with Mule support). |
299 --with-wnn Compile with support for WNN (a multi-language input method | 457 --with-wnn (*) Compile with support for WNN (a multi-language input method |
300 used in conjunction with Mule support). | 458 used in conjunction with Mule support). |
301 This is beta level code. | 459 This is beta level code. |
302 --with-wnn6 Compile with support for WNN version 6 | 460 --with-wnn6 (*) Compile with support for WNN version 6 |
303 This is alpha level code. | 461 This is alpha level code. |
304 --wnn-includes=DIR Search for WNN header files in DIR. | |
305 --wnn-libraries=DIR Search for WNN libraries in DIR. | |
306 --with-i18n3 Compile with I18N level 3 (support for message | 462 --with-i18n3 Compile with I18N level 3 (support for message |
307 translation). This doesn't currently work. | 463 translation). This doesn't currently work. |
308 --canna-includes=DIR Search for Canna header files in DIR. | |
309 --canna-libraries=DIR Search for Canna libraries in DIR. | |
310 | 464 |
311 | 465 |
312 Debugging options: | 466 Debugging options: |
313 | 467 |
314 --debug Compile with support for debugging XEmacs. | 468 --debug Compile with support for debugging XEmacs. |
328 up the compile-run-test cycle.) | 482 up the compile-run-test cycle.) |
329 --use-union-type Enable or disable use of a union, instead of an | 483 --use-union-type Enable or disable use of a union, instead of an |
330 int, for the fundamental Lisp_Object type; this | 484 int, for the fundamental Lisp_Object type; this |
331 provides stricter type-checking. Only works with | 485 provides stricter type-checking. Only works with |
332 some systems and compilers. | 486 some systems and compilers. |
333 | 487 |
334 | 488 |
335 Other options: | 489 Other options: |
336 | 490 |
337 --puresize=VALUE Override default amount of space for pure Lisp code. | 491 --puresize=VALUE Override default amount of space for pure Lisp code. |
338 --rel-alloc Use the relocating allocator (default for this option | 492 --rel-alloc Use the relocating allocator (default for this option |
344 Makefile.in, including --bindir, --libdir, --lispdir, --datadir, and | 498 Makefile.in, including --bindir, --libdir, --lispdir, --datadir, and |
345 so on. Note that we recommend against explicitly setting any of these | 499 so on. Note that we recommend against explicitly setting any of these |
346 variables. See the INSTALL file for a complete list plus the reasons | 500 variables. See the INSTALL file for a complete list plus the reasons |
347 we advise not changing them. | 501 we advise not changing them. |
348 | 502 |
349 If successful, ${progname} leaves its status in config.status. If | 503 If successful, $progname leaves its status in config.status. If |
350 unsuccessful after disturbing the status quo, it removes config.status." | 504 unsuccessful after disturbing the status quo, it removes config.status. |
351 | 505 |
352 ############################################################################ | 506 The configure build process also used the following environment variables: |
353 # # | 507 CC C compiler to use (but configure flags take precedence) |
354 # Options processing # | 508 CFLAGS C compiler compilation flags (such as -O) |
355 # # | 509 CPPFLAGS Additional compilation flags (sucha s -I) used only by the preprocessor |
356 ############################################################################ | 510 LDFLAGS Additional linker flags |
511 | |
512 For more details on the install process, consult the INSTALL file. | |
513 " | |
514 | |
515 dnl ------------------ | |
516 dnl Options Processing | |
517 dnl ------------------ | |
357 | 518 |
358 define([USAGE_ERROR], | 519 define([USAGE_ERROR], |
359 [(echo "${progname}: Usage error:" | 520 [(echo "$progname: Usage error:" |
360 echo " " $1 | 521 echo " " $1 |
361 echo " Use \`${progname} --help' for more details.") >&2 && exit 1]) | 522 echo " Use \`$progname --help' to show usage.") >&2 && exit 1]) |
362 | 523 |
363 ### Record all the arguments, so we can save them in config.status. | 524 dnl Record all the arguments, so we can save them in config.status. |
364 arguments="$@" | 525 arguments="$@" |
365 | 526 |
366 ### Shell Magic: Quote the quoted arguments in ARGUMENTS. At a later date, | 527 dnl Shell Magic: Quote the quoted arguments in ARGUMENTS. At a later date, |
367 ### in order to get the arguments back in $@, we have to do an | 528 dnl in order to get the arguments back in $@, we have to do an |
368 ### `eval set x "$quoted_arguments"; shift'. | 529 dnl 'eval set x "$quoted_arguments"; shift' |
369 ### We use sed to turn embedded ' into '"'"'. I truly hate sh's quoting. | 530 dnl # We use sed to turn embedded ' into '"'"'. I truly hate sh quoting. |
370 quoted_sed_magic=s/"'"/"'"'"'"'"'"'"'"/g | 531 quoted_sed_magic=s/"'"/"'"'"'"'"'"'"'"/g |
371 quoted_arguments= | 532 quoted_arguments= |
372 for i in "$@"; do | 533 for i in "$@"; do |
373 case "$i" in | 534 case "$i" in |
374 -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | 535 -no-create | --no-create | --no-creat | --no-crea | --no-cre \ |
379 quoted_i="`echo $i | sed $quoted_sed_magic`" | 540 quoted_i="`echo $i | sed $quoted_sed_magic`" |
380 quoted_arguments="$quoted_arguments '$quoted_i'" ;; | 541 quoted_arguments="$quoted_arguments '$quoted_i'" ;; |
381 esac | 542 esac |
382 done | 543 done |
383 | 544 |
384 ### Don't use shift -- that destroys the argument list, which autoconf needs | 545 dnl Do not use shift -- that destroys the argument list, which autoconf needs |
385 ### to produce config.status. It turns out that "set - ${arguments}" doesn't | 546 dnl to produce config.status. It turns out that "set - $arguments" does not |
386 ### work portably. | 547 dnl work portably. |
387 ### However, it also turns out that many shells cannot expand ${10} at all. | 548 dnl However, it also turns out that many shells cannot expand ${10} at all. |
388 ### So using an index variable doesn't work either. It is possible to use | 549 dnl So using an index variable does not work either. It is possible to use |
389 ### some shell magic to make 'set x "$arguments"; shift' work portably. | 550 dnl some shell magic to make 'set x "$arguments"; shift' work portably. |
390 while test $# != 0; do | 551 while test $# != 0; do |
391 arg="$1"; shift | 552 arg="$1"; shift |
392 case "${arg}" in | 553 case "$arg" in |
393 | 554 |
394 ## Anything starting with a hyphen we assume is an option. | 555 dnl Anything starting with a hyphen we assume is an option. |
395 -* ) | 556 -* ) |
396 ## Separate the switch name from the value it's being given. | 557 dnl Separate the switch name from the value it is being given. |
397 case "${arg}" in | 558 case "$arg" in |
398 -*=*) | 559 -*=*) |
399 opt=`echo '' ${arg} | sed -e 's:^ ::' -e 's:^-*\([[^=]]*\)=.*$:\1:'` | 560 opt=`echo '' $arg | sed -e 's:^ ::' -e 's:^-*\([[^=]]*\)=.*$:\1:'` |
400 val=`echo '' ${arg} | sed -e 's:^ ::' -e 's:^-*[[^=]]*=\(.*\)$:\1:'` | 561 val=`echo '' $arg | sed -e 's:^ ::' -e 's:^-*[[^=]]*=\(.*\)$:\1:'` |
401 valomitted=no | 562 valomitted=no |
402 ;; | 563 ;; |
403 # ## special case these strings since echo may | 564 dnl special case these strings since echo may silently eat them: |
404 # ## silently eat them. | 565 dnl --help ) opt=help val=yes valomitted=yes ;; |
405 # --help ) opt=help val=yes valomitted=yes ;; | 566 dnl --version ) opt=version val=yes valomitted=yes ;; |
406 # --version ) opt=version val=yes valomitted=yes ;; | 567 dnl -e ) opt=e val=yes valomitted=yes ;; |
407 # -e ) opt=e val=yes valomitted=yes ;; | 568 dnl -E ) opt=E val=yes valomitted=yes ;; |
408 # -E ) opt=E val=yes valomitted=yes ;; | 569 dnl -n ) opt=n val=yes valomitted=yes ;; |
409 # -n ) opt=n val=yes valomitted=yes ;; | |
410 -*) | 570 -*) |
411 ## If FOO is a boolean argument, --FOO is equivalent to | 571 dnl If FOO is a boolean argument, --FOO is equivalent to |
412 ## --FOO=yes. Otherwise, the value comes from the next | 572 dnl --FOO=yes. Otherwise, the value comes from the next |
413 ## argument - see below. | 573 dnl argument - see below. |
414 opt=`echo '' ${arg} | sed -e 's:^ ::' -e 's:^-*\(.*\)$:\1:'` | 574 opt=`echo '' $arg | sed -e 's:^ ::' -e 's:^-*\(.*\)$:\1:'` |
415 val="yes" | 575 val="yes" |
416 valomitted=yes | 576 valomitted=yes |
417 ;; | 577 ;; |
418 esac | 578 esac |
419 | 579 |
420 ## Change `-' in the option name to `_'. | 580 dnl translate "-" in option string to "_" |
421 optname="${opt}" | 581 optname="$opt" |
422 opt="`echo '' ${opt} | sed -e 's:^ ::' | tr - _`" | 582 opt="`echo '' $opt | sed -e 's:^ ::' | tr - _`" |
423 | 583 |
424 ## Process the option. | 584 dnl Process the option. |
425 case "${opt}" in | 585 case "$opt" in |
426 | 586 |
427 ## Process (many) boolean options | 587 dnl Process (many) boolean options |
428 run_in_place | \ | 588 run_in_place | \ |
429 with_x | \ | 589 with_x | \ |
430 with_x11 | \ | 590 with_x11 | \ |
431 with_gcc | \ | 591 with_gcc | \ |
432 with_lcc | \ | |
433 with_gnu_make | \ | 592 with_gnu_make | \ |
434 dynamic | \ | 593 dynamic | \ |
594 with_ncurses | \ | |
595 with_dnet | \ | |
435 with_term | \ | 596 with_term | \ |
597 with_socks | \ | |
436 with_cde | \ | 598 with_cde | \ |
437 with_offix | \ | 599 with_offix | \ |
600 with_gpm | \ | |
601 with_gif | \ | |
438 with_xpm | \ | 602 with_xpm | \ |
439 with_gif | \ | 603 with_xface | \ |
440 with_jpeg | \ | 604 with_jpeg | \ |
605 with_png | \ | |
441 with_tiff | \ | 606 with_tiff | \ |
442 with_socks | \ | |
443 with_xface | \ | |
444 with_xmu | \ | 607 with_xmu | \ |
445 quantify | \ | 608 with_quantify | \ |
446 with_toolbars | \ | 609 with_toolbars | \ |
447 with_tty | \ | 610 with_tty | \ |
448 with_i18n3 | \ | 611 with_i18n3 | \ |
449 with_mule | \ | 612 with_mule | \ |
450 with_canna | \ | 613 with_canna | \ |
451 with_wnn | \ | 614 with_wnn | \ |
452 with_wnn6 | \ | 615 with_wnn6 | \ |
453 with_mocklisp | \ | 616 with_mocklisp | \ |
454 with_energize | \ | 617 with_energize | \ |
618 with_workshop | \ | |
455 with_sparcworks | \ | 619 with_sparcworks | \ |
456 with_tooltalk | \ | 620 with_tooltalk | \ |
457 with_pop | \ | 621 with_pop | \ |
458 with_kerberos | \ | 622 with_kerberos | \ |
459 with_hesiod | \ | 623 with_hesiod | \ |
465 usage_tracking | \ | 629 usage_tracking | \ |
466 use_union_type | \ | 630 use_union_type | \ |
467 debug | \ | 631 debug | \ |
468 use_assertions | \ | 632 use_assertions | \ |
469 memory_usage_stats | \ | 633 memory_usage_stats | \ |
470 no_doc_file ) | 634 no_doc_file ) |
471 ## Make sure the value given was either "yes" or "no". | 635 dnl Make sure the value given was either "yes" or "no". |
472 case "${val}" in | 636 case "$val" in |
473 y | ye | yes ) val=yes ;; | 637 y | ye | yes ) val=yes ;; |
474 n | no ) val=no ;; | 638 n | no ) val=no ;; |
475 * ) USAGE_ERROR("The \`--${optname}' option requires a boolean value: \`yes' or \`no'.") ;; | 639 * ) USAGE_ERROR("The \`--$optname' option requires a boolean value: \`yes' or \`no'.") ;; |
476 esac | 640 esac |
477 eval "${opt}=\"${val}\"" ;; | 641 eval "$opt=\"$val\"" ;; |
478 | 642 |
479 | 643 |
480 ## Options that take a user-supplied value, as in --puresize=8000000 | 644 dnl Options that take a user-supplied value, as in --puresize=8000000 |
481 srcdir | \ | 645 srcdir | \ |
482 compiler | \ | 646 compiler | \ |
483 puresize | \ | 647 puresize | \ |
484 native_sound_lib | \ | 648 native_sound_lib | \ |
485 x_includes | \ | 649 x_includes | \ |
486 x_libraries | \ | 650 x_libraries | \ |
487 wnn_includes | \ | |
488 wnn_libraries | \ | |
489 canna_includes | \ | |
490 canna_libraries | \ | |
491 site_includes | \ | 651 site_includes | \ |
492 site_libraries | \ | 652 site_libraries | \ |
493 site_runtime_libraries ) | 653 site_runtime_libraries ) |
494 ## If the value was omitted, get it from the next argument. | 654 dnl If the value was omitted, get it from the next argument. |
495 if test "${valomitted}" = "yes" ; then | 655 if test "$valomitted" = "yes" ; then |
496 ## Get the next argument from the argument list, if there is one. | 656 dnl Get the next argument from the argument list, if there is one. |
497 if test "$#" = 0 ; then | 657 if test "$#" = 0 ; then |
498 USAGE_ERROR("The \`--${optname}' option requires a value."); | 658 USAGE_ERROR("The \`--$optname' option requires a value."); |
499 fi | 659 fi |
500 val="$1"; shift | 660 val="$1"; shift |
501 fi | 661 fi |
502 eval "${opt}=\"${val}\"" | 662 eval "$opt=\"$val\"" |
503 ;; | 663 ;; |
504 | 664 |
505 ### Options that take "yes", "no", or "default" values | 665 dnl Options that take "yes", "no", or "default" values |
506 rel_alloc | \ | 666 rel_alloc | \ |
507 use_system_malloc ) | 667 use_system_malloc ) |
508 case "${val}" in | 668 case "$val" in |
509 y | ye | yes ) val=yes ;; | 669 y | ye | yes ) val=yes ;; |
510 n | no ) val=no ;; | 670 n | no ) val=no ;; |
511 d | de | def | defa | defau | defaul | default ) | 671 d | de | def | defa | defau | defaul | default ) |
512 val=default ;; | 672 val=default ;; |
513 * ) USAGE_ERROR(["The \`--${optname}' option requires one of these values: | 673 * ) USAGE_ERROR(["The \`--$optname' option requires one of these values: |
514 \`yes', \`no', or \`default'."]) ;; | 674 \`yes', \`no', or \`default'."]) ;; |
515 esac | 675 esac |
516 eval "${opt}=\"${val}\"" | 676 eval "$opt=\"$val\"" |
517 ;; | 677 ;; |
518 | 678 |
519 ## Has the user requested database support? | 679 dnl Has the user requested database support? |
520 "with_database" ) | 680 "with_database" ) |
521 with_database_berkdb=no | 681 with_database_berkdb=no |
522 with_database_dbm=no | 682 with_database_dbm=no |
523 with_database_gnudbm=no | 683 with_database_gnudbm=no |
524 ## Make sure the value given was `no' or a list of berkdb, dbm, gnudbm | 684 for x in `echo "$val" | sed 's/,/ /'` ; do |
525 for x in `echo "${val}" | sed 's/,/ /'` ; do | 685 case "$x" in |
526 case "${x}" in | |
527 no ) : ;; | 686 no ) : ;; |
528 b | be | ber | berk | berkd | berkdb ) with_database_berkdb=yes ;; | 687 b | be | ber | berk | berkd | berkdb ) with_database_berkdb=yes ;; |
529 d | db | dbm ) with_database_dbm=yes ;; | 688 d | db | dbm ) with_database_dbm=yes ;; |
530 g | gn | gnu | gnud | gnudb | gnudbm ) with_database_gnudbm=yes ;; | 689 g | gn | gnu | gnud | gnudb | gnudbm ) with_database_gnudbm=yes ;; |
531 * ) USAGE_ERROR(["The \`--${optname}' option value | 690 * ) USAGE_ERROR(["The \`--$optname' option value |
532 must be either \`no' or a comma-separated list | 691 must be either \`no' or a comma-separated list |
533 of one or more of \`berkdb', \`dbm', or \`gnudbm'."]) ;; | 692 of one or more of \`berkdb', \`dbm', or \`gnudbm'."]) ;; |
534 esac | 693 esac |
535 done | 694 done |
536 if test "${with_database_dbm}" = "yes" -a \ | 695 if test "$with_database_dbm" = "yes" -a \ |
537 "${with_database_gnudbm}" = "yes" ; then | 696 "$with_database_gnudbm" = "yes" ; then |
538 USAGE_ERROR("Only one of \`dbm' and \`gnudbm' may be specified | 697 USAGE_ERROR("Only one of \`dbm' and \`gnudbm' may be specified |
539 with the \`--${optname}' option.") | 698 with the \`--$optname' option.") |
540 fi | 699 fi |
541 ;; | 700 ;; |
542 | 701 |
543 ## Has the user requested sound support? | 702 dnl Has the user requested sound support? |
544 "with_sound" ) | 703 "with_sound" ) |
545 ## value can be native, nas or both. yes is allowed | 704 dnl value can be native, nas or both. yes is allowed |
546 ## as a backwards compatible synonym for native | 705 dnl as a backwards compatible synonym for native |
547 case "${val}" in | 706 case "$val" in |
548 y | ye | yes ) val=native ;; | 707 y | ye | yes ) val=native ;; |
549 n | no | non | none ) val=no;; | 708 n | no | non | none ) val=no;; |
550 na | nat | nati | nativ | native ) val=native ;; | 709 na | nat | nati | nativ | native ) val=native ;; |
551 ne | net | neta | netau | netaud | netaudi | netaudio | nas ) val=nas ;; | 710 ne | net | neta | netau | netaud | netaudi | netaudio | nas ) val=nas ;; |
552 b | bo | bot | both ) val=both;; | 711 b | bo | bot | both ) val=both;; |
553 * ) USAGE_ERROR(["The \`--${optname}' option must have one of these values: | 712 * ) USAGE_ERROR(["The \`--$optname' option must have one of these values: |
554 \`native', \`nas', \`both', or \`none'."]) ;; | 713 \`native', \`nas', \`both', or \`none'."]) ;; |
555 esac | 714 esac |
556 eval "${opt}=\"${val}\"" | 715 eval "$opt=\"$val\"" |
557 ;; | 716 ;; |
558 | 717 |
559 ## Has the user requested XIM support? | 718 dnl Has the user requested XIM support? |
560 "with_xim" ) | 719 "with_xim" ) |
561 ## value can be xlib or motif | 720 case "$val" in |
562 case "${val}" in | 721 y | ye | yes ) val=yes ;; |
563 y | ye | yes ) val=yes ;; | 722 n | no | non | none ) val=no ;; |
564 n | no | non | none ) val=no ;; | 723 x | xl | xli | xlib ) val=xlib ;; |
565 x | xl | xli | xlib ) val=xlib ;; | 724 m | mo | mot | moti | motif ) val=motif ;; |
566 m | mo | mot | moti | motif ) val=motif ;; | 725 * ) USAGE_ERROR(["The \`--$optname' option must have one of these values: |
567 * ) USAGE_ERROR(["The \`--${optname}' option must have one of these values: | |
568 \`motif', \`xlib', \`yes', or \`no'."]) ;; | 726 \`motif', \`xlib', \`yes', or \`no'."]) ;; |
569 esac | 727 esac |
570 eval "${opt}=\"${val}\"" | 728 eval "$opt=\"$val\"" |
571 ;; | 729 ;; |
572 | 730 |
573 ## Has the user requested PNG support? | 731 dnl Mail locking specification |
574 "with_png" ) | 732 "mail_locking" ) |
575 ## Make sure the value given was either "yes", "no", or "gnuz". | 733 case "$val" in |
576 case "${val}" in | 734 lockf ) val=lockf ;; |
577 y | ye | yes ) val=yes ;; | 735 flock ) val=flock ;; |
578 n | no ) val=no ;; | 736 file ) val=file ;; |
579 g | gn | gnu | gnuz ) val=gnuz ;; | 737 * ) USAGE_ERROR(["The \`--$optname' option must have one of these values: |
580 * ) USAGE_ERROR(["The \`--${optname}' option must have one of these values: | 738 \`lockf', \`flock', or \`file'."]) ;; |
581 \`yes', \`no', or \`gnuz'."]) ;; | |
582 esac | 739 esac |
583 eval "${opt}=\"${val}\"" | 740 eval "$opt=\"$val\"" |
584 ;; | 741 ;; |
585 | 742 |
586 ## Has the user requested error-checking? | 743 dnl Has the user requested error-checking? |
587 "error_checking" ) | 744 "error_checking" ) |
588 ## value can be all, none, and/or a list of categories to check. | 745 dnl value can be all, none, and/or a list of categories to check. |
589 ## Example: --error-checking=all,noextents,nobufpos | 746 dnl Example: --error-checking=all,noextents,nobufpos |
590 ## Example: --error-checking=none,malloc,gc | 747 dnl Example: --error-checking=none,malloc,gc |
591 | 748 |
592 for x in `echo "${val}" | sed 's/,/ /'` ; do | 749 for x in `echo "$val" | sed 's/,/ /'` ; do |
593 case "${x}" in | 750 case "$x" in |
594 # all and none are only permitted as the first in the list. | 751 dnl all and none are only permitted as the first in the list. |
595 n | no | non | none ) new_default=no ;; | 752 n | no | non | none ) new_default=no ;; |
596 a | al | all ) new_default=yes ;; | 753 a | al | all ) new_default=yes ;; |
597 | 754 |
598 extents ) error_check_extents=yes ;; | 755 extents ) error_check_extents=yes ;; |
599 noextents ) error_check_extents=no ;; | 756 noextents ) error_check_extents=no ;; |
607 gc ) error_check_gc=yes ;; | 764 gc ) error_check_gc=yes ;; |
608 nogc ) error_check_gc=no ;; | 765 nogc ) error_check_gc=no ;; |
609 | 766 |
610 malloc ) error_check_malloc=yes ;; | 767 malloc ) error_check_malloc=yes ;; |
611 nomalloc ) error_check_malloc=no ;; | 768 nomalloc ) error_check_malloc=no ;; |
612 | 769 |
613 * ) bogus_error_check=yes ;; | 770 * ) bogus_error_check=yes ;; |
614 esac | 771 esac |
615 if test "$bogus_error_check" -o \ | 772 if test "$bogus_error_check" -o \ |
616 \( -n "$new_default" -a -n "$echeck_notfirst" \) ; then | 773 \( -n "$new_default" -a -n "$echeck_notfirst" \) ; then |
617 if test $error_check_default = yes ; then | 774 if test $error_check_default = yes ; then |
618 types="\`all' (default), \`none', \`noextents', \`notypecheck', \`nobufpos', \`nogc', and \`nomalloc'." | 775 types="\`all' (default), \`none', \`noextents', \`notypecheck', \`nobufpos', \`nogc', and \`nomalloc'." |
619 else | 776 else |
620 types="\`all', \`none' (default), \`extents', \`typecheck', \`bufpos', \`gc', and \`malloc'." | 777 types="\`all', \`none' (default), \`extents', \`typecheck', \`bufpos', \`gc', and \`malloc'." |
621 fi | 778 fi |
622 USAGE_ERROR(["Valid types for the \`--${optname}' option are: | 779 USAGE_ERROR(["Valid types for the \`--$optname' option are: |
623 $types."]) | 780 $types."]) |
624 elif test "$new_default" ; then | 781 elif test "$new_default" ; then |
625 error_check_extents=$new_default | 782 error_check_extents=$new_default |
626 error_check_typecheck=$new_default | 783 error_check_typecheck=$new_default |
627 error_check_bufpos=$new_default | 784 error_check_bufpos=$new_default |
631 fi | 788 fi |
632 echeck_notfirst=true | 789 echeck_notfirst=true |
633 done | 790 done |
634 ;; | 791 ;; |
635 | 792 |
636 ## Has the user tried to tell us where the X files are? | 793 dnl Has the user tried to tell us where the X files are? |
637 ## I think these are dopey, but no less than three alpha | 794 dnl I think these are dopey, but no less than three alpha |
638 ## testers, at large sites, have said they have their X files | 795 dnl testers, at large sites, have said they have their X files |
639 ## installed in odd places. | 796 dnl installed in odd places. |
640 | 797 |
641 ## Has the user specified one of the path options? | 798 dnl Has the user specified one of the path options? |
642 prefix | exec_prefix | bindir | datadir | statedir | libdir | \ | 799 prefix | exec_prefix | bindir | datadir | statedir | libdir | \ |
643 mandir | infodir | lispdir | etcdir | lockdir | archlibdir | \ | 800 mandir | infodir | lispdir | etcdir | lockdir | archlibdir | \ |
644 sitelispdir | docdir ) | 801 sitelispdir | docdir ) |
645 ## If the value was omitted, get it from the next argument. | 802 dnl If the value was omitted, get it from the next argument. |
646 if test "${valomitted}" = "yes" ; then | 803 if test "$valomitted" = "yes" ; then |
647 if test "$#" = 0 ; then | 804 if test "$#" = 0 ; then |
648 USAGE_ERROR("The \`--${optname}' option requires a value."); | 805 USAGE_ERROR("The \`--$optname' option requires a value."); |
649 fi | 806 fi |
650 val="$1"; shift | 807 val="$1"; shift |
651 fi | 808 fi |
652 eval "${opt}=\"${val}\"" | 809 eval "$opt=\"$val\"" |
653 | 810 |
654 ## Changing exec_prefix or libdir will change the default value | 811 dnl Changing exec_prefix or libdir will change the default value |
655 ## of archlibdir. Changing datadir will change the default value | 812 dnl of archlibdir. Changing datadir will change the default value |
656 ## of etcdir and lispdir. Changing statedir will change the | 813 dnl of etcdir and lispdir. Changing statedir will change the |
657 ## default value of lockdir. | 814 dnl default value of lockdir. |
658 if test "${opt}" = exec_prefix; then archlibdir_user_defined=yes | 815 case "$opt" in |
659 elif test "${opt}" = libdir ; then archlibdir_user_defined=yes | 816 lispdir ) lispdir_user_defined=yes ;; |
660 elif test "${opt}" = archlibdir ; then archlibdir_user_defined=yes | 817 etcdir ) etcdir_user_defined=yes ;; |
661 elif test "${opt}" = lispdir ; then lispdir_user_defined=yes | 818 infodir ) infodir_user_defined=yes ;; |
662 elif test "${opt}" = etcdir ; then etcdir_user_defined=yes | 819 datadir ) lispdir_user_defined=yes etcdir_user_defined=yes ;; |
663 elif test "${opt}" = datadir ; then | 820 statedir | lockdir ) lockdir_user_defined=yes ;; |
664 lispdir_user_defined=yes | 821 exec_prefix | libdir | archlibdir ) archlibdir_user_defined=yes ;; |
665 etcdir_user_defined=yes | 822 esac |
666 elif test "${opt}" = statedir ; then lockdir_user_defined=yes | |
667 elif test "${opt}" = lockdir ; then lockdir_user_defined=yes | |
668 elif test "${opt}" = infodir ; then infodir_user_defined=yes | |
669 fi | |
670 ;; | 823 ;; |
671 | 824 |
672 ## Has the user specified values to override CFLAGS? | 825 dnl Has the user specified values to override CFLAGS? |
673 cflags ) | 826 cflags ) |
674 ## If the value was omitted, get it from the next argument. | 827 dnl If the value was omitted, get it from the next argument. |
675 if test "${valomitted}" = "yes" ; then | 828 if test "$valomitted" = "yes" ; then |
676 if test "$#" = 0 ; then | 829 if test "$#" = 0; then |
677 USAGE_ERROR("The \`--${optname}' option requires a value."); | 830 USAGE_ERROR("The \`--$optname' option requires a value."); |
678 fi | 831 fi |
679 val="$1"; shift | 832 val="$1"; shift |
680 fi | 833 fi |
681 eval "${opt}=\"${val}\"" | 834 eval "$opt=\"$val\"" |
682 eval "${opt}_specified=1" | 835 eval "${opt}_specified=1" |
683 ;; | 836 ;; |
684 | 837 |
685 ## --no-create added by autoconf for use by config.status | 838 dnl --no-create added by autoconf for use by config.status |
686 "no_create" ) | 839 "no_create" ) ;; |
687 ;; | 840 |
688 | 841 dnl Has the user asked for some help? |
689 ## Has the user asked for some help? | 842 "usage" | "help" ) echo "$usage" | ${PAGER-more}; exit 0 ;; |
690 "usage" | "help" ) | 843 |
691 echo "${short_usage}" | ${PAGER:-more} | 844 dnl Has the user specified what toolkit to use for the menubars, |
692 exit 0 | 845 dnl scrollbar or dialogs? |
693 ;; | |
694 | |
695 ## Has the user specified what toolkit to use for the menubars, | |
696 ## scrollbar or dialogs? | |
697 "with_menubars" | "with_scrollbars" | "with_dialogs" ) | 846 "with_menubars" | "with_scrollbars" | "with_dialogs" ) |
698 ## value can be lucid, motif, or athena. | 847 case "$val" in |
699 case "${val}" in | |
700 l | lu | luc | luci | lucid ) val=lucid ;; | 848 l | lu | luc | luci | lucid ) val=lucid ;; |
701 m | mo | mot | moti | motif ) val=motif ;; | 849 m | mo | mot | moti | motif ) val=motif ;; |
702 athena3d | athena-3d ) val=athena3d ;; | 850 athena3d | athena-3d ) val=athena3d ;; |
703 a | at | ath | athe | athen | athena ) val=athena ;; | 851 a | at | ath | athe | athen | athena ) val=athena ;; |
704 n | no | non | none ) val=no ;; | 852 n | no | non | none ) val=no ;; |
705 * ) USAGE_ERROR(["The \`--${optname}' option must have one of these values: | 853 * ) USAGE_ERROR(["The \`--$optname' option must have one of these values: |
706 \`lucid', \`motif', \`athena', or \`no'."]) ;; | 854 \`lucid', \`motif', \`athena', \`athena3d', or \`no'."]) ;; |
707 esac | 855 esac |
708 eval "${opt}=\"${val}\"" | 856 eval "$opt=\"$val\"" |
709 ;; | 857 ;; |
710 | 858 |
711 ## Fail on unrecognized arguments. | 859 dnl Fail on unrecognized arguments. |
712 * ) USAGE_ERROR("Unrecognized option: ${arg}") ;; | 860 * ) USAGE_ERROR("Unrecognized option: $arg") ;; |
713 | 861 |
714 esac | 862 esac |
715 ;; | 863 ;; |
716 | 864 |
717 ## Anything not starting with a hyphen we assume is a | 865 dnl Anything not starting with a hyphen we assume is a |
718 ## configuration name. | 866 dnl configuration name. |
719 *) | 867 *) configuration="$arg" ;; |
720 configuration=${arg} | |
721 ;; | |
722 | 868 |
723 esac | 869 esac |
724 done | 870 done |
725 | 871 |
726 ############################################################################ | 872 dnl ------------------------- |
727 # # | 873 dnl Finish options processing |
728 # Finish options processing # | 874 dnl ------------------------- |
729 # # | 875 |
730 ############################################################################ | 876 dnl Get the arguments back. See the diatribe on Shell Magic above. |
731 | |
732 ### Get the arguments back. See the diatribe on Shell Magic above. | |
733 eval set x "$quoted_arguments"; shift | 877 eval set x "$quoted_arguments"; shift |
734 | 878 |
735 ### Argument interdependencies | 879 dnl Argument interdependencies |
736 if test "${with_energize}" = "yes" ; then | 880 if test "$with_energize" = "yes" ; then |
737 with_menubars="lucid" | 881 with_menubars=lucid with_scrollbars=motif with_dialogs=motif with_tooltalk=yes |
738 with_scrollbars="motif" | 882 MAKE_SUBDIR="$MAKE_SUBDIR lwlib/energize" |
739 with_dialogs="motif" | 883 fi |
740 with_tooltalk="yes" | 884 |
741 internal_makefile_list="$internal_makefile_list lwlib/energize/Makefile.in" | 885 dnl --extra-verbose implies --verbose |
742 fi | 886 test "$extra_verbose" = "yes" && verbose=yes |
743 | 887 |
744 ### --extra-verbose implies --verbose | 888 dnl Sun Development environment support |
745 test "${extra_verbose}" = yes && verbose=yes | 889 test "$with_sparcworks" = "yes" && with_workshop=yes # compatibility alias |
746 | 890 if test "$with_workshop" = "yes"; then |
747 ### Sparcworks requires tooltalk | 891 AC_DEFINE(SUNPRO) |
748 test "${with_sparcworks}" = yes && with_tooltalk=yes | 892 extra_objs="$extra_objs sunpro.o" |
749 | 893 with_tooltalk=yes |
750 ### debug implies other options | 894 fi |
751 test "${debug}" = "yes" && use_assertions=yes memory_usage_stats=yes | 895 |
752 | 896 dnl Allow use of either ":" or spaces for lists of directories |
753 ### with_x is a synonym for with_x11 | 897 define(COLON_TO_SPACE, |
754 test -n "${with_x}" && with_x11="${with_x}" | 898 [case "[$1]" in *:* [)] [$1]="`echo $[$1] | sed 's/:/ /g'`";; esac])dnl |
755 | 899 COLON_TO_SPACE(site_includes) |
756 ### Can't specify 2 compilers | 900 COLON_TO_SPACE(site_libraries) |
757 if test "${with_gcc}" = "yes" -a "${with_lcc}" = "yes"; then | 901 COLON_TO_SPACE(site_runtime_libraries) |
758 USAGE_ERROR("Only one of --with-gcc and --with-lcc may be specified.") | 902 |
759 fi | 903 dnl debug implies other options |
760 | 904 if test "$debug" = "yes"; then |
761 ### Ignore useless run-in-place flag | 905 use_assertions=yes memory_usage_stats=yes |
762 if test "${run_in_place}" = "yes"; then | 906 extra_objs="$extra_objs debug.o" |
763 AC_WARN(The --run-in-place option is ignored because it is unnecessary.) | 907 fi |
764 fi | 908 |
765 | 909 dnl with_x is obsolete synonym for with_x11 |
766 ########################################################################### | 910 test -n "$with_x" && with_x11="$with_x" |
767 if test "${configuration}" = "" ; then | 911 |
912 dnl# Ignore useless run-in-place flag | |
913 if test "$run_in_place" = "yes"; then | |
914 AC_MSG_WARN("The --run-in-place option is ignored because it is unnecessary.") | |
915 fi | |
916 | |
917 dnl ########################################################################### | |
918 if test "$configuration" = "" ; then | |
768 echo '- You did not tell me what kind of host system you want to configure. | 919 echo '- You did not tell me what kind of host system you want to configure. |
769 - I will attempt to guess the kind of system this is.' 1>&2 | 920 - I will attempt to guess the kind of system this is.' 1>&2 |
770 guesssys=`echo ${progname} | sed 's/configure$/config.guess/'` | 921 guesssys=`echo $progname | sed 's/configure$/config.guess/'` |
771 if configuration=`${CONFIG_SHELL-/bin/sh} ${guesssys}` ; then | 922 dnl Guess the configuration and remove 4th name component, if present. |
772 echo "- Looks like this is a ${configuration}" 1>&2 | 923 if configuration=`${CONFIG_SHELL-/bin/sh} $guesssys | \ |
924 sed '[s/^\([^-][^-]*-[^-][^-]*-[^-][^-]*\)-.*$/\1/]'` ; then | |
925 echo "- Looks like this is a $configuration" 1>&2 | |
773 else | 926 else |
774 USAGE_ERROR("Failed to guess the system type. You need to tell me.") | 927 USAGE_ERROR("Failed to guess the system type. You need to tell me.") |
775 fi | 928 fi |
776 fi | 929 fi |
777 | 930 |
778 ### Find the source directory. | 931 dnl Find the source directory. |
779 case "${srcdir}" in | 932 case "$srcdir" in |
780 | 933 |
781 ## If it's not specified, see if `.' or `..' might work. | 934 dnl If srcdir is not specified, see if "." or ".." might work. |
782 "" ) | 935 "" ) |
783 for dir in "`echo $0 | sed 's|//|/|' | sed 's|/[[^/]]*$||'`" "." ".." ; do | 936 for dir in "`echo $0 | sed 's|//|/|' | sed 's|/[[^/]]*$||'`" "." ".." ; do |
784 if test -f "$dir/src/lisp.h" -a \ | 937 if test -f "$dir/src/lisp.h" -a \ |
785 -f "$dir/lisp/version.el" ; then | 938 -f "$dir/lisp/version.el" ; then |
786 srcdir="${dir}" | 939 srcdir="$dir" |
787 break | 940 break |
788 fi | 941 fi |
789 done | 942 done |
790 if test -z "${srcdir}" ; then | 943 if test -z "$srcdir" ; then |
791 USAGE_ERROR(["Neither the current directory nor its parent seem to | 944 USAGE_ERROR(["Neither the current directory nor its parent seem to |
792 contain the XEmacs sources. If you do not want to build XEmacs in its | 945 contain the XEmacs sources. If you do not want to build XEmacs in its |
793 source tree, you should run \`${progname}' in the directory in which | 946 source tree, you should run \`$progname' in the directory in which |
794 you wish to build XEmacs, using the \`--srcdir' option to say where the | 947 you wish to build XEmacs, using the \`--srcdir' option to say where the |
795 sources may be found."]) | 948 sources may be found."]) |
796 fi | 949 fi |
797 ;; | 950 ;; |
798 | 951 |
799 ## Otherwise, check if the directory they specified is okay. | 952 dnl Otherwise, check if the directory they specified is okay. |
800 * ) | 953 * ) |
801 if test ! -d "${srcdir}" -o \ | 954 if test ! -d "$srcdir" -o \ |
802 ! -f "${srcdir}/src/lisp.h" -o \ | 955 ! -f "$srcdir/src/lisp.h" -o \ |
803 ! -f "${srcdir}/lisp/version.el" ; then | 956 ! -f "$srcdir/lisp/version.el" ; then |
804 USAGE_ERROR(["The directory specified with the \`--srcdir' option, | 957 USAGE_ERROR(["The directory specified with the \`--srcdir' option, |
805 \`${srcdir}', doesn't seem to contain the XEmacs sources. You should | 958 \`$srcdir', doesn't seem to contain the XEmacs sources. You should |
806 either run the \`${progname}' script at the top of the XEmacs source | 959 either run the \`$progname' script at the top of the XEmacs source |
807 tree, or use the \`--srcdir' option to specify the XEmacs source directory."]) | 960 tree, or use the \`--srcdir' option to specify the XEmacs source directory."]) |
808 fi | 961 fi |
809 ;; | 962 ;; |
810 esac | 963 esac |
811 | 964 |
812 ## We check for this now instead of later when we check for other | 965 AC_PROG_LN_S |
813 ## programs because we need to use its return value now. | 966 |
814 AC_LN_S | 967 dnl Make symlinks for etc, lisp, and info directories while the path |
815 | 968 dnl is still relative. We do not symlink lock because someone may |
816 AC_VERBOSE("setting LN_S to ${LN_S}") | 969 dnl have stuck the source on a read-only partition. Instead we |
817 | 970 dnl create it as an actual directory later on if it does not already |
818 #### Make symlinks for etc, lisp, and info directories while the path | 971 dnl exist. |
819 #### is still relative. We don't symlink lock because someone may | |
820 #### have stuck the source on a read-only partition. Instead we'll | |
821 #### create it as an actual directory later on if it doesn't already | |
822 #### exist. | |
823 for dir in lisp etc man info site-lisp | 972 for dir in lisp etc man info site-lisp |
824 do | 973 do |
825 if test ! -d $dir ; then | 974 if test ! -d "$dir" ; then |
826 echo Making symbolic link to ${srcdir}/$dir | 975 echo Making symbolic link to "$srcdir/$dir" |
827 ${LN_S} ${srcdir}/$dir . | 976 ${LN_S} "$srcdir/$dir" . |
828 fi | 977 fi |
829 done | 978 done |
830 | 979 |
831 #### Make srcdir absolute, if it isn't already. It's important to | 980 dnl Make srcdir absolute, if not already. It is important to |
832 #### avoid running the path through pwd unnecessary, since pwd can | 981 dnl avoid running the path through pwd unnecessary, since pwd can |
833 #### give you automounter prefixes, which can go away. | 982 dnl give you automounter prefixes, which can go away. |
834 case "${srcdir}" in | 983 case "$srcdir" in |
835 /* ) ;; | 984 /* ) ;; |
836 . ) | 985 . ) |
837 ## We may be able to use the $PWD environment variable to make this | 986 dnl We may be able to use the $PWD environment variable to make this |
838 ## absolute. But sometimes PWD is inaccurate. | 987 dnl absolute. But sometimes PWD is inaccurate. |
839 if test "${PWD}" != "" -a "`(cd ${PWD} ; sh -c pwd)`" = "`pwd`"; then | 988 if test "$PWD" != "" -a "`(cd $PWD ; sh -c pwd)`" = "`pwd`"; then |
840 srcdir="$PWD" | 989 srcdir="$PWD" |
841 else | 990 else |
842 srcdir="`(cd ${srcdir}; pwd)`" | 991 srcdir="`(cd $srcdir && pwd)`" |
843 fi | 992 fi |
844 ;; | 993 ;; |
845 * ) srcdir="`(cd ${srcdir}; pwd)`" ;; | 994 * ) srcdir="`(cd $srcdir && pwd)`" ;; |
846 esac | 995 esac |
847 | 996 |
848 #### Check if the source directory already has a configured system in it. | 997 dnl Check if the source directory already has a configured system in it. |
849 if test `pwd` != `sh -c cd ${srcdir} && pwd` \ | 998 if test `pwd` != `sh -c cd $srcdir && pwd` \ |
850 && test -f "${srcdir}/src/config.h"; then | 999 && test -f "$srcdir/src/config.h"; then |
851 (echo "${progname}: WARNING: The directory tree \`${srcdir}' is being used" | 1000 (echo "$progname: WARNING: The directory tree \`$srcdir' is being used" |
852 echo " as a build directory right now; it has been configured in its own" | 1001 echo " as a build directory right now; it has been configured in its own" |
853 echo " right. To configure in another directory as well, you MUST" | 1002 echo " right. To configure in another directory as well, you MUST" |
854 echo " use GNU make. If you do not have GNU make, then you must" | 1003 echo " use GNU make. If you do not have GNU make, then you must" |
855 echo " now do \`make distclean' in ${srcdir}," | 1004 echo " now do \`make distclean' in $srcdir," |
856 echo " and then run ${progname} again.") >&2 | 1005 echo " and then run $progname again.") >&2 |
857 extrasub='/^VPATH[[ ]]*=/c\ | 1006 extrasub='/^VPATH[[ ]]*=/c\ |
858 vpath %.c $(srcdir)\ | 1007 vpath %.c $(srcdir)\ |
859 vpath %.h $(srcdir)\ | 1008 vpath %.h $(srcdir)\ |
860 vpath %.y $(srcdir)\ | 1009 vpath %.y $(srcdir)\ |
861 vpath %.l $(srcdir)\ | 1010 vpath %.l $(srcdir)\ |
862 vpath %.s $(srcdir)\ | 1011 vpath %.s $(srcdir)\ |
863 vpath %.in $(srcdir)' | 1012 vpath %.in $(srcdir)' |
864 fi | 1013 fi |
865 | 1014 |
866 ### Make the necessary directories, if they don't exist. | 1015 dnl Make the necessary directories, if they do not exist. |
867 for dir in ./src ./lib-src ./dynodump ./lwlib ./lock ; do | 1016 for dir in ./src ./lib-src ./dynodump ./lwlib ./lock ; do |
868 if test ! -d ${dir} ; then | 1017 test ! -d "$dir" && mkdir "$dir" |
869 mkdir ${dir} | |
870 fi | |
871 done | 1018 done |
872 if test "${with_energize}" = "yes" -a ! -d ./lwlib/energize; then | 1019 if test "$with_energize" = "yes" -a ! -d ./lwlib/energize; then |
873 mkdir ./lwlib/energize | 1020 mkdir ./lwlib/energize |
874 fi | 1021 fi |
875 | 1022 |
876 ############################################################################ | 1023 dnl ------------------------------ |
877 # # | 1024 dnl Determine the s&m files to use |
878 # Determine the s&m files to use # | 1025 dnl ------------------------------ |
879 # # | 1026 dnl Given the configuration name, set machfile and opsysfile to the |
880 ############################################################################ | 1027 dnl names of the m/*.h and s/*.h files we should use. |
881 | 1028 |
882 #### Given the configuration name, set machfile and opsysfile to the | 1029 dnl Canonicalize the configuration name. |
883 #### names of the m/*.h and s/*.h files we should use. | 1030 AC_CHECKING("the configuration name") |
884 | 1031 dnl allow -energize or -workshop suffix on configuration name |
885 ### Canonicalize the configuration name. | 1032 internal_configuration=`echo $configuration | sed 's/-\(energize\|workshop\)//'` |
886 echo "checking the configuration name" | 1033 if canonical=`$srcdir/config.sub "$internal_configuration"` ; then : ; else |
887 # allow -energize prefix on configuration name | |
888 internal_configuration=`echo ${configuration} | sed 's/-energize//'` | |
889 # allow --sparcworks prefix on configuration name | |
890 internal_configuration=`echo ${configuration} | sed 's/-sparcworks//'` | |
891 if canonical=`${srcdir}/config.sub "${internal_configuration}"` ; then : ; else | |
892 exit $? | 1034 exit $? |
893 fi | 1035 fi |
894 | 1036 |
895 ### If you add support for a new configuration, add code to this | 1037 dnl If you add support for a new configuration, add code to this |
896 ### switch statement to recognize your configuration name and select | 1038 dnl switch statement to recognize your configuration name and select |
897 ### the appropriate operating system and machine description files. | 1039 dnl the appropriate operating system and machine description files. |
898 | 1040 |
899 ### You would hope that you could choose an m/*.h file pretty much | 1041 dnl You would hope that you could choose an m/*.h file pretty much |
900 ### based on the machine portion of the configuration name, and an s- | 1042 dnl based on the machine portion of the configuration name, and an s- |
901 ### file based on the operating system portion. However, it turns out | 1043 dnl file based on the operating system portion. However, it turns out |
902 ### that each m/*.h file is pretty manufacturer-specific - for | 1044 dnl that each m/*.h file is pretty manufacturer-specific - for |
903 ### example, apollo.h, hp9000s300.h, mega68k, news.h, and tad68k are | 1045 dnl example, apollo.h, hp9000s300.h, mega68k, news.h, and tad68k are |
904 ### all 68000 machines; mips.h, pmax.h, and news-risc are all MIPS | 1046 dnl all 68000 machines; mips.h, pmax.h, and news-risc are all MIPS |
905 ### machines. So we basically have to have a special case for each | 1047 dnl machines. So we basically have to have a special case for each |
906 ### configuration name. | 1048 dnl configuration name. |
907 ### | 1049 |
908 ### As far as handling version numbers on operating systems is | 1050 dnl As far as handling version numbers on operating systems is |
909 ### concerned, make sure things will fail in a fixable way. If | 1051 dnl concerned, make sure things will fail in a fixable way. If |
910 ### /etc/MACHINES doesn't say anything about version numbers, be | 1052 dnl /etc/MACHINES says nothing about version numbers, be |
911 ### prepared to handle anything reasonably. If version numbers | 1053 dnl prepared to handle anything reasonably. If version numbers |
912 ### matter, be sure /etc/MACHINES says something about it. | 1054 dnl matter, be sure /etc/MACHINES says something about it. |
913 ### | 1055 |
914 ### Eric Raymond says we should accept strings like "sysvr4" to mean | 1056 dnl Eric Raymond says we should accept strings like "sysvr4" to mean |
915 ### "System V Release 4"; he writes, "The old convention encouraged | 1057 dnl "System V Release 4"; he writes, "The old convention encouraged" |
916 ### confusion between `system' and `release' levels'." | 1058 dnl "confusion between `system' and `release' levels'." |
917 | 1059 |
918 machine='' opsys='' unported=no need_dynodump=no | 1060 machine='' opsys='' need_dynodump=no |
919 case "${canonical}" in | 1061 |
920 | 1062 dnl Straightforward machine determination |
921 ## NetBSD ports | 1063 case "$canonical" in |
1064 sparc-*-* ) machine=sparc ;; | |
1065 alpha-*-* ) machine=alpha ;; | |
1066 vax-*-* ) machine=vax ;; | |
1067 mips-dec-* ) machine=pmax ;; | |
1068 mips-sgi-* ) machine=iris4d ;; | |
1069 romp-ibm-* ) machine=ibmrt ;; | |
1070 rs6000-ibm-aix* ) machine=ibmrs6000 ;; | |
1071 powerpc-ibm-aix* ) machine=ibmrs6000 ;; | |
1072 powerpc-*-* ) machine=powerpc ;; | |
1073 hppa-*-* ) machine=hp800 ;; | |
1074 m88k-dg-* ) machine=aviion ;; | |
1075 m68*-sony-* ) machine=news ;; | |
1076 mips-sony-* ) machine=news-risc ;; | |
1077 clipper-* ) machine=clipper ;; | |
1078 esac | |
1079 | |
1080 dnl Straightforward OS determination | |
1081 case "$canonical" in | |
1082 *-*-linux* ) opsys=linux ;; | |
1083 *-*-netbsd* ) opsys=netbsd ;; | |
1084 *-*-nextstep* ) opsys=nextstep ;; | |
1085 *-*-vms ) opsys=vms ;; | |
1086 | |
1087 dnl DEC OSF | |
1088 *-dec-osf1.3 | *-dec-osf2* ) opsys=decosf1-3 ;; | |
1089 *-dec-osf1.2 | *-dec-osf1* ) opsys=decosf1-2 ;; | |
1090 *-dec-osf3.[[2-9]] ) opsys=decosf3-2 ;; | |
1091 *-dec-osf3* ) opsys=decosf3-1 ;; | |
1092 *-dec-osf4* ) opsys=decosf4-0 ;; | |
1093 | |
1094 dnl DEC Ultrix | |
1095 *-*-ultrix[[0-3]].* | *-*-ultrix4.0* ) opsys=bsd4-2 ;; | |
1096 *-*-ultrix4.[[12]]* ) opsys=bsd4-3 ;; | |
1097 *-*-ultrix* ) opsys=ultrix4-3 ;; | |
1098 | |
1099 dnl AIX | |
1100 *-*-aix3.1* ) opsys=aix3-1 ;; | |
1101 *-*-aix3.2.5 ) opsys=aix3-2-5 ;; | |
1102 *-*-aix3* ) opsys=aix3-2 ;; | |
1103 *-*-aix4.2* ) opsys=aix4-2 ;; | |
1104 *-*-aix4.1* ) opsys=aix4-1 ;; | |
1105 *-*-aix4* ) opsys=aix4 ;; | |
1106 | |
1107 dnl Other generic OSes | |
1108 *-gnu* ) opsys=gnu ;; | |
1109 *-*-bsd4.[[01]] ) opsys=bsd4-1 ;; | |
1110 *-*-bsd4.2 ) opsys=bsd4-2 ;; | |
1111 *-*-bsd4.3 ) opsys=bsd4-3 ;; | |
1112 *-*-aos4.2 ) opsys=bsd4-2 ;; | |
1113 *-*-aos* ) opsys=bsd4-3 ;; | |
1114 *-*-sysv0 | *-*-sysvr0 ) opsys=usg5-0 ;; | |
1115 *-*-sysv2 | *-*-sysvr2 ) opsys=usg5-2 ;; | |
1116 *-*-sysv2.2 | *-*-sysvr2.2 ) opsys=usg5-2-2 ;; | |
1117 *-*-sysv3* | *-*-sysvr3* ) opsys=usg5-3 ;; | |
1118 *-*-sysv4.1* | *-*-sysvr4.1* )opsys=usg5-4 NON_GNU_CPP=/usr/lib/cpp ;; | |
1119 *-*-sysv4.[[2-9]]* | *-sysvr4.[[2-9]]* ) | |
1120 if test -z "$NON_GNU_CPP" ; then | |
1121 if test -f /usr/ccs/lib/cpp | |
1122 then NON_GNU_CPP=/usr/ccs/lib/cpp | |
1123 else NON_GNU_CPP=/lib/cpp | |
1124 fi | |
1125 fi | |
1126 opsys=usg5-4-2 ;; | |
1127 *-sysv4* | *-sysvr4* ) opsys=usg5-4 ;; | |
1128 *-*-mach_bsd4.3* ) opsys=mach-bsd4-3 ;; | |
1129 esac | |
1130 | |
1131 case "$canonical" in | |
1132 | |
1133 dnl NetBSD ports | |
922 *-*-netbsd* ) | 1134 *-*-netbsd* ) |
923 opsys=netbsd | 1135 case "$canonical" in |
924 case "${canonical}" in | |
925 sparc-*-netbsd*) machine=sparc ;; | |
926 i[[3-9]]86-*-netbsd*) machine=intel386 ;; | 1136 i[[3-9]]86-*-netbsd*) machine=intel386 ;; |
927 hp300-*-netbsd* | amiga-*-netbsd* | sun3-*-netbsd* | mac68k-*-netbsd* | da30-*-netbsd* | m68k-*-netbsd* ) | 1137 hp300-*-netbsd* | amiga-*-netbsd* | sun3-*-netbsd* | mac68k-*-netbsd* | da30-*-netbsd* | m68k-*-netbsd* ) |
928 # Yes, this is somewhat bogus. | 1138 dnl Yes, this is somewhat bogus. |
929 machine=hp9000s300 ;; | 1139 machine=hp9000s300 ;; |
930 pc532-*-netbsd* | ns32k-*-netbsd* ) machine=ns32000 ;; | 1140 pc532-*-netbsd* | ns32k-*-netbsd* ) machine=ns32000 ;; |
931 pmax-*-netbsd* | mips-*-netbsd* ) machine=pmax ;; | 1141 pmax-*-netbsd* | mips-*-netbsd* ) machine=pmax ;; |
932 esac | 1142 esac |
933 ;; | 1143 ;; |
934 | 1144 |
935 ## Acorn RISCiX: | 1145 dnl Acorn RISCiX: |
936 arm-acorn-riscix1.1* ) machine=acorn opsys=riscix1-1 ;; | 1146 arm-acorn-riscix1.1* ) machine=acorn opsys=riscix1-1 ;; |
937 arm-acorn-riscix1.2* | arm-acorn-riscix ) machine=acorn opsys=riscix1-2 ;; | 1147 arm-acorn-riscix1.2* | arm-acorn-riscix ) machine=acorn opsys=riscix1-2 ;; |
938 | 1148 |
939 ## Alliant machines | 1149 dnl Alliant machines |
940 ## Strictly speaking, we need the version of the alliant operating | |
941 ## system to choose the right machine file, but currently the | |
942 ## configuration name doesn't tell us enough to choose the right | |
943 ## one; we need to give alliants their own operating system name to | |
944 ## do this right. When someone cares, they can help us. | |
945 fx80-alliant-* ) machine=alliant4 opsys=bsd4-2 ;; | 1150 fx80-alliant-* ) machine=alliant4 opsys=bsd4-2 ;; |
946 i860-alliant-* ) machine=alliant-2800 opsys=bsd4-3 ;; | 1151 i860-alliant-* ) machine=alliant-2800 opsys=bsd4-3 ;; |
947 | 1152 |
948 ## Alpha (DEC) machines. | 1153 dnl Altos 3068 |
949 ## XEmacs change: split apart into numerous files. | |
950 alpha-*-* ) | |
951 machine=alpha | |
952 case "${canonical}" in | |
953 *-dec-osf1.3 | *-dec-osf2* ) opsys=decosf1-3 ;; | |
954 *-dec-osf1.2 | *-dec-osf1* ) opsys=decosf1-2 ;; | |
955 | |
956 ## XEmacs: Add switch for OSF 1 version 3 (roth@cse.ucsc.edu) | |
957 ## XEmacs: Add switch for Digital Unix version 4 (srivasta@pilgrim.umass.edu) | |
958 *-dec-osf3.[[2-9]] ) opsys=decosf3-2 ;; | |
959 *-dec-osf3* ) opsys=decosf3-1 ;; | |
960 *-dec-osf4* ) opsys=decosf4-0 ;; | |
961 *-*-linux* ) opsys=linux ;; | |
962 esac | |
963 ;; | |
964 | |
965 ## Altos 3068 | |
966 m68*-altos-sysv* ) machine=altos opsys=usg5-2 ;; | 1154 m68*-altos-sysv* ) machine=altos opsys=usg5-2 ;; |
967 | 1155 |
968 ## Amdahl UTS | 1156 dnl Amdahl UTS |
969 580-amdahl-sysv* ) machine=amdahl opsys=usg5-2-2 ;; | 1157 580-amdahl-sysv* ) machine=amdahl opsys=usg5-2-2 ;; |
970 | 1158 |
971 ## Apollo, Domain/OS | 1159 dnl Apollo, Domain/OS |
972 m68*-apollo-* ) machine=apollo opsys=bsd4-3 ;; | 1160 m68*-apollo-* ) machine=apollo opsys=bsd4-3 ;; |
973 | 1161 |
974 ## AT&T 3b2, 3b5, 3b15, 3b20 | 1162 dnl AT&T 3b2, 3b5, 3b15, 3b20 |
975 we32k-att-sysv* ) machine=att3b opsys=usg5-2-2 ;; | 1163 we32k-att-sysv* ) machine=att3b opsys=usg5-2-2 ;; |
976 | 1164 |
977 ## AT&T 3b1 - The Mighty Unix PC! | 1165 dnl AT&T 3b1 - The Mighty Unix PC! |
978 m68*-att-sysv* ) machine=7300 opsys=usg5-2-2 ;; | 1166 m68*-att-sysv* ) machine=7300 opsys=usg5-2-2 ;; |
979 | 1167 |
980 ## Bull machines | 1168 dnl Bull machines |
981 rs6000-bull-bosx* ) machine=ibmrs6000 opsys=aix3-2 ;; # dpx20 | 1169 rs6000-bull-bosx* ) machine=ibmrs6000 opsys=aix3-2 ;; # dpx20 |
982 m68*-bull-sysv3* ) machine=dpx2 opsys=usg5-3 ;; # dpx2 | 1170 m68*-bull-sysv3* ) machine=dpx2 opsys=usg5-3 ;; # dpx2 |
983 m68*-bull-sysv2* ) machine=sps7 opsys=usg5-2 ;; # sps7 | 1171 m68*-bull-sysv2* ) machine=sps7 opsys=usg5-2 ;; # sps7 |
984 | 1172 |
985 ## CCI 5/32, 6/32 -- see "Tahoe". | 1173 dnl CCI 5/32, 6/32 -- see "Tahoe". |
986 | 1174 |
987 ## Celerity | 1175 dnl Celerity |
988 ## I don't know what configuration name to use for this; config.sub | |
989 ## doesn't seem to know anything about it. Hey, Celerity users, get | |
990 ## in touch with us! | |
991 celerity-celerity-bsd* ) machine=celerity opsys=bsd4-2 ;; | 1176 celerity-celerity-bsd* ) machine=celerity opsys=bsd4-2 ;; |
992 | 1177 |
993 ## Clipper | 1178 dnl Convex |
994 ## What operating systems does this chip run that XEmacs has been | |
995 ## tested on? | |
996 clipper-* ) machine=clipper | |
997 ## We'll use the catch-all code at the bottom to guess the | |
998 ## operating system. | |
999 ;; | |
1000 | |
1001 ## Convex | |
1002 *-convex-bsd* | *-convex-convexos* ) | 1179 *-convex-bsd* | *-convex-convexos* ) |
1003 machine=convex opsys=bsd4-3 | 1180 machine=convex opsys=bsd4-3 |
1004 ## Prevents spurious white space in makefiles - d.m.cooke@larc.nasa.gov | |
1005 NON_GNU_CPP="cc -E -P" | 1181 NON_GNU_CPP="cc -E -P" |
1006 ;; | 1182 ;; |
1007 | 1183 |
1008 ## Cubix QBx/386 | 1184 dnl Cubix QBx/386 |
1009 i[[3-9]]86-cubix-sysv* ) machine=intel386 opsys=usg5-3 ;; | 1185 i[[3-9]]86-cubix-sysv* ) machine=intel386 opsys=usg5-3 ;; |
1010 | 1186 |
1011 ## Cydra 5 | 1187 dnl Cydra 5 |
1012 cydra*-cydrome-sysv* ) machine=cydra5 opsys=usg5-3 ;; | 1188 cydra*-cydrome-sysv* ) machine=cydra5 opsys=usg5-3 ;; |
1013 | 1189 |
1014 ## Data General AViiON Machines | 1190 dnl Data General AViiON Machines |
1015 i586-dg-dgux*R4* | i586-dg-dgux5.4.4* ) machine=aviion opsys=dgux5-4r4 ;; | 1191 i586-dg-dgux*R4* | i586-dg-dgux5.4.4* ) machine=aviion opsys=dgux5-4r4 ;; |
1016 m88k-dg-dgux5.4R3* | m88k-dg-dgux5.4.3* ) machine=aviion opsys=dgux5-4r3 ;; | 1192 m88k-dg-dgux5.4R3* | m88k-dg-dgux5.4.3* ) opsys=dgux5-4r3 ;; |
1017 m88k-dg-dgux5.4R2* | m88k-dg-dgux5.4.2* ) machine=aviion opsys=dgux5-4r2 ;; | 1193 m88k-dg-dgux5.4R2* | m88k-dg-dgux5.4.2* ) opsys=dgux5-4r2 ;; |
1018 m88k-dg-dgux* ) machine=aviion opsys=dgux ;; | 1194 m88k-dg-dgux* ) opsys=dgux ;; |
1019 | 1195 |
1020 ## Dec Mips machines | 1196 dnl Motorola Delta machines |
1021 mips-dec-* ) | 1197 m68k-motorola-sysv* | m68000-motorola-sysv* ) machine=delta opsys=usg5-3 ;; |
1022 machine=pmax | |
1023 case "${canonical}" in | |
1024 *-*-ultrix[[0-3]].* | *-*-ultrix4.0* | *-*-bsd4.2* ) opsys=bsd4-2 ;; | |
1025 *-*-ultrix4.[[12]]* | *-*-bsd* ) opsys=bsd4-3 ;; | |
1026 *-*-ultrix* ) opsys=ultrix4-3 ;; | |
1027 *-*-osf* ) opsys=osf1 ;; | |
1028 *-*-mach_bsd4.3* ) opsys=mach-bsd4-3 ;; | |
1029 esac | |
1030 ;; | |
1031 | |
1032 ## Motorola Delta machines | |
1033 m68k-motorola-sysv* | m68000-motorola-sysv* ) | |
1034 machine=delta opsys=usg5-3 | |
1035 if test -z "`type gnucc | grep 'not found'`" | |
1036 then | |
1037 if test -s /etc/167config | |
1038 then CC="gnucc -m68040" | |
1039 else CC="gnucc -m68881" | |
1040 fi | |
1041 else | |
1042 if test -z "`type gcc | grep 'not found'`" | |
1043 then CC=gcc | |
1044 else CC=cc | |
1045 fi | |
1046 fi | |
1047 ;; | |
1048 m88k-motorola-sysv4* ) | 1198 m88k-motorola-sysv4* ) |
1049 # jbotte@bnr.ca says that UNIX_System_V <hostName> 4.0 R40V4.3 m88k mc88110 | 1199 dnl jbotte@bnr.ca says that UNIX_System_V <hostName> 4.0 R40V4.3 m88k mc88110 |
1050 # needs POSIX_SIGNALS and therefore needs usg5-4-2. | 1200 dnl needs POSIX_SIGNALS and therefore needs usg5-4-2. |
1051 # I hope there are not other 4.0 versions for this machine | 1201 dnl I hope there are not other 4.0 versions for this machine |
1052 # which really need usg5-4 instead. | 1202 dnl which really need usg5-4 instead. |
1053 machine=delta88k opsys=usg5-4-2 | 1203 machine=delta88k opsys=usg5-4-2 |
1054 ;; | 1204 ;; |
1055 m88k-motorola-sysv* | m88k-motorola-m88kbcs* ) machine=delta88k opsys=usg5-3 ;; | 1205 m88k-motorola-sysv* | m88k-motorola-m88kbcs* ) machine=delta88k opsys=usg5-3 ;; |
1056 | 1206 |
1057 ## Dual machines | 1207 dnl Dual machines |
1058 m68*-dual-sysv* ) machine=dual opsys=usg5-2 ;; | 1208 m68*-dual-sysv* ) machine=dual opsys=usg5-2 ;; |
1059 m68*-dual-uniplus* ) machine=dual opsys=unipl5-2 ;; | 1209 m68*-dual-uniplus* ) machine=dual opsys=unipl5-2 ;; |
1060 | 1210 |
1061 ## Elxsi 6400 | 1211 dnl Elxsi 6400 |
1062 elxsi-elxsi-sysv* ) machine=elxsi opsys=usg5-2 ;; | 1212 elxsi-elxsi-sysv* ) machine=elxsi opsys=usg5-2 ;; |
1063 | 1213 |
1064 ## Encore machines | 1214 dnl Encore machines |
1065 ns16k-encore-bsd* ) machine=ns16000 opsys=umax ;; | 1215 ns16k-encore-bsd* ) machine=ns16000 opsys=umax ;; |
1066 | 1216 |
1067 ## Gould Power Node and NP1 | 1217 dnl Gould Power Node and NP1 |
1068 pn-gould-bsd4.2* ) machine=gould opsys=bsd4-2 ;; | 1218 pn-gould-bsd4.2* ) machine=gould opsys=bsd4-2 ;; |
1069 pn-gould-bsd4.3* ) machine=gould opsys=bsd4-3 ;; | 1219 pn-gould-bsd4.3* ) machine=gould opsys=bsd4-3 ;; |
1070 np1-gould-bsd* ) machine=gould-np1 opsys=bsd4-3 ;; | 1220 np1-gould-bsd* ) machine=gould-np1 opsys=bsd4-3 ;; |
1071 | 1221 |
1072 ## Harris Night Hawk machines running CX/UX (a 5000 looks just like a 4000 | 1222 dnl Harris Night Hawk machines running CX/UX (a 5000 looks just like a 4000 |
1073 ## as far as XEmacs is concerned). | 1223 dnl as far as XEmacs is concerned). |
1074 m88k-harris-cxux* ) | 1224 m88k-harris-cxux* ) |
1075 # Build needs to be different on 7.0 and later releases | 1225 dnl Build needs to be different on 7.0 and later releases |
1076 case "`uname -r`" in | 1226 case "`uname -r`" in |
1077 [[56]].[[0-9]] ) machine=nh4000 opsys=cxux ;; | 1227 [[56]].[[0-9]] ) machine=nh4000 opsys=cxux ;; |
1078 [[7]].[[0-9]] ) machine=nh4000 opsys=cxux7 ;; | 1228 [[7]].[[0-9]] ) machine=nh4000 opsys=cxux7 ;; |
1079 esac | 1229 esac |
1080 NON_GNU_CPP="/lib/cpp" | 1230 NON_GNU_CPP="/lib/cpp" |
1081 ;; | 1231 ;; |
1082 ## Harris ecx or gcx running CX/UX (Series 1200, Series 3000) | 1232 dnl Harris ecx or gcx running CX/UX (Series 1200, Series 3000) |
1083 m68k-harris-cxux* ) machine=nh3000 opsys=cxux ;; | 1233 m68k-harris-cxux* ) machine=nh3000 opsys=cxux ;; |
1084 ## Harris power pc NightHawk running Power UNIX (Series 6000) | 1234 dnl Harris power pc NightHawk running Power UNIX (Series 6000) |
1085 powerpc-harris-powerunix ) | 1235 powerpc-harris-powerunix ) machine=nh6000 opsys=powerunix NON_GNU_CPP="cc -Xo -E -P" ;; |
1086 machine=nh6000 opsys=powerunix | 1236 |
1087 NON_GNU_CPP="cc -Xo -E -P" | 1237 dnl Honeywell XPS100 |
1088 ;; | |
1089 | |
1090 ## Honeywell XPS100 | |
1091 xps*-honeywell-sysv* ) machine=xps100 opsys=usg5-2 ;; | 1238 xps*-honeywell-sysv* ) machine=xps100 opsys=usg5-2 ;; |
1092 | 1239 |
1093 ## HP 9000 series 200 or 300 | 1240 dnl HP 9000 series 200 or 300 |
1094 m68*-hp-bsd* ) machine=hp9000s300 opsys=bsd4-3 ;; | 1241 m68*-hp-bsd* ) machine=hp9000s300 opsys=bsd4-3 ;; |
1095 | 1242 |
1096 ## HP-UX on HP's | 1243 dnl HP-UX |
1097 *-hp-hpux* ) | 1244 *-hp-hpux* ) |
1098 NON_GNU_CC="cc -Aa" | 1245 dnl Figure out machine and opsys orthogonally |
1099 NON_GNU_CPP="cc -Aa -E" | 1246 case "$canonical" in |
1100 | |
1101 ### Figure out machine and opsys orthogonally | |
1102 case "${canonical}" in | |
1103 m68* ) machine=hp9000s300 ;; | 1247 m68* ) machine=hp9000s300 ;; |
1104 hppa* ) machine=hp800 ;; | 1248 hppa* ) machine=hp800 ;; |
1105 esac | 1249 esac |
1106 | 1250 |
1107 case "${canonical}" in | 1251 case "$canonical" in |
1108 *-hp-hpux7* ) opsys=hpux ;; | 1252 *-hp-hpux7* ) opsys=hpux ;; |
1109 *-hp-hpux8* ) opsys=hpux8 ;; | 1253 *-hp-hpux8* ) opsys=hpux8 ;; |
1110 *-hp-hpux9* ) opsys=hpux9 ;; | 1254 *-hp-hpux9* ) opsys=hpux9 ;; |
1111 *-hp-hpux10* ) opsys=hpux10 ;; | 1255 *-hp-hpux10* ) opsys=hpux10 ;; |
1112 * ) | 1256 * ) |
1113 case "`uname -r`" in | 1257 case "`uname -r`" in |
1114 ## Someone's system reports A.B8.05 for this. | |
1115 ## I wonder what other possibilities there are. | |
1116 *.B8.* ) opsys=hpux8 ;; | 1258 *.B8.* ) opsys=hpux8 ;; |
1117 *.08.* ) opsys=hpux8 ;; | 1259 *.08.* ) opsys=hpux8 ;; |
1118 *.09.* ) opsys=hpux9 ;; | 1260 *.09.* ) opsys=hpux9 ;; |
1119 *.10.* ) opsys=hpux10 ;; | 1261 *.10.* ) opsys=hpux10 ;; |
1120 * ) opsys=hpux ;; | 1262 * ) opsys=hpux ;; |
1121 esac | 1263 esac |
1122 ;; | 1264 ;; |
1123 esac | 1265 esac |
1124 | 1266 |
1125 if test $opsys = hpux10 ; then | 1267 dnl HP has a broken "strcat" |
1126 NON_GNU_CC="cc -Ae" | 1268 case "$opsys" in hpux9 | hpux10 ) extra_objs="$extra_objs strcat.o";; esac |
1127 NON_GNU_CPP="cc -Ae -E" | 1269 |
1128 fi | 1270 if test "$opsys" = "hpux10"; then ansi_flag="-Ae"; else ansi_flag="-Aa"; fi |
1129 | 1271 NON_GNU_CC="cc $ansi_flag" NON_GNU_CPP="cc $ansi_flag -E" |
1130 case "${canonical}" in *-hp-hpux*shr* ) opsys="${opsys}-shr" ;; esac | 1272 |
1273 case "$canonical" in *-hp-hpux*shr* ) opsys="${opsys}-shr" ;; esac | |
1131 ;; | 1274 ;; |
1132 | 1275 |
1133 hppa-*-nextstep* ) machine=hp800 opsys=nextstep ;; | 1276 dnl Orion machines |
1134 | |
1135 ## Orion machines | |
1136 orion-orion-bsd* ) machine=orion opsys=bsd4-2 ;; | 1277 orion-orion-bsd* ) machine=orion opsys=bsd4-2 ;; |
1137 clipper-orion-bsd* ) machine=orion105 opsys=bsd4-2 ;; | 1278 clipper-orion-bsd* ) machine=orion105 opsys=bsd4-2 ;; |
1138 | 1279 |
1139 ## IBM machines | 1280 dnl IBM machines |
1140 i[[3-9]]86-ibm-aix1.1* ) machine=ibmps2-aix opsys=usg5-2-2 ;; | 1281 i[[3-9]]86-ibm-aix1.1* ) machine=ibmps2-aix opsys=usg5-2-2 ;; |
1141 i[[3-9]]86-ibm-aix1.[[23]]* | i[[3-9]]86-ibm-aix* ) machine=ibmps2-aix opsys=usg5-3 ;; | 1282 i[[3-9]]86-ibm-aix1.[[23]]* | i[[3-9]]86-ibm-aix* ) machine=ibmps2-aix opsys=usg5-3 ;; |
1142 i370-ibm-aix*) machine=ibm370aix opsys=usg5-3 ;; | 1283 i370-ibm-aix*) machine=ibm370aix opsys=usg5-3 ;; |
1143 rs6000-ibm-aix3.1* | powerpc-ibm-aix3.1* ) machine=ibmrs6000 opsys=aix3-1 ;; | 1284 romp-ibm-aos* ) opsys=bsd4-3 ;; |
1144 rs6000-ibm-aix3.2.5 | powerpc-ibm-aix3.2.5 ) machine=ibmrs6000 opsys=aix3-2-5 ;; | 1285 romp-ibm-bsd* ) opsys=bsd4-3 ;; |
1145 rs6000-ibm-aix4.2* | powerpc-ibm-aix4.2* ) machine=ibmrs6000 opsys=aix4-2 ;; | 1286 romp-ibm-mach* ) opsys=mach-bsd4-3 ;; |
1146 rs6000-ibm-aix4.1* | powerpc-ibm-aix4.1* ) machine=ibmrs6000 opsys=aix4-1 ;; | 1287 |
1147 rs6000-ibm-aix4* | powerpc-ibm-aix4* ) machine=ibmrs6000 opsys=aix4 ;; | 1288 dnl Integrated Solutions "Optimum V" |
1148 rs6000-ibm-aix* | powerpc-ibm-aix* ) machine=ibmrs6000 opsys=aix3-2 ;; | |
1149 romp-ibm-bsd4.3* ) machine=ibmrt opsys=bsd4-3 ;; | |
1150 romp-ibm-bsd4.2* ) machine=ibmrt opsys=bsd4-2 ;; | |
1151 romp-ibm-aos4.3* ) machine=ibmrt opsys=bsd4-3 ;; | |
1152 romp-ibm-aos4.2* ) machine=ibmrt opsys=bsd4-2 ;; | |
1153 romp-ibm-aos* ) machine=ibmrt opsys=bsd4-3 ;; | |
1154 romp-ibm-bsd* ) machine=ibmrt opsys=bsd4-3 ;; | |
1155 romp-ibm-aix* ) machine=ibmrt-aix opsys=usg5-2-2 ;; | |
1156 romp-ibm-mach* ) machine=ibmrt opsys=mach-bsd4-3 ;; | |
1157 | |
1158 ## Integrated Solutions `Optimum V' | |
1159 m68*-isi-bsd4.2* ) machine=isi-ov opsys=bsd4-2 ;; | 1289 m68*-isi-bsd4.2* ) machine=isi-ov opsys=bsd4-2 ;; |
1160 m68*-isi-bsd4.3* ) machine=isi-ov opsys=bsd4-3 ;; | 1290 m68*-isi-bsd4.3* ) machine=isi-ov opsys=bsd4-3 ;; |
1161 | 1291 |
1162 ## Intel 386 machines where we do care about the manufacturer | 1292 dnl Intel 386 machines where we do care about the manufacturer |
1163 i[[3-9]]86-intsys-sysv* ) machine=is386 opsys=usg5-2-2 ;; | 1293 i[[3-9]]86-intsys-sysv* ) machine=is386 opsys=usg5-2-2 ;; |
1164 | 1294 |
1165 ## Prime EXL | 1295 dnl Prime EXL |
1166 i[[3-9]]86-prime-sysv* ) machine=i386 opsys=usg5-3 ;; | 1296 i[[3-9]]86-prime-sysv* ) machine=i386 opsys=usg5-3 ;; |
1167 | 1297 |
1168 ## Sequent Symmetry running Dynix | 1298 dnl Sequent Symmetry running Dynix |
1169 i[[3-9]]86-sequent-bsd* ) machine=symmetry opsys=bsd4-3 ;; | 1299 i[[3-9]]86-sequent-bsd* ) machine=symmetry opsys=bsd4-3 ;; |
1170 | 1300 |
1171 ## Sequent Symmetry running DYNIX/ptx | 1301 dnl Sequent Symmetry running DYNIX/ptx |
1172 ## Use the old cpp rather than the newer ANSI one. | 1302 i[[3-9]]86-sequent-ptx* ) machine=sequent-ptx opsys=ptx NON_GNU_CPP="/lib/cpp" ;; |
1173 i[[3-9]]86-sequent-ptx* ) | 1303 |
1174 machine=sequent-ptx opsys=ptx | 1304 dnl Unspecified sysv on an ncr machine defaults to svr4.2. |
1175 NON_GNU_CPP="/lib/cpp" | 1305 dnl (Plain usg5-4 does not turn on POSIX signals, which we need.) |
1176 ;; | |
1177 | |
1178 ## Unspecified sysv on an ncr machine defaults to svr4.2. | |
1179 ## (Plain usg5-4 doesn't turn on POSIX signals, which we need.) | |
1180 i[[3-9]]86-ncr-sysv* ) machine=ncr386 opsys=usg5-4-2 ;; | 1306 i[[3-9]]86-ncr-sysv* ) machine=ncr386 opsys=usg5-4-2 ;; |
1181 | 1307 |
1182 ## Intel Paragon OSF/1 | 1308 dnl Intel Paragon OSF/1 |
1183 i860-intel-osf1* ) machine=paragon opsys=osf1 NON_GNU_CPP=/usr/mach/lib/cpp ;; | 1309 i860-intel-osf1* ) machine=paragon opsys=osf1 NON_GNU_CPP=/usr/mach/lib/cpp ;; |
1184 | 1310 |
1185 ## Intel 860 | 1311 dnl Intel 860 |
1186 i860-*-sysv4* ) | 1312 i860-*-sysv4* ) machine=i860 opsys=usg5-4 NON_GNU_CC="/bin/cc" NON_GNU_CPP="/usr/ccs/lib/cpp" ;; |
1187 machine=i860 opsys=usg5-4 | 1313 |
1188 NON_GNU_CC="/bin/cc" # Ie, not the one in /usr/ucb/cc. | 1314 dnl Masscomp machines |
1189 NON_GNU_CPP="/usr/ccs/lib/cpp" # cc -E tokenizes macro expansion. | |
1190 ;; | |
1191 | |
1192 ## Masscomp machines | |
1193 m68*-masscomp-rtu* ) machine=masscomp opsys=rtu ;; | 1315 m68*-masscomp-rtu* ) machine=masscomp opsys=rtu ;; |
1194 | 1316 |
1195 ## Megatest machines | 1317 dnl Megatest machines |
1196 m68*-megatest-bsd* ) machine=mega68 opsys=bsd4-2 ;; | 1318 m68*-megatest-bsd* ) machine=mega68 opsys=bsd4-2 ;; |
1197 | 1319 |
1198 ## Workstations sold by MIPS | 1320 dnl Workstations sold by MIPS |
1199 ## This is not necessarily all workstations using the MIPS processor - | 1321 dnl This is not necessarily all workstations using the MIPS processor - |
1200 ## Irises are produced by SGI, and DECstations by DEC. | 1322 dnl Irises are produced by SGI, and DECstations by DEC. |
1201 | 1323 mips-mips-usg* ) machine=mips4 ;; |
1202 ## etc/MACHINES lists mips.h and mips4.h as possible machine files, | |
1203 ## and usg5-2-2 and bsd4-3 as possible OS files. The only guidance | |
1204 ## it gives for choosing between the alternatives seems to be "Use | |
1205 ## -machine=mips4 for RISCOS version 4; use -opsystem=bsd4-3 with | |
1206 ## the BSD world." I'll assume that these are instructions for | |
1207 ## handling two odd situations, and that every other situation | |
1208 ## should use mips.h and usg5-2-2, they being listed first. | |
1209 mips-mips-usg* ) | |
1210 machine=mips4 | |
1211 ## Fall through to the general code at the bottom to decide on the OS. | |
1212 ;; | |
1213 mips-mips-riscos4 ) | 1324 mips-mips-riscos4 ) |
1214 machine=mips4 | 1325 machine=mips4 |
1215 NON_GNU_CC="cc -systype bsd43" | 1326 NON_GNU_CC="cc -systype bsd43" |
1216 NON_GNU_CPP="cc -systype bsd43 -E" | 1327 NON_GNU_CPP="cc -systype bsd43 -E" |
1217 case "${canonical}" in | 1328 case "$canonical" in |
1218 mips-mips-riscos4* ) opsys=bsd4-3 ;; | 1329 mips-mips-riscos4* ) opsys=bsd4-3 ;; |
1219 mips-mips-riscos5* ) opsys=riscos5 ;; | 1330 mips-mips-riscos5* ) opsys=riscos5 ;; |
1220 esac | 1331 esac |
1221 ;; | 1332 ;; |
1222 mips-mips-bsd* ) machine=mips opsys=bsd4-3 ;; | 1333 mips-mips-bsd* ) machine=mips opsys=bsd4-3 ;; |
1223 mips-mips-* ) machine=mips opsys=usg5-2-2 ;; | 1334 mips-mips-* ) machine=mips opsys=usg5-2-2 ;; |
1224 | 1335 |
1225 ## NeXT | 1336 dnl NeXT |
1226 m68*-next-* | m68k-*-nextstep* ) machine=m68k opsys=nextstep ;; | 1337 m68*-next-* | m68k-*-nextstep* ) machine=m68k opsys=nextstep ;; |
1227 | 1338 |
1228 ## The complete machine from National Semiconductor | 1339 dnl The complete machine from National Semiconductor |
1229 ns32k-ns-genix* ) machine=ns32000 opsys=usg5-2 ;; | 1340 ns32k-ns-genix* ) machine=ns32000 opsys=usg5-2 ;; |
1230 | 1341 |
1231 ## NCR machines | 1342 dnl NCR machines |
1232 m68*-ncr-sysv2* | m68*-ncr-sysvr2* ) machine=tower32 opsys=usg5-2-2 ;; | 1343 m68*-ncr-sysv2* | m68*-ncr-sysvr2* ) machine=tower32 opsys=usg5-2-2 ;; |
1233 m68*-ncr-sysv3* | m68*-ncr-sysvr3* ) machine=tower32v3 opsys=usg5-3 ;; | 1344 m68*-ncr-sysv3* | m68*-ncr-sysvr3* ) machine=tower32v3 opsys=usg5-3 ;; |
1234 | 1345 |
1235 ## Nixdorf Targon 31 | 1346 dnl Nixdorf Targon 31 |
1236 m68*-nixdorf-sysv* ) machine=targon31 opsys=usg5-2-2 ;; | 1347 m68*-nixdorf-sysv* ) machine=targon31 opsys=usg5-2-2 ;; |
1237 | 1348 |
1238 ## Nu (TI or LMI) | 1349 dnl Nu (TI or LMI) |
1239 m68*-nu-sysv* ) machine=nu opsys=usg5-2 ;; | 1350 m68*-nu-sysv* ) machine=nu opsys=usg5-2 ;; |
1240 | 1351 |
1241 ## Plexus | 1352 dnl Plexus |
1242 m68*-plexus-sysv* ) machine=plexus opsys=usg5-2 ;; | 1353 m68*-plexus-sysv* ) machine=plexus opsys=usg5-2 ;; |
1243 | 1354 |
1244 ## Pyramid machines | 1355 dnl Pyramid machines |
1245 ## I don't really have any idea what sort of processor the Pyramid has, | |
1246 ## so I'm assuming it is its own architecture. | |
1247 pyramid-pyramid-bsd* ) machine=pyramid opsys=bsd4-2 ;; | 1356 pyramid-pyramid-bsd* ) machine=pyramid opsys=bsd4-2 ;; |
1248 | 1357 |
1249 ## Sequent Balance | 1358 dnl Sequent Balance |
1250 ns32k-sequent-bsd4.2* ) machine=sequent opsys=bsd4-2 ;; | 1359 ns32k-sequent-bsd4.2* ) machine=sequent opsys=bsd4-2 ;; |
1251 ns32k-sequent-bsd4.3* ) machine=sequent opsys=bsd4-3 ;; | 1360 ns32k-sequent-bsd4.3* ) machine=sequent opsys=bsd4-3 ;; |
1252 | 1361 |
1253 ## Siemens Nixdorf | 1362 dnl Siemens Nixdorf |
1254 mips-siemens-sysv* | mips-sni-sysv*) | 1363 mips-siemens-sysv* | mips-sni-sysv*) |
1255 machine=mips-siemens opsys=usg5-4 | 1364 machine=mips-siemens opsys=usg5-4 |
1256 NON_GNU_CC=/usr/ccs/bin/cc | 1365 NON_GNU_CC=/usr/ccs/bin/cc |
1257 NON_GNU_CPP=/usr/ccs/lib/cpp | 1366 NON_GNU_CPP=/usr/ccs/lib/cpp |
1258 ;; | 1367 ;; |
1259 | 1368 |
1260 ## Silicon Graphics machines | 1369 dnl Silicon Graphics machines |
1261 ## Iris 2500 and Iris 2500 Turbo (aka the Iris 3030) | 1370 dnl Iris 2500 and Iris 2500 Turbo (aka the Iris 3030) |
1262 m68*-sgi-iris3.5* ) machine=irist opsys=iris3-5 ;; | 1371 m68*-sgi-iris3.5* ) machine=irist opsys=iris3-5 ;; |
1263 m68*-sgi-iris3.6* | m68*-sgi-iris*) machine=irist opsys=iris3-6 ;; | 1372 m68*-sgi-iris3.6* | m68*-sgi-iris*) machine=irist opsys=iris3-6 ;; |
1264 ## Iris 4D | 1373 dnl Iris 4D |
1265 mips-sgi-irix3.* ) machine=iris4d opsys=irix3-3 ;; | 1374 mips-sgi-irix3.* ) opsys=irix3-3 ;; |
1266 mips-sgi-irix4.* ) machine=iris4d opsys=irix4-0 ;; | 1375 mips-sgi-irix4.* ) opsys=irix4-0 ;; |
1267 mips-sgi-irix6* ) machine=iris4d opsys=irix6-0 NON_GNU_CC="cc -Olimit 2000" ;; | 1376 mips-sgi-irix6* ) opsys=irix6-0 NON_GNU_CC="cc -Olimit 2000" ;; |
1268 mips-sgi-irix5.[[3-9]]* ) machine=iris4d opsys=irix5-3 ;; | 1377 mips-sgi-irix5.1* ) opsys=irix5-1 ;; |
1269 mips-sgi-irix5.2* ) machine=iris4d opsys=irix5-2 ;; | 1378 mips-sgi-irix5.2* ) opsys=irix5-2 ;; |
1270 mips-sgi-irix5.1* ) machine=iris4d opsys=irix5-1 ;; | 1379 mips-sgi-irix5.* ) opsys=irix5-3 ;; |
1271 mips-sgi-irix* ) machine=iris4d opsys=irix5-0 ;; | 1380 mips-sgi-irix* ) opsys=irix5-0 ;; |
1272 | 1381 |
1273 ## SONY machines | 1382 dnl SONY machines |
1274 m68*-sony-bsd4.2* ) machine=news opsys=bsd4-2 ;; | 1383 *-sony-newsos[[34]]* | *-sony-news[[34]]* ) opsys=bsd4-3 ;; |
1275 m68*-sony-bsd4.3* ) machine=news opsys=bsd4-3 ;; | 1384 *-sony-news* ) opsys=newsos5 ;; |
1276 m68*-sony-newsos3* | m68*-sony-news3*) machine=news opsys=bsd4-3 ;; | 1385 |
1277 mips-sony-bsd* | mips-sony-newsos4* | mips-sony-news4*) machine=news-risc opsys=bsd4-3 ;; | 1386 dnl Stride |
1278 mips-sony-news* ) machine=news-risc opsys=newsos5 ;; | |
1279 | |
1280 ## Stride | |
1281 m68*-stride-sysv* ) machine=stride opsys=usg5-2 ;; | 1387 m68*-stride-sysv* ) machine=stride opsys=usg5-2 ;; |
1282 | 1388 |
1283 ## Suns | 1389 dnl Suns |
1284 sparc-*-linux* ) machine=sparc opsys=linux ;; | |
1285 | |
1286 *-*-solaris* | *-*-sunos* | *-sun-mach* | *-sun-bsd* ) | 1390 *-*-solaris* | *-*-sunos* | *-sun-mach* | *-sun-bsd* ) |
1287 # Hardware type | 1391 dnl Hardware type |
1288 case "${canonical}" in | 1392 case "$canonical" in |
1289 m68*-sunos1* ) machine=sun1 ;; | 1393 m68*-sunos1* ) machine=sun1 ;; |
1290 m68*-sunos2* ) machine=sun2 ;; | 1394 m68*-sunos2* ) machine=sun2 ;; |
1291 m68* ) machine=sun3 ;; | 1395 m68* ) machine=sun3 ;; |
1292 i[[3-9]]86*-sun-sunos[[34]]* ) machine=sun386 ;; | 1396 i[[3-9]]86*-sun-sunos[[34]]* ) machine=sun386 ;; |
1293 i[[3-9]]86-*-* ) machine=intel386 ;; | 1397 i[[3-9]]86-*-* ) machine=intel386 ;; |
1294 rs6000* ) machine=rs6000 ;; | 1398 rs6000* ) machine=rs6000 ;; |
1295 sparc* ) machine=sparc ;; | |
1296 powerpc* ) machine=powerpc ;; | |
1297 * ) unported=yes ;; | |
1298 esac | 1399 esac |
1299 | 1400 |
1300 # Make `canonical' even more so. | 1401 dnl Make $canonical even more so. |
1301 case "${canonical}" in *-sunos5*) | 1402 case "$canonical" in *-sunos5*) |
1302 canonical="`echo \"${canonical}\" | sed -e s/sunos5/solaris2/`";; | 1403 canonical="`echo \"$canonical\" | sed -e s/sunos5/solaris2/`";; |
1303 esac | 1404 esac |
1304 | 1405 |
1305 # On SunOS 4, use /usr/lib/cpp, sans dynodump, /bin/ranlib | 1406 dnl On SunOS 4, use /usr/lib/cpp, sans dynodump, /bin/ranlib |
1306 # On SunOS 5, use /usr/ccs/lib/cpp, need dynodump, RANLIB not needed | 1407 dnl On SunOS 5, use /usr/ccs/lib/cpp, need dynodump, RANLIB not needed |
1307 # But, SunOS 5.6 no longer needs dynodump because it has a similar | 1408 dnl But, SunOS 5.6 no longer needs dynodump because it has a similar |
1308 # function integrated. | 1409 dnl function integrated. |
1309 case "${canonical}" in | 1410 case "$canonical" in |
1310 *-sunos4* ) | 1411 *-sunos4* ) |
1311 test -f /usr/lib/cpp && NON_GNU_CPP=/usr/lib/cpp ;; | 1412 test -f /usr/lib/cpp && NON_GNU_CPP=/usr/lib/cpp ;; |
1312 *-solaris2* ) | 1413 *-solaris2* ) |
1313 test -f /usr/ccs/lib/cpp && NON_GNU_CPP=/usr/ccs/lib/cpp | 1414 test -f /usr/ccs/lib/cpp && NON_GNU_CPP=/usr/ccs/lib/cpp |
1314 RANLIB=':' | 1415 RANLIB=':' |
1315 case "${canonical}" in | 1416 case "$canonical" in *-solaris2.[[0-5]]* ) need_dynodump=yes ;; esac |
1316 *-solaris2.[[6-9]]* ) need_dynodump=no ;; | |
1317 *-solaris2* ) need_dynodump=yes ;; | |
1318 esac | 1417 esac |
1319 esac | 1418 |
1320 | 1419 case "$canonical" in |
1321 case "${canonical}" in | 1420 dnl The last Sun386 ran 4.0. |
1322 ## The Sun386 didn't get past 4.0. | 1421 i[[3-9]]86-*-sunos4*) opsys=sunos4-0 ;; |
1323 i[[3-9]]86-*-sunos4* ) opsys=sunos4-0 ;; | |
1324 *-sunos4.0* ) opsys=sunos4-0 ;; | 1422 *-sunos4.0* ) opsys=sunos4-0 ;; |
1325 *-sunos4.1.2* ) opsys=sunos4-1-2 ;; | 1423 *-sunos4.1.2* ) opsys=sunos4-1-2 ;; |
1326 *-sunos4.1.3* ) opsys=sunos4-1-3 ;; | 1424 *-sunos4.1.3* ) opsys=sunos4-1-3 ;; |
1327 *-sunos4.1.[[4-9]]* ) opsys=sunos4-1-4 ;; | 1425 *-sunos4.1.[[4-9]]* ) opsys=sunos4-1-4 ;; |
1328 *-sunos4* | *-sunos ) opsys=sunos4-1 ;; | 1426 *-sunos4* | *-sunos ) opsys=sunos4-1 ;; |
1335 | 1433 |
1336 *-mach* ) opsys=mach-bsd4-3 ;; | 1434 *-mach* ) opsys=mach-bsd4-3 ;; |
1337 * ) opsys=bsd4-2 ;; | 1435 * ) opsys=bsd4-2 ;; |
1338 esac | 1436 esac |
1339 | 1437 |
1340 case "${canonical}" in *-sunos4*shr* ) opsys="${opsys}-shr" ;; esac | 1438 case "$canonical" in *-sunos4*shr* ) opsys="${opsys}-shr" ;; esac |
1341 | 1439 |
1342 ## Watch out for a compiler that is guaranteed not to work. | 1440 dnl Watch out for a compiler guaranteed not to work. |
1343 case "${canonical}" in | 1441 case "$canonical" in |
1344 *-solaris* ) test "$CC" = "/usr/ucb/cc" && unset CC ;; | 1442 *-solaris* ) case "$CC" in /usr/ucb/cc* ) CC="" ;; esac ;; |
1345 esac | 1443 esac |
1346 ;; | 1444 ;; |
1347 | 1445 |
1348 sparc-*-nextstep* ) machine=sparc opsys=nextstep ;; | 1446 dnl Tadpole 68k |
1349 | |
1350 ## Tadpole 68k | |
1351 m68*-tadpole-sysv* ) machine=tad68k opsys=usg5-3 ;; | 1447 m68*-tadpole-sysv* ) machine=tad68k opsys=usg5-3 ;; |
1352 | 1448 |
1353 ## Tahoe machines | 1449 dnl Tahoe machines |
1354 tahoe-tahoe-bsd4.2* ) machine=tahoe opsys=bsd4-2 ;; | 1450 tahoe-tahoe-bsd4.2* ) machine=tahoe opsys=bsd4-2 ;; |
1355 tahoe-tahoe-bsd4.3* ) machine=tahoe opsys=bsd4-3 ;; | 1451 tahoe-tahoe-bsd4.3* ) machine=tahoe opsys=bsd4-3 ;; |
1356 | 1452 |
1357 ## Tandem Integrity S2 | 1453 dnl Tandem Integrity S2 |
1358 mips-tandem-sysv* ) machine=tandem-s2 opsys=usg5-3 ;; | 1454 mips-tandem-sysv* ) machine=tandem-s2 opsys=usg5-3 ;; |
1359 | 1455 |
1360 ## Tektronix XD88 | 1456 dnl Tektronix XD88 |
1361 m88k-tektronix-sysv3* ) machine=tekxd88 opsys=usg5-3 ;; | 1457 m88k-tektronix-sysv3* ) machine=tekxd88 opsys=usg5-3 ;; |
1362 | 1458 |
1363 ## Tektronix 16000 box (6130?) | 1459 dnl Tektronix 16000 box (6130?) |
1364 ns16k-tektronix-bsd* ) machine=ns16000 opsys=bsd4-2 ;; | 1460 ns16k-tektronix-bsd* ) machine=ns16000 opsys=bsd4-2 ;; |
1365 ## Tektronix 4300 | 1461 dnl Tektronix 4300 |
1366 ## src/m/tek4300.h hints that this is a m68k machine. | 1462 dnl src/m/tek4300.h hints that this is a m68k machine. |
1367 m68*-tektronix-bsd* ) machine=tek4300 opsys=bsd4-3 ;; | 1463 m68*-tektronix-bsd* ) machine=tek4300 opsys=bsd4-3 ;; |
1368 | 1464 |
1369 ## Titan P2 or P3 | 1465 dnl Titan P2 or P3 |
1370 ## We seem to have lost the machine-description file titan.h! | |
1371 titan-titan-sysv* ) machine=titan opsys=usg5-3 ;; | 1466 titan-titan-sysv* ) machine=titan opsys=usg5-3 ;; |
1372 | 1467 |
1373 ## Ustation E30 (SS5E) | 1468 dnl Ustation E30 (SS5E) |
1374 m68*-unisys-uniplus* ) machine=ustation opsystem=unipl5-2 ;; | 1469 m68*-unisys-uniplus* ) machine=ustation opsystem=unipl5-2 ;; |
1375 | 1470 |
1376 ## Vaxen. | 1471 dnl Vaxen. |
1377 vax-dec-* ) | 1472 vax-dec-* ) |
1378 machine=vax | 1473 case "$canonical" in |
1379 case "${canonical}" in | 1474 *-sysv[[01]]* | *-sysvr[[01]]* ) opsys=usg5-0 ;; |
1380 *-bsd4.1* ) opsys=bsd4-1 ;; | 1475 *-sysv2* | *-sysvr2* ) opsys=usg5-2 ;; |
1381 *-bsd4.2* | *-ultrix[[0-3]].* | *-ultrix4.0* ) opsys=bsd4-2 ;; | 1476 *-mach* ) opsys=mach-bsd4-3 ;; |
1382 *-bsd4.3* | *-ultrix* ) opsys=bsd4-3 ;; | |
1383 *-sysv[[01]]* | *-sysvr[[01]]* ) opsys=usg5-0 ;; | |
1384 *-sysv2* | *-sysvr2* ) opsys=usg5-2 ;; | |
1385 *-vms* ) opsys=vms ;; | |
1386 *-mach* ) opsys=mach-bsd4-3 ;; | |
1387 * ) unported=yes | |
1388 esac | 1477 esac |
1389 ;; | 1478 ;; |
1390 | 1479 |
1391 ## Whitechapel MG1 | 1480 dnl Whitechapel MG1 |
1392 ## We don't know what sort of OS runs on these; we'll let the | |
1393 ## operating system guessing code below try. | |
1394 ns16k-whitechapel-* ) machine=mg1 ;; | 1481 ns16k-whitechapel-* ) machine=mg1 ;; |
1395 | 1482 |
1396 ## Wicat | 1483 dnl Wicat |
1397 m68*-wicat-sysv* ) machine=wicat opsys=usg5-2 ;; | 1484 m68*-wicat-sysv* ) machine=wicat opsys=usg5-2 ;; |
1398 | 1485 |
1399 ## Intel 386 machines where we don't care about the manufacturer | 1486 dnl Intel 386 machines where we do not care about the manufacturer |
1400 i[[3-9]]86-*-* ) | 1487 i[[3-9]]86-*-* ) |
1401 machine=intel386 | 1488 machine=intel386 |
1402 case "${canonical}" in | 1489 case "$canonical" in |
1403 *-isc1.* | *-isc2.[[01]]* ) opsys=386-ix ;; | 1490 *-isc1.* | *-isc2.[[01]]* ) opsys=386-ix ;; |
1404 *-isc2.2* ) opsys=isc2-2 ;; | 1491 *-isc2.2* ) opsys=isc2-2 ;; |
1405 *-isc4.0* ) opsys=isc4-0 ;; | 1492 *-isc4.0* ) opsys=isc4-0 ;; |
1406 *-isc4.* ) opsys=isc4-1 | 1493 *-isc4.* ) opsys=isc4-1 |
1407 GCC_TEST_OPTIONS=-posix | 1494 GCC_TEST_OPTIONS=-posix |
1408 NON_GCC_TEST_OPTIONS=-Xp | 1495 NON_GCC_TEST_OPTIONS=-Xp |
1409 ;; | 1496 ;; |
1410 *-isc* ) opsys=isc3-0 ;; | 1497 *-isc* ) opsys=isc3-0 ;; |
1411 *-esix5* ) opsys=esix5r4; NON_GNU_CPP=/usr/lib/cpp ;; | 1498 *-esix5* ) opsys=esix5r4 NON_GNU_CPP=/usr/lib/cpp ;; |
1412 *-esix* ) opsys=esix ;; | 1499 *-esix* ) opsys=esix ;; |
1413 *-mach* ) opsys=mach-bsd4-3 ;; | 1500 *-mach* ) opsys=mach-bsd4-3 ;; |
1414 *-xenix* ) opsys=xenix ;; | 1501 *-xenix* ) opsys=xenix ;; |
1415 *-linux* ) opsys=linux ;; | 1502 *-sco3.2v4* ) opsys=sco4 NON_GNU_CPP=/lib/cpp ;; |
1416 *-sco3.2v4* ) opsys=sco4 ; NON_GNU_CPP=/lib/cpp ;; | |
1417 *-bsd386* | *-bsdi1* ) opsys=bsd386 ;; | 1503 *-bsd386* | *-bsdi1* ) opsys=bsd386 ;; |
1418 *-bsdi3* ) opsys=bsdos3 ;; | 1504 *-bsdi3* ) opsys=bsdos3 ;; |
1419 *-bsdi2.1* ) opsys=bsdos2-1 ;; | 1505 *-bsdi2.1* ) opsys=bsdos2-1 ;; |
1420 *-bsdi2* ) opsys=bsdos2 ;; | 1506 *-bsdi2* ) opsys=bsdos2 ;; |
1421 *-sco3.2v5* ) opsys=sco5 ; | 1507 *-sco3.2v5* ) opsys=sco5 ; |
1422 ## This is a pain. Like the current USL cc, SCO's cc -E | 1508 dnl This is a pain. Like the current USL cc, SCO cc -E |
1423 ## tokenizes as it preprocesses, making configure very | 1509 dnl tokenizes as it preprocesses, making configure very |
1424 ## unhappy. Unfortunately, /lib/cpp doesn't understand | 1510 dnl unhappy. Unfortunately, /lib/cpp does not understand |
1425 ## flags like "-b elf", so we have to cheat in order to | 1511 dnl flags like "-b elf", so we have to cheat in order to |
1426 ## pick up the right defines for UNEXEC from the s-file. | 1512 dnl pick up the right defines for UNEXEC from the s-file. |
1427 ## 01/05/95 robertl@dgii.com | 1513 dnl 01/05/95 robertl@dgii.com |
1428 if test "${dynamic}" = "yes" ; then | 1514 if test "$dynamic" = "yes" ; then |
1429 NON_GNU_CPP="/lib/cpp -D_XOPEN_SOURCE -D_SCO_ELF" ; | 1515 NON_GNU_CPP="/lib/cpp -D_XOPEN_SOURCE -D_SCO_ELF" ; |
1430 else | 1516 else |
1431 NON_GNU_CPP="/lib/cpp -D_XOPEN_SOURCE" ; | 1517 NON_GNU_CPP="/lib/cpp -D_XOPEN_SOURCE" ; |
1432 fi ;; | 1518 fi ;; |
1433 *-386bsd* ) opsys=386bsd ;; | 1519 *-386bsd* ) opsys=386bsd ;; |
1434 *-freebsd* ) opsys=freebsd ;; | 1520 *-freebsd* ) opsys=freebsd ;; |
1435 *-nextstep* ) opsys=nextstep ;; | 1521 *-nextstep* ) opsys=nextstep ;; |
1436 ## Otherwise, we'll fall through to the generic opsys code at the bottom. | 1522 dnl Otherwise, we fall through to the generic opsys code at the bottom. |
1437 esac | 1523 esac |
1438 ;; | 1524 ;; |
1439 | 1525 |
1440 ## Linux/68k | 1526 dnl Linux/68k |
1441 m68k-*-linux* ) machine=m68k opsys=linux ;; | 1527 m68k-*-linux* ) machine=m68k opsys=linux ;; |
1442 | 1528 |
1443 * ) unported=yes ;; | |
1444 esac | 1529 esac |
1445 | 1530 |
1446 ### If the code above didn't choose an operating system, just choose | 1531 if test -z "$machine" -o -z "$opsys"; then |
1447 ### an operating system based on the configuration name. You really | 1532 (echo "$progname: XEmacs hasn't been ported to \`$canonical' systems." |
1448 ### only want to use this when you have no idea what the right | 1533 echo "$progname: Check \`etc/MACHINES' for recognized configuration names." |
1449 ### operating system is; if you know what operating systems a machine | |
1450 ### runs, it's cleaner to make it explicit in the case statement | |
1451 ### above. | |
1452 if test -z "${opsys}" ; then | |
1453 case "${canonical}" in | |
1454 *-gnu* ) opsys=gnu ;; | |
1455 *-bsd4.[[01]] ) opsys=bsd4-1 ;; | |
1456 *-bsd4.2 ) opsys=bsd4-2 ;; | |
1457 *-bsd4.3 ) opsys=bsd4-3 ;; | |
1458 *-sysv0 | *-sysvr0 ) opsys=usg5-0 ;; | |
1459 *-sysv2 | *-sysvr2 ) opsys=usg5-2 ;; | |
1460 *-sysv2.2 | *-sysvr2.2 ) opsys=usg5-2-2 ;; | |
1461 *-sysv3* | *-sysvr3* ) opsys=usg5-3 ;; | |
1462 *-sysv4.1* | *-sysvr4.1* ) opsys=usg5-4 NON_GNU_CPP=/usr/lib/cpp ;; | |
1463 *-sysv4.[[2-9]]* | *-sysvr4.[[2-9]]* ) | |
1464 if test -z "$NON_GNU_CPP" ; then | |
1465 if test -f /usr/ccs/lib/cpp | |
1466 then NON_GNU_CPP=/usr/ccs/lib/cpp | |
1467 else NON_GNU_CPP=/lib/cpp | |
1468 fi | |
1469 fi | |
1470 opsys=usg5-4-2 ;; | |
1471 *-sysv4* | *-sysvr4* ) opsys=usg5-4 ;; | |
1472 * ) unported=yes ;; | |
1473 esac | |
1474 fi | |
1475 | |
1476 test -z "$RANLIB" && RANLIB=ranlib | |
1477 | |
1478 if test ${unported} = yes; then | |
1479 (echo "${progname}: XEmacs hasn't been ported to \`${canonical}' systems." | |
1480 echo "${progname}: Check \`etc/MACHINES' for recognized configuration names." | |
1481 ) >&2 | 1534 ) >&2 |
1482 exit 1 | 1535 exit 1 |
1483 fi | 1536 fi |
1484 | 1537 |
1485 if test "${dynamic}" = "yes" ; then | 1538 if test "$dynamic" = "yes" ; then |
1486 case "${opsys}" in | 1539 case "$opsys" in |
1487 hpux* | sunos4* | sco5 ) opsys="${opsys}-shr" ;; | 1540 hpux* | sunos4* | sco5 ) opsys="${opsys}-shr" ;; |
1488 esac | 1541 esac |
1489 elif test "${dynamic}" = "no" ; then | 1542 elif test "$dynamic" = "no" ; then |
1490 case "${opsys}" in | 1543 case "$opsys" in |
1491 sol2* | decosf1-3 | decosf3-* | decosf4-* | linux ) opsys="${opsys}-static" ;; | 1544 sol2* | decosf1-3 | decosf3-* | decosf4-* | linux ) opsys="${opsys}-static" ;; |
1492 esac | 1545 esac |
1493 fi | 1546 fi |
1494 | 1547 |
1495 dynodump_arch='' | |
1496 if test "${need_dynodump}" = "yes" ; then | |
1497 case "${canonical}" in | |
1498 sparc* ) dynodump_arch=sparc ;; | |
1499 powerpc* ) dynodump_arch=ppc ;; | |
1500 i[[3-9]]86* ) dynodump_arch=i386 ;; | |
1501 esac | |
1502 fi | |
1503 | |
1504 machfile="m/${machine}.h" | 1548 machfile="m/${machine}.h" |
1505 opsysfile="s/${opsys}.h" | 1549 opsysfile="s/${opsys}.h" |
1506 | 1550 |
1507 | 1551 dnl -------------------------------------------------- |
1508 ############################################################################ | 1552 dnl Determine the compiler, set up for feature testing |
1509 # # | 1553 dnl -------------------------------------------------- |
1510 # Determine the compiler, set up for feature testing # | 1554 |
1511 # # | 1555 dnl Choose a compiler. |
1512 ############################################################################ | 1556 test -n "$CC" && cc_specified=yes |
1513 | 1557 |
1514 dnl ----------------------------------------------------------------------- | 1558 dnl Save the value of CFLAGS that the user specified. |
1515 dnl Let's do a couple of macro (re)definitions. | 1559 SPECIFIED_CFLAGS="$CFLAGS" |
1516 dnl | 1560 |
1517 dnl First we redefine AC_TEST_CPP so that we can see the error output | 1561 if test -n "$compiler"; then CC="$compiler"; fi |
1518 dnl from preprocessor runs. This definition is identical to the standard | 1562 |
1519 dnl one supplied by Autoconf 1.11 extra for the extra_verbose check. | 1563 dnl Some systems specify a CPP or CC to use unless we are using GCC. |
1520 dnl | 1564 test -n "$NON_GNU_CC" -a "$with_gcc" = "no" -a -z "$CC" && CC="$NON_GNU_CC" |
1521 dnl Note that we *must* include the brackets around the macro definition | 1565 AC_PROG_CC |
1522 dnl name here. Autoconf has redefined the quoting characters to be brackets, | 1566 |
1523 dnl and if we don't supply them, the original definition will get | 1567 if test "$with_gcc" = "no" -a "$ac_cv_prog_gcc" = "yes"; then |
1524 dnl substituted in place of the macro name! | 1568 CC=${NON_GNU_CC-cc} |
1525 dnl | 1569 AC_PROG_CC |
1526 | 1570 elif test "$with_gcc" = "yes" -a "$ac_cv_prog_gcc" = "no" ; then |
1527 dnl Following macro is useful shorthand | 1571 CC=gcc |
1528 define([IF_YES_AC_DEFINE],test "${$1}" = yes && [AC_DEFINE]($2)) | 1572 AC_PROG_CC |
1529 | 1573 fi |
1530 define([AC_TEST_CPP], | 1574 |
1531 [AC_REQUIRE_CPP()dnl | 1575 if test "$GCC" = "yes"; then with_gcc=yes; else with_gcc=no; fi |
1532 cat > conftest.${ac_ext} <<EOF | 1576 test -n "$NON_GNU_CPP" -a "$with_gcc" = "no" -a -z "$CPP" && CPP="$NON_GNU_CPP" |
1533 #include "confdefs.h" | 1577 |
1534 [$1] | 1578 AC_PROG_CPP |
1535 EOF | 1579 |
1536 dnl # Some shells (Coherent) do redirections in the wrong order, so need | 1580 case "$canonical" in |
1537 dnl # the parens. | 1581 *-sun-sunos* ) test "$CPP" = "acc -E" && CPP="acc -E -Xs" ;; |
1538 dnl # The exec was added by Mly to make this work under BSDI | 1582 esac |
1539 ac_err=`eval "(exec $ac_cpp conftest.${ac_ext} >/dev/null) 2>&1"` | 1583 |
1540 dnl # Use test here, not brackets, to avoid strange autoconf-quoting lossage. | 1584 dnl -------------------------------------------------------------------- |
1541 if test "${extra_verbose}" = "yes" && test -n "$ac_err"; then | 1585 dnl Extract some information from the operating system and machine files |
1542 echo "$ac_err" | 1586 dnl -------------------------------------------------------------------- |
1543 fi | 1587 |
1544 if test -z "$ac_err"; then | 1588 echo "Extracting information from the machine- and system-dependent headers..." |
1545 ifelse([$2], , :, [rm -rf conftest* | 1589 |
1546 $2 | 1590 dnl First figure out CFLAGS (which we use for running the compiler here) |
1591 dnl and REAL_CFLAGS (which we use for real compilation). | |
1592 dnl The two are the same except on a few systems, where they are made | |
1593 dnl different to work around various lossages. For example, | |
1594 dnl GCC 2.5 on Linux needs them to be different because it treats -g | |
1595 dnl as implying static linking. | |
1596 | |
1597 dnl If the CFLAGS env var is specified, we use that value | |
1598 dnl instead of the default. | |
1599 | |
1600 dnl It is not important that this name contain the PID; you cannot run | |
1601 dnl two configures in the same directory and have anything work | |
1602 dnl anyway. | |
1603 tempcname="conftest.c" | |
1604 | |
1605 dnl CPP_to_sh(CPP_SYMBOL, SH_VAR, DEFAULT_VALUE) | |
1606 define([CPP_to_sh], | |
1607 [[#]ifndef [$1] | |
1608 [#]define [$1] [$3] | |
1609 [#]endif | |
1610 configure___ [$2]=[$1] | |
1547 ]) | 1611 ]) |
1548 ifelse([$3], , , [else | 1612 |
1549 rm -rf conftest* | 1613 dnl CPP_boolean_to_sh(CPP_SYMBOL, SH_VAR) |
1550 $3 | 1614 define([CPP_boolean_to_sh], |
1551 ])dnl | 1615 [[#]ifdef [$1] |
1552 fi | 1616 configure___ [$2]=yes |
1553 rm -f conftest*])dnl | 1617 [#]else |
1554 dnl | 1618 configure___ [$2]=no |
1555 dnl Second, a macro of our own: | 1619 [#]endif |
1556 dnl Subroutine to find version of X being used | 1620 ]) |
1557 dnl It can't use xmkmf because the first version in the user's path | 1621 |
1558 dnl may not belong to the version of X that is being built with | 1622 |
1559 define(AC_FIND_X_VERSION, | 1623 echo ' |
1560 [AC_CHECKING(the version of X11 being used) | 1624 #define NOT_C_CODE |
1561 cat > conftest.${ac_ext} <<EOF | 1625 #define C_SWITCH_SITE |
1562 #include <X11/Intrinsic.h> | 1626 #define C_SWITCH_X_SITE |
1563 int main() { | 1627 #define LD_SWITCH_SITE |
1564 #if (XlibSpecificationRelease == 4) | 1628 #define LD_SWITCH_X_SITE |
1565 printf ("X11R4\n"); | 1629 #define LD_SWITCH_X_SITE_AUX |
1566 #elif (XlibSpecificationRelease == 5) | 1630 #include "'$srcdir'/src/'$opsysfile'" |
1567 printf ("X11R5\n"); | 1631 #include "'$srcdir'/src/'$machfile'" |
1568 #elif (XlibSpecificationRelease == 6) | 1632 |
1569 printf ("X11R6\n"); | 1633 CPP_to_sh(LIBS_MACHINE, libs_machine) |
1570 #elif (XtSpecificationRelease == 4) | 1634 CPP_to_sh(LIBS_SYSTEM, libs_system) |
1571 printf ("X11R4\n"); | 1635 CPP_to_sh(LIBS_TERMCAP, libs_termcap) |
1636 CPP_to_sh(LIB_STANDARD, libs_standard) | |
1637 CPP_to_sh(C_SWITCH_SYSTEM, c_switch_system) | |
1638 CPP_to_sh(C_SWITCH_MACHINE, c_switch_machine) | |
1639 CPP_to_sh(C_SWITCH_X_SYSTEM, c_switch_x_system) | |
1640 CPP_to_sh(LD_SWITCH_X_SYSTEM, ld_switch_x_system) | |
1641 CPP_to_sh(LD_SWITCH_SYSTEM, ld_switch_system) | |
1642 CPP_to_sh(UNEXEC, unexec, unexec.o) | |
1643 CPP_to_sh(C_DEBUG_SWITCH, c_debug_switch, -g) | |
1644 CPP_to_sh(C_OPTIMIZE_SWITCH, c_optimize_switch, -O) | |
1645 | |
1646 CPP_boolean_to_sh(SYSTEM_MALLOC, system_malloc) | |
1647 CPP_boolean_to_sh(TERMINFO, have_terminfo) | |
1648 CPP_boolean_to_sh(MAIL_USE_FLOCK, mail_use_flock) | |
1649 CPP_boolean_to_sh(MAIL_USE_LOCKF, mail_use_lockf) | |
1650 CPP_boolean_to_sh(__SUNPRO_C, sunpro_c) | |
1651 | |
1652 #ifdef THIS_IS_CONFIGURE | |
1653 | |
1654 /* Get the CFLAGS for tests in configure. */ | |
1655 #ifdef __GNUC__ | |
1656 configure___ CFLAGS=C_DEBUG_SWITCH C_OPTIMIZE_SWITCH '$SPECIFIED_CFLAGS' | |
1657 #else | |
1658 configure___ CFLAGS=C_DEBUG_SWITCH '$SPECIFIED_CFLAGS' | |
1572 #endif | 1659 #endif |
1573 return 0; | 1660 |
1574 } | 1661 #else /* not THIS_IS_CONFIGURE */ |
1575 EOF | 1662 |
1576 dnl We need to run this which will prevent cross-configuring. But since | 1663 /* Get the CFLAGS for real compilation. */ |
1577 dnl we can't do that anyhow, oh darn. | 1664 #ifdef __GNUC__ |
1578 ac_save_LIBS="${LIBS}" | 1665 configure___ REAL_CFLAGS=C_DEBUG_SWITCH C_OPTIMIZE_SWITCH '$SPECIFIED_CFLAGS' |
1579 LIBS="${LIBS} ${DEFS}" | 1666 #else |
1580 if eval $ac_compile; then | 1667 configure___ REAL_CFLAGS=C_DEBUG_SWITCH '$SPECIFIED_CFLAGS' |
1581 case "`./conftest`" in | 1668 #endif |
1582 X11R4 ) AC_DEFINE(THIS_IS_X11R4) ;; | 1669 |
1583 X11R5 ) AC_DEFINE(THIS_IS_X11R5) ;; | 1670 #endif /* not THIS_IS_CONFIGURE */ |
1584 X11R6 ) AC_DEFINE(THIS_IS_X11R6) ;; | 1671 ' > $tempcname |
1585 esac | 1672 dnl The value of CPP is a quoted variable reference, so we need to do this |
1586 fi | 1673 dnl to get its actual value... |
1587 LIBS=$ac_save_LIBS | 1674 CPP=`eval "echo $CPP"` |
1588 rm -f conftest*] | 1675 eval `$CPP -Isrc $tempcname \ |
1589 )dnl | 1676 | grep 'configure___' \ |
1590 dnl ----------------------------------------------------------------------- | 1677 | sed -n -e 's/^configure___ \([[^=]]*=\)\(.*\)$/\1"\2"/p'` |
1591 AC_LANG_C | 1678 if test -z "$SPECIFIED_CFLAGS"; then |
1592 AC_PREPARE(lisp) | 1679 eval `$CPP -Isrc -DTHIS_IS_CONFIGURE $tempcname \ |
1593 AC_CONFIG_HEADER(src/config.h) | 1680 | grep 'configure___' \ |
1594 | 1681 | sed -n -e 's/^configure___ \([[^=]]*=\)\(.*\)$/\1"\2"/p'` |
1595 if test "${extra_verbose}" = "yes" ; then | |
1596 # This is identical to the version that A\C_LANG_C generates except that | |
1597 # it omits the redirection of all output to /dev/null. | |
1598 ac_compile='${CC-cc} $CFLAGS $LDFLAGS conftest.${ac_ext} -o conftest $LIBS' | |
1599 fi | |
1600 | |
1601 #### Choose a compiler. | |
1602 if test "x$CC" = x ; then | |
1603 cc_specified=1 | |
1604 fi | |
1605 | |
1606 # Save the value of CFLAGS that the user specified. | |
1607 SPECIFIED_CFLAGS="$CFLAGS" | |
1608 | |
1609 if test "${with_gcc}" = "yes" ; then | |
1610 CC="${compiler-gcc}" | |
1611 GCC=1 | |
1612 elif test "${with_lcc}" = "yes" ; then | |
1613 CC="${compiler-lcc}" | |
1614 dash_r_space=' ' # this bullshit is here because lcc for solaris | |
1615 # will not accept -Rargument. | |
1616 # It needs -R argument instead. Yuck yuck yuck. | |
1617 test -z "$NON_GNU_CPP" && NON_GNU_CPP="yes" # this is handled specially below... | |
1618 elif test "${compiler}" != "" ; then CC="${compiler}" | |
1619 elif test "${with_gcc}" = "no" ; then CC="cc" | |
1620 elif test "${with_lcc}" = "no" ; then | |
1621 test -z "$CC" && CC=cc | |
1622 else | 1682 else |
1623 case "${canonical}" in | 1683 REAL_CFLAGS="$CFLAGS" |
1624 * ) | 1684 fi |
1625 AC_PROG_CC | 1685 rm $tempcname |
1626 if test "${CC}" = "gcc" ; then | 1686 |
1627 with_gcc="yes" | 1687 dnl override CFLAGS if user wishes |
1628 GCC=1 | 1688 if test "$cflags" != "NO_CFLAGS_DEFINED" ; then |
1629 fi | 1689 REAL_CFLAGS=$cflags |
1630 ;; | 1690 fi |
1631 esac | 1691 |
1632 fi | 1692 dnl Compute the unexec source name from the object name. |
1633 | 1693 UNEXEC_SRC="`echo $unexec | sed 's/\.o/.c/'`" |
1634 #### Some systems specify a CPP to use unless we are using GCC. | 1694 |
1635 #### Now that we know whether we are using GCC, we can decide whether | 1695 dnl Do the opsystem or machine files prohibit the use of the GNU malloc? |
1636 #### to use that one. | 1696 dnl Assume not, until told otherwise. |
1637 if test "x$NON_GNU_CPP" = x -o x$GCC = x1 | 1697 GNU_MALLOC=yes |
1638 then true | 1698 if test "$system_malloc" = "yes" ; then |
1639 else | 1699 GNU_MALLOC=no |
1640 if test "x$CPP" = x ; then | 1700 GNU_MALLOC_reason=" |
1641 if test "${with_lcc}" = "yes" -a "${NON_GNU_CPP}" = "yes"; then | 1701 (The GNU allocators don't work with this system configuration.)" |
1642 CPP='gcc -E -traditional' # cross fingers and hope it's there.... | 1702 elif test "$use_system_malloc" = "yes" ; then |
1643 else | 1703 GNU_MALLOC=no |
1644 CPP="$NON_GNU_CPP" | 1704 GNU_MALLOC_reason=" |
1645 fi | 1705 (User chose not to use GNU allocators.)" |
1646 fi | 1706 fi |
1647 fi | 1707 |
1648 | 1708 dnl ----------------------------------- |
1649 #### Some systems specify a CC to use unless we are using GCC. | 1709 dnl Do some misc autoconf-special tests |
1650 #### Now that we know whether we are using GCC, we can decide whether | 1710 dnl ----------------------------------- |
1651 #### to use that one. | 1711 |
1652 if test "x$NON_GNU_CC" = x -o x$GCC = x1 -o x$cc_specified = x1 | 1712 dnl Some other nice autoconf tests. If you add a test here which |
1653 then true | 1713 dnl should make an entry in src/config.h, do not forget to add an |
1654 else | 1714 dnl #undef clause to src/config.h.in for autoconf to modify. |
1655 CC="$NON_GNU_CC" | |
1656 fi | |
1657 | |
1658 ## Huh? I commented out the following because it always enabled | |
1659 ## the "test" options, whatever the hell those are supposed to be | |
1660 ## for, and the result is that SunOS builds were always static. | |
1661 | |
1662 # test x$GCC = x1 -a "x$GCC_TEST_OPTIONS" != x && CC="$CC $GCC_TEST_OPTIONS" | |
1663 # test x$GCC = x -a "x$NON_GCC_TEST_OPTIONS" != x && CC="$CC $NON_GCC_TEST_OPTIONS" | |
1664 | |
1665 ############################################################################ | |
1666 # # | |
1667 # Do some misc autoconf-special tests # | |
1668 # # | |
1669 ############################################################################ | |
1670 | |
1671 #### Some other nice autoconf tests. If you add a test here which | |
1672 #### should make an entry in src/config.h, don't forget to add an | |
1673 #### #undef clause to src/config.h.in for autoconf to modify. | |
1674 dnl checks for programs | |
1675 AC_PROG_CPP | |
1676 | |
1677 case "${canonical}" in | |
1678 *-sun-sunos* ) | |
1679 if test "${CPP}" = "acc -E" ; then | |
1680 CPP="acc -E -Xs" | |
1681 fi | |
1682 ;; | |
1683 esac | |
1684 | 1715 |
1685 AC_PROG_RANLIB | 1716 AC_PROG_RANLIB |
1686 AC_PROG_INSTALL | 1717 AC_PROG_INSTALL |
1687 AC_PROG_YACC | 1718 AC_PROG_YACC |
1688 | 1719 |
1689 dnl checks for UNIX variants | 1720 dnl checks for UNIX variants |
1690 AC_AIX | 1721 AC_AIX |
1691 | 1722 |
1692 dnl checks for header files | 1723 dnl checks for header files |
1693 AC_HAVE_HEADERS(mach/mach.h sys/stropts.h sys/timeb.h sys/time.h unistd.h) | 1724 AC_CHECK_HEADERS(mach/mach.h sys/stropts.h sys/timeb.h sys/time.h unistd.h) |
1694 AC_HAVE_HEADERS(utime.h sys/wait.h libintl.h locale.h libgen.h) | 1725 AC_CHECK_HEADERS(utime.h sys/wait.h libintl.h locale.h libgen.h) |
1695 AC_HAVE_HEADERS(linux/version.h kstat.h sys/pstat.h inttypes.h) | 1726 AC_CHECK_HEADERS(linux/version.h kstat.h sys/pstat.h inttypes.h) |
1696 AC_STDC_HEADERS | 1727 AC_HEADER_STDC |
1697 AC_TIME_WITH_SYS_TIME | 1728 AC_HEADER_TIME |
1698 AC_SYS_SIGLIST_DECLARED | 1729 AC_DECL_SYS_SIGLIST |
1699 | 1730 |
1700 dnl Some systems have utime.h but don't declare the struct anyplace. | 1731 dnl Some systems have utime.h but do not declare the struct anyplace. |
1701 AC_COMPILE_CHECK(struct utimbuf, | 1732 AC_MSG_CHECKING(for struct utimbuf) |
1702 [#ifdef TIME_WITH_SYS_TIME | 1733 AC_TRY_COMPILE([#ifdef TIME_WITH_SYS_TIME |
1703 #include <sys/time.h> | 1734 #include <sys/time.h> |
1704 #include <time.h> | 1735 #include <time.h> |
1705 #else | 1736 #else |
1706 #ifdef HAVE_SYS_TIME_H | 1737 #ifdef HAVE_SYS_TIME_H |
1707 #include <sys/time.h> | 1738 #include <sys/time.h> |
1710 #endif | 1741 #endif |
1711 #endif | 1742 #endif |
1712 #ifdef HAVE_UTIME_H | 1743 #ifdef HAVE_UTIME_H |
1713 #include <utime.h> | 1744 #include <utime.h> |
1714 #endif], [static struct utimbuf x; x.actime = x.modtime;], | 1745 #endif], [static struct utimbuf x; x.actime = x.modtime;], |
1715 AC_DEFINE(HAVE_STRUCT_UTIMBUF)) | 1746 [AC_MSG_RESULT(yes) |
1747 AC_DEFINE(HAVE_STRUCT_UTIMBUF)], | |
1748 AC_MSG_RESULT(no)) | |
1716 | 1749 |
1717 dnl checks for typedefs | 1750 dnl checks for typedefs |
1718 AC_RETSIGTYPE | 1751 AC_TYPE_SIGNAL |
1719 | 1752 |
1720 AC_COMPILE_CHECK(struct timeval, | 1753 AC_MSG_CHECKING(for struct timeval) |
1721 [#ifdef TIME_WITH_SYS_TIME | 1754 AC_TRY_COMPILE([#ifdef TIME_WITH_SYS_TIME |
1722 #include <sys/time.h> | 1755 #include <sys/time.h> |
1723 #include <time.h> | 1756 #include <time.h> |
1724 #else | 1757 #else |
1725 #ifdef HAVE_SYS_TIME_H | 1758 #ifdef HAVE_SYS_TIME_H |
1726 #include <sys/time.h> | 1759 #include <sys/time.h> |
1727 #else | 1760 #else |
1728 #include <time.h> | 1761 #include <time.h> |
1729 #endif | 1762 #endif |
1730 #endif], [static struct timeval x; x.tv_sec = x.tv_usec;], [ | 1763 #endif], [static struct timeval x; x.tv_sec = x.tv_usec;], |
1764 [AC_MSG_RESULT(yes) | |
1731 HAVE_TIMEVAL=yes | 1765 HAVE_TIMEVAL=yes |
1732 AC_DEFINE(HAVE_TIMEVAL)], | 1766 AC_DEFINE(HAVE_TIMEVAL)], |
1733 [HAVE_TIMEVAL=no]) | 1767 [AC_MSG_RESULT(no) |
1768 HAVE_TIMEVAL=no]) | |
1734 | 1769 |
1735 dnl checks for structure members | 1770 dnl checks for structure members |
1736 AC_STRUCT_TM | 1771 AC_STRUCT_TM |
1737 AC_TIMEZONE | 1772 AC_STRUCT_TIMEZONE |
1738 | 1773 |
1739 dnl checks for compiler characteristics | 1774 dnl checks for compiler characteristics |
1740 AC_CONST | 1775 AC_C_CONST |
1741 | 1776 |
1742 dnl check for Make feature | 1777 dnl check for Make feature |
1743 AC_SET_MAKE | 1778 AC_PROG_MAKE_SET |
1744 | 1779 |
1745 dnl check byte order | 1780 dnl check byte order |
1746 AC_WORDS_BIGENDIAN | 1781 AC_C_BIGENDIAN |
1747 | 1782 |
1748 dnl check for long file names | 1783 dnl check for long file names |
1749 AC_LONG_FILE_NAMES | 1784 AC_SYS_LONG_FILE_NAMES |
1750 | 1785 |
1751 echo "checking for -xildoff compiler flag" | 1786 dnl other checks for UNIX variants |
1752 if ${CC-cc} '-###' -xildon no_such_file.c 2>&1 | grep '^[^ ]*/ild ' > /dev/null ; then | 1787 |
1753 if ${CC-cc} '-###' -xildoff no_such_file.c 2>&1 | grep '^[^ ]*/ild ' > /dev/null ; then | 1788 dnl -lm might be required for some X libraries to link with later |
1754 : | 1789 AC_CHECK_LIB(m, sqrt) |
1790 | |
1791 dnl Determine type of mail locking from configure args and s&m headers | |
1792 AC_CHECKING(type of mail spool file locking) | |
1793 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 | |
1795 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) | |
1797 fi | |
1798 | |
1799 dnl Dynodump | |
1800 if test "$need_dynodump" = "yes" ; then | |
1801 AC_DEFINE(DYNODUMP) | |
1802 MAKE_SUBDIR="$MAKE_SUBDIR dynodump" | |
1803 case "$canonical" in | |
1804 sparc* ) dynodump_arch=sparc ;; | |
1805 powerpc* ) dynodump_arch=ppc ;; | |
1806 i*86* ) dynodump_arch=i386 ;; | |
1807 esac | |
1808 dnl Dynodump requires the system linker | |
1809 test "$GCC" = "yes" && ld_switch_site="-fno-gnu-linker $ld_switch_site" | |
1810 fi | |
1811 | |
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 | |
1817 dnl ---------------------- | |
1818 dnl Choose a window system | |
1819 dnl ---------------------- | |
1820 | |
1821 AC_CHECKING("for specified window system") | |
1822 | |
1823 dnl $OPENWINHOME implies --x-includes and --x-libraries | |
1824 dnl Not (yet) handled by autoconf2 | |
1825 if test "$x_includes $x_libraries" = "NONE NONE"; then | |
1826 if test -n "$OPENWINHOME" \ | |
1827 -a "$OPENWINHOME" != "/usr/openwin" \ | |
1828 -a -d "$OPENWINHOME"; then | |
1829 test -d "$OPENWINHOME/lib" && x_libraries="$OPENWINHOME/lib" | |
1830 test -d "$OPENWINHOME/include" && x_includes="$OPENWINHOME/include" | |
1831 test -d "$OPENWINHOME/share/include" && x_includes="$OPENWINHOME/share/include" | |
1832 fi | |
1833 fi | |
1834 | |
1835 dnl --x-includes or --x-libraries implies --with-x11. | |
1836 test "$x_includes $x_libraries" != "NONE NONE" && \ | |
1837 window_system=x11 with_x11=yes | |
1838 | |
1839 if test "$with_x11" != "no"; then | |
1840 AC_PATH_XTRA # Autoconf claims to find X library and include dirs for us. | |
1841 if test "$no_x" = "yes" | |
1842 then with_x11=no window_system=none HAVE_X_WINDOWS=no | |
1843 else with_x11=yes window_system=x11 HAVE_X_WINDOWS=yes | |
1844 fi | |
1845 fi | |
1846 | |
1847 case "$with_x11" in | |
1848 yes ) window_system=x11 HAVE_X_WINDOWS=yes ;; | |
1849 no ) window_system=none HAVE_X_WINDOWS=no ;; | |
1850 esac | |
1851 | |
1852 if test "$with_x11" = "yes"; then | |
1853 AC_DEFINE(HAVE_X_WINDOWS) | |
1854 MAKE_SUBDIR="$MAKE_SUBDIR lwlib" | |
1855 | |
1856 dnl Try to find Motif/CDE/Tooltalk dirs | |
1857 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 | |
1859 inc_dir="`echo $lib_dir | sed 's/lib/include/'`" | |
1860 if test -d "$lib_dir" -a -d "$inc_dir"; then | |
1861 case "$x_libraries" in *"$lib_dir"* ) : ;; *) | |
1862 x_libraries="$lib_dir $x_libraries" X_LIBS="-L${lib_dir} $X_LIBS" | |
1863 esac | |
1864 case "$x_includes" in "$inc_dir"* ) : ;; *) | |
1865 x_includes="$inc_dir $x_includes" X_CFLAGS="-I${inc_dir} $X_CFLAGS" | |
1866 esac | |
1867 break; dnl only need ONE Motif implementation! | |
1868 fi | |
1869 done | |
1870 | |
1871 dnl Contrib X libs/includes do NOT take precedence, so AP-pend | |
1872 for rel in "X11R6" "X11R5" "X11R4"; do | |
1873 lib_dir="/usr/contrib/$rel/lib" inc_dir="/usr/contrib/$rel/include" | |
1874 if test -d "$lib_dir" -a -d "$inc_dir"; then | |
1875 case "$x_libraries" in *"$lib_dir"* ) : ;; *) | |
1876 x_libraries="$x_libraries $lib_dir" X_LIBS="$X_LIBS -L${lib_dir}" | |
1877 esac | |
1878 case "$x_includes" in "$inc_dir"* ) : ;; *) | |
1879 x_includes="$x_includes $inc_dir" X_CFLAGS="$X_CFLAGS -I${inc_dir}" | |
1880 esac | |
1881 break; dnl Only need ONE X11 implementation ! | |
1882 fi | |
1883 done | |
1884 | |
1885 ld_switch_x_site="$X_LIBS" | |
1886 | |
1887 if test "$extra_verbose" = "yes"; then | |
1888 echo; echo "X11 compilation variables:" | |
1889 PRINT_VAR(x_libraries, x_includes, X_CFLAGS, X_LIBS, X_PRE_LIBS, X_EXTRA_LIBS) | |
1890 echo | |
1891 fi | |
1892 | |
1893 dnl make sure we can find Intrinsic.h | |
1894 AC_CHECK_HEADER(X11/Intrinsic.h, , | |
1895 [AC_MSG_ERROR("Unable to find X11 header files.")]) | |
1896 | |
1897 dnl -lXt -lX11 are required | |
1898 dnl Some broken systems require the magic "-b i486-linuxaout" flag | |
1899 AC_CHECK_LIB(X11, XOpenDisplay, have_lib_x11=yes) | |
1900 if test "$have_lib_x11" != "yes"; then | |
1901 AC_CHECK_LIB(X11, XGetFontProperty, | |
1902 ld_switch_x_site="-b i486-linuxaout $ld_switch_x_site", | |
1903 [AC_MSG_ERROR("Unable to find X11 libraries.")], | |
1904 -b i486-linuxaout) | |
1905 fi | |
1906 libs_x="-lX11" | |
1907 | |
1908 case "$canonical" in *-sunos4.* ) # Bug workaround | |
1909 ld_switch_x_site="$ld_switch_x_site -u _XtToolkitInitialize" ;; | |
1910 esac | |
1911 AC_CHECK_LIB(Xt, XtOpenDisplay, libs_x="-lXt $libs_x", | |
1912 [AC_MSG_ERROR("Unable to find X11 libraries.")]) | |
1913 | |
1914 AC_MSG_CHECKING(the version of X11 being used) | |
1915 AC_TRY_RUN([#include <X11/Intrinsic.h> | |
1916 main(int c, char* v[]) { return c>1 ? XlibSpecificationRelease : 0; }], | |
1917 [./conftest foobar; rc=$?],[rc=4],[rc=4]) | |
1918 AC_MSG_RESULT(R${rc}) | |
1919 AC_DEFINE_UNQUOTED(THIS_IS_X11R${rc}) | |
1920 | |
1921 AC_CHECK_HEADERS(X11/Xlocale.h) | |
1922 | |
1923 dnl remove this - we should avoid checking for specific OS | |
1924 AC_MSG_CHECKING(for XFree86) | |
1925 if test -d "/usr/X386/include" -o \ | |
1926 -f "/etc/XF86Config" -o \ | |
1927 -f "/etc/X11/XF86Config" -o \ | |
1928 -f "/usr/X11R6/lib/X11/XF86Config"; then | |
1929 AC_MSG_RESULT(yes) | |
1930 AC_DEFINE(HAVE_XFREE386) | |
1755 else | 1931 else |
1756 AC_VERBOSE(defining NEED_XILDOFF) | 1932 AC_MSG_RESULT(no) |
1757 need_xildoff=yes | |
1758 fi | 1933 fi |
1759 fi | 1934 |
1760 | 1935 dnl Autodetect -lXext |
1761 dnl other checks for UNIX variants | 1936 AC_CHECK_LIB(Xext, XShapeSelectInput, libs_x="-lXext $libs_x") |
1762 # What the hell was this doing here?????? | 1937 |
1763 ### echo > confdefs.h # this gets nuked above... | 1938 dnl autodetect -lXmu |
1764 | 1939 case "$canonical" in *-sunos4.* ) # Bug workaround |
1765 ############################################################################ | 1940 ld_switch_x_site="$ld_switch_x_site -u _get_applicationShellWidgetClass" ;; |
1766 # # | 1941 esac |
1767 # Choose a window system # | 1942 if test -z "$with_xmu"; then |
1768 # # | 1943 AC_CHECK_LIB(Xmu, XmuConvertStandardSelection, with_xmu=yes, with_xmu=no) |
1769 ############################################################################ | 1944 fi |
1770 | 1945 if test "$with_xmu" = "no"; then |
1771 #### Choose a window system. | 1946 extra_objs="$extra_objs xmu.o" |
1772 echo "checking for specified window system" | 1947 else |
1773 | 1948 libs_x="-lXmu $libs_x" |
1774 window_system='' | 1949 fi |
1775 case "${with_x11}" in | 1950 |
1776 yes ) window_system=${window_system}x11 ;; | 1951 dnl Autodetect -lXbsd |
1777 no ) window_system=${window_system}none ;; | 1952 dnl #### Someone, please add a better function than main |
1778 esac | 1953 AC_CHECK_LIB(Xbsd, main, libs_x="-lXbsd $libs_x") |
1779 | 1954 |
1780 case "${window_system}" in | 1955 dnl autodetect Motif - but only add to libs_x later (if necessary) |
1781 "none" | "x11" ) ;; | 1956 AC_CHECK_HEADER(Xm/Xm.h, |
1782 "" ) | 1957 [AC_CHECK_LIB(Xm, XmStringFree, have_motif=yes, have_motif=no)], |
1783 # --x-includes or --x-libraries implies --with-x11. | 1958 have_motif=no) |
1784 if test -n "${x_includes}" -o -n "${x_libraries}"; then | 1959 |
1785 window_system=x11 | 1960 dnl Autodetect -lXaw |
1786 else | 1961 AC_CHECK_LIB(Xaw, XawScrollbarSetThumb, have_xaw=yes, have_xaw=no) |
1787 echo " No window system specified. Looking for X11." | 1962 |
1788 # If the user didn't specify a window system and we found X11, use it. | 1963 fi dnl $with_x11 = yes |
1789 if test -r /usr/lib/libX11.a \ | 1964 |
1790 -o -d /usr/include/X11 \ | 1965 test -z "$window_system" && window_system="none" |
1791 -o -d /usr/X386/include \ | 1966 |
1792 -o -d /usr/X11R6/include \ | 1967 if test "$window_system" = "none" ; then |
1793 -o -d ${x_includes}/X11 ; then | 1968 if test "$with_tty" = "no" ; then |
1794 window_system=x11 | 1969 AC_MSG_ERROR([No window system support and no TTY support - Unable to proceed.]) |
1795 fi | 1970 fi |
1971 for feature in tooltalk cde offix \ | |
1972 menubars scrollbars toolbars dialogs xim xmu \ | |
1973 tiff png jpeg gif compface xpm | |
1974 do | |
1975 if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then | |
1976 AC_MSG_WARN([--with-$feature ignored: Not valid without X support]) | |
1796 fi | 1977 fi |
1797 ;; | 1978 eval "with_${feature}=no" |
1798 * ) | |
1799 echo "Don't specify a window system more than once." >&2 | |
1800 exit 1 | |
1801 ;; | |
1802 esac | |
1803 | |
1804 case "${window_system}" in "" | "x11" ) | |
1805 ### If the user hasn't specified where we should find X, try | |
1806 ### letting autoconf figure that out. | |
1807 if test -z "${x_includes}${x_libraries}" ; then | |
1808 AC_FIND_X | |
1809 fi | |
1810 if test -n "${x_includes}${x_libraries}" ; then window_system=x11 ; fi | |
1811 ;; | |
1812 esac | |
1813 | |
1814 test -z "${window_system}" && window_system="none" | |
1815 | |
1816 if test "${window_system}" = "none" ; then | |
1817 if test "${with_tty}" != "yes" ; then | |
1818 echo "No window system support, and no TTY support." >&2 | |
1819 echo "Unable to proceed." >&2 | |
1820 exit 1 | |
1821 fi | |
1822 for feature in cde offix menubars scrollbars toolbars dialogs xim tiff | |
1823 do | |
1824 if eval "test -n \"\$with_$feature\" -a \"\$with_$feature\" != no" ; then | |
1825 AC_WARN(--with-$feature ignored: Not valid without X support) | |
1826 fi | |
1827 eval "with_$feature=no" | |
1828 done | 1979 done |
1829 elif test -z "${with_toolbars}" ; then | 1980 else |
1830 with_toolbars='yes' | 1981 test -z "$with_toolbars" && with_toolbars=yes |
1831 fi | 1982 fi |
1832 | 1983 |
1984 if false; then # obsolete | |
1833 runtime_arg="-R${dash_r_space}" | 1985 runtime_arg="-R${dash_r_space}" |
1834 | 1986 |
1835 case "${canonical}" in | 1987 case "$canonical" in |
1836 *-sun-solaris* | *-sun-sunos5* ) | 1988 *-sun-solaris* | *-sun-sunos5* ) |
1837 add_runtime_flag=yes ;; | 1989 add_runtime_flag=yes ;; |
1838 *-sgi-irix5.* ) | 1990 *-sgi-irix5.* ) |
1839 # In the IRIX 5.3 ld, only the last -rpath arg has any effect. This is | 1991 dnl In the IRIX 5.3 ld, only the last -rpath arg has any effect. This is |
1840 # fundamentaly incompatible with having separate LD_SWITCH_X_SITE | 1992 dnl fundamentaly incompatible with having separate LD_SWITCH_X_SITE |
1841 # and LD_SWITCH_SITE variables. Fortunately, SGI fixed this by 6.2. | 1993 dnl and LD_SWITCH_SITE variables. Fortunately, SGI fixed this by 6.2. |
1842 if test -n "${x_libraries}" || test -n "${site_runtime_libraries}" ; then | 1994 if test -n "$x_libraries" || test -n "$site_runtime_libraries" ; then |
1843 (echo "WARNING: The IRIX 5 ld ignores all but the last -rpath argument,"; | 1995 (echo "WARNING: The IRIX 5 ld ignores all but the last -rpath argument,"; |
1844 echo " so if you need to specify more than one additional"; | 1996 echo " so if you need to specify more than one additional"; |
1845 echo " runtime library directory, you will have to do so"; | 1997 echo " runtime library directory, you will have to do so"; |
1846 echo " manually by setting the environment variable"; | 1998 echo " manually by setting the environment variable"; |
1847 echo " LD_SWITCH_SITE to '-rpath <path>' before running"; | 1999 echo " LD_SWITCH_SITE to '-rpath <path>' before running"; |
1848 echo " configure. If you have only one additional directory," | 2000 echo " configure. If you have only one additional directory," |
1849 echo " you can specify it with --site-runtime-libraries.") >&2 | 2001 echo " you can specify it with --site-runtime-libraries.") >&2 |
1850 fi | 2002 fi |
1851 runtime_arg="-rpath " ;; | 2003 runtime_arg="-rpath " ;; |
1852 *-sgi-irix* ) | 2004 *-sgi-irix* ) |
1853 # Note that IRIX gcc (as of 2.7.2) doesn't accept -rpath, so | 2005 dnl Note that IRIX gcc (as of 2.7.2) does not accept -rpath, so |
1854 # using it can cause trouble. Specifying --use-gcc=no will work | 2006 dnl using it can cause trouble. Specifying --use-gcc=no will work |
1855 # around this, but the real problem is that configure uses $LDFLAGS | 2007 dnl around this, but the real problem is that configure uses $LDFLAGS |
1856 # as arguments to $(CC), instead of using prefix-args like the | 2008 dnl as arguments to $(CC), instead of using prefix-args like the |
1857 # src/Makefile does. | 2009 dnl src/Makefile does. |
1858 add_runtime_flag=yes; | 2010 add_runtime_flag=yes; |
1859 runtime_arg="-rpath " ;; | 2011 runtime_arg="-rpath " ;; |
1860 esac | 2012 esac |
1861 | 2013 fi |
1862 if test -n "${x_libraries}" ; then | 2014 |
1863 if test "${add_runtime_flag}" = "yes" ; then | 2015 dnl --site-libraries (multiple dirs) |
1864 LD_SWITCH_X_SITE="-L${x_libraries} ${runtime_arg}${x_libraries}" | 2016 if test -n "$site_libraries"; then |
1865 else | 2017 for arg in $site_libraries; do |
1866 LD_SWITCH_X_SITE="-L${x_libraries}" | 2018 test -d "$arg" && arg="-L${arg}" |
1867 fi | 2019 ld_switch_site="$ld_switch_site $arg" |
1868 fi | |
1869 # LD_SWITCH_X_SITE_AUX (from FSF) is ill-conceived. See s/sol2*.h. | |
1870 # test -n "${x_libraries}" -a LD_SWITCH_X_SITE_AUX="-R${x_libraries}" | |
1871 test -n "${x_includes}" && C_SWITCH_X_SITE="-I${x_includes}" | |
1872 | |
1873 if test -n "${site_libraries}" ; then | |
1874 for arg in ${site_libraries} | |
1875 do | |
1876 LD_SWITCH_SITE="${LD_SWITCH_SITE} -L${arg}" | |
1877 done | 2020 done |
1878 fi | 2021 fi |
1879 if test -n "${site_runtime_libraries}" ; then | 2022 |
1880 for arg in ${site_runtime_libraries} | 2023 dnl --site-runtime-libraries (multiple dirs) |
1881 do | 2024 if test -n "$site_runtime_libraries" ; then |
1882 LD_SWITCH_SITE="${LD_SWITCH_SITE} -L${arg}" | 2025 LD_RUN_PATH="`echo $site_runtime_libraries | sed 's/ */:/'`" |
1883 LD_SWITCH_SITE="${LD_SWITCH_SITE} ${runtime_arg}${arg}" | 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" | |
1884 done | 2034 done |
1885 fi | 2035 fi |
1886 if test -n "${site_includes}" ; then | 2036 |
1887 for arg in ${site_includes} | 2037 |
1888 do | 2038 dnl FSF 19.29 has some bitmapdir stuff here. |
1889 C_SWITCH_SITE="${C_SWITCH_SITE} -I${arg}" | |
1890 CPP="${CPP} -I${arg}" | |
1891 done | |
1892 fi | |
1893 | |
1894 # FSF 19.29 has some bitmapdir stuff here. | |
1895 bitmapdir= | 2039 bitmapdir= |
1896 | 2040 |
1897 # Avoid forcing the search of /usr/include before fixed include files. | 2041 case "$window_system" in |
1898 test "$C_SWITCH_X_SITE" = "-I/usr/include" && C_SWITCH_X_SITE=" " | |
1899 | |
1900 # Need for check for audio/Xtutil.h. | |
1901 CPP="${CPP} ${C_SWITCH_X_SITE}" | |
1902 | |
1903 case "${window_system}" in | |
1904 x11 ) HAVE_X_WINDOWS=yes; echo " Using X11." ;; | 2042 x11 ) HAVE_X_WINDOWS=yes; echo " Using X11." ;; |
1905 none ) HAVE_X_WINDOWS=no ; echo " Using no window system." ;; | 2043 none ) HAVE_X_WINDOWS=no ; echo " Using no window system." ;; |
1906 esac | 2044 esac |
1907 | 2045 |
1908 if test "${opsys}" = "hpux9"; then | 2046 case "$x_libraries" in *X11R4* ) |
1909 case "${x_libraries}" in | 2047 test "$opsys" = "hpux9" && opsysfile="s/hpux9-x11r4.h" |
1910 *X11R4* ) opsysfile="s/hpux9-x11r4.h" ;; | 2048 test "$opsys" = "hpux9-shr" && opsysfile="s/hpux9shxr4.h" |
2049 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 | |
2073 dnl Autodetect Xauth | |
2074 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) } | |
2076 test -z "$with_xauth" && { AC_CHECK_LIB(Xau, XauGetAuthByAddr,[:],with_xauth=no) } | |
2077 test -z "$with_xauth" && with_xauth=yes | |
2078 if test "$with_xauth" = "yes"; then | |
2079 AC_DEFINE(HAVE_XAUTH) | |
2080 libs_x="-lXau $libs_x" | |
2081 fi | |
2082 | |
2083 dnl Autodetect OffiX | |
2084 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) } | |
2086 test -z "$with_offix" && with_offix=yes | |
2087 if test "$with_offix" = "yes"; then | |
2088 AC_DEFINE(HAVE_OFFIX_DND) | |
2089 libs_x="-lDnd $libs_x" | |
2090 fi | |
2091 | |
2092 dnl Autodetect tooltalk | |
2093 test "$with_cde" = "yes" && with_tooltalk=yes # CDE requires tooltalk | |
2094 if test "$with_tooltalk" != "no" ; then | |
2095 dnl autodetect the location of tt_c.h | |
2096 dnl tt_c.h might be in Tt or desktop include directories | |
2097 for dir in "" "Tt/" "desktop/" ; do | |
2098 AC_CHECK_HEADER(${dir}tt_c.h, tt_c_h_path="${dir}tt_c.h" && break) | |
2099 done | |
2100 test -z "$tt_c_h_path" && with_tooltalk=no | |
2101 fi | |
2102 if test "$with_tooltalk" != "no" ; then | |
2103 for extra_libs in "" "-lI18N -lce" "-lcxx"; do | |
2104 AC_CHECK_LIB(tt, tt_message_create, | |
2105 with_tooltalk=yes tt_libs="-ltt $extra_libs"; break, [:],$extra_libs) | |
2106 done | |
2107 fi | |
2108 test -z "$with_tooltalk" && with_tooltalk=no | |
2109 if test "$with_tooltalk" = "yes"; then | |
2110 AC_DEFINE(TOOLTALK) | |
2111 AC_DEFINE_UNQUOTED(TT_C_H_PATH, "$tt_c_h_path") | |
2112 libs_x="$tt_libs $libs_x" | |
2113 extra_objs="$extra_objs tooltalk.o" | |
2114 fi | |
2115 | |
2116 dnl Autodetect CDE | |
2117 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) } | |
2119 test -z "$with_cde" && with_cde=yes | |
2120 if test "$with_cde" = "yes" ; then | |
2121 AC_DEFINE(HAVE_CDE) | |
2122 libs_x="-lDtSvc $libs_x" | |
2123 with_tooltalk=yes # CDE requires Tooltalk | |
2124 with_motif=yes # CDE requires Motif | |
2125 fi | |
2126 | |
2127 dnl if Energize specified, make sure we can find its need libraries/headers | |
2128 if test "$with_energize" = "yes" ; then | |
2129 AC_DEFINE(ENERGIZE) | |
2130 AC_CHECK_LIB(energize, main, [ | |
2131 LIBS="$LIBS -lenergize" | |
2132 energize_version="3.X" | |
2133 AC_DEFINE(ENERGIZE_3)]) | |
2134 if test -z "$energize_version"; then | |
2135 AC_CHECK_LIB(conn, main, [ | |
2136 LIBS="$LIBS -lconn" | |
2137 energize_version="2.X" | |
2138 AC_DEFINE(ENERGIZE_2)], | |
2139 [AC_MSG_ERROR(Unable to find Energize library.)]) | |
2140 fi | |
2141 AC_CHECK_HEADER(editorconn.h, , | |
2142 [AC_MSG_ERROR(Unable to find Energize editorconn.h header file.)]) | |
2143 | |
2144 test "$energize_version" = "2.X" && AC_DEFINE(ENERGIZE_2) | |
2145 test "$energize_version" = "3.X" && AC_DEFINE(ENERGIZE_3) | |
2146 fi | |
2147 | |
2148 dnl ------------------ | |
2149 dnl Graphics libraries | |
2150 dnl ------------------ | |
2151 | |
2152 AC_CHECKING(for graphics libraries) | |
2153 dnl Built-in GIF support defaults to yes | |
2154 test -z "$with_gif" && with_gif=yes; | |
2155 if test "$with_gif" = "yes"; then | |
2156 AC_DEFINE(HAVE_GIF) | |
2157 extra_objs="$extra_objs dgif_lib.o gif_err.o gifalloc.o" | |
2158 fi | |
2159 | |
2160 dnl Autodetect Xpm | |
2161 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) } | |
2163 test -z "$with_xpm" && with_xpm=yes | |
2164 if test "$with_xpm" = "yes"; then | |
2165 AC_DEFINE(HAVE_XPM) | |
2166 libs_x="-lXpm $libs_x" | |
2167 fi | |
2168 | |
2169 dnl Autodetect XFACE | |
2170 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) } | |
2172 test -z "$with_xface" && with_xface=yes | |
2173 if test "$with_xface" = "yes"; then | |
2174 AC_DEFINE(HAVE_XFACE) | |
2175 libs_x="-lcompface $libs_x" | |
2176 fi | |
2177 | |
2178 dnl autodetect JPEG | |
2179 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) } | |
2181 test -z "$with_jpeg" && with_jpeg=yes | |
2182 if test "$with_jpeg" = "yes"; then | |
2183 AC_DEFINE(HAVE_JPEG) | |
2184 libs_x="-ljpeg $libs_x" | |
2185 fi | |
2186 | |
2187 dnl autodetect PNG | |
2188 test -z "$with_png" && { AC_CHECK_HEADER(png.h, , with_png=no) } | |
2189 test -z "$with_png" && { AC_CHECK_FUNC(pow, , with_png=no) } | |
2190 if test "$with_png" != "no"; then | |
2191 for extra_libs in "" "-lz" "-lgz"; do | |
2192 AC_CHECK_LIB(png, png_read_image, | |
2193 png_libs="-lpng $extra_libs" with_png=yes; break,[:],$extra_libs) | |
2194 done | |
2195 fi | |
2196 test -z "$with_png" && with_png=no | |
2197 if test "$with_png" = "yes"; then | |
2198 AC_DEFINE(HAVE_PNG) | |
2199 libs_x="$png_libs $libs_x" | |
2200 fi | |
2201 | |
2202 dnl autodetect TIFF (not yet implemented) | |
2203 if test "$with_tiff" = "yes"; then | |
2204 AC_DEFINE(HAVE_TIFF) | |
2205 libs_x="-ltiff $libs_x" | |
2206 fi | |
2207 | |
2208 dnl Finish ensuring that we have values for the various toolkit items. | |
2209 dnl Not all toolkits support all widgets | |
2210 dnl if Motif is available we use it for the dialog boxes. | |
2211 | |
2212 case "$with_menubars" in "" | "yes" | "athena" ) | |
2213 with_menubars="lucid" ;; | |
2214 esac | |
2215 case "$with_dialogs" in "" | "yes" | "lucid" ) | |
2216 if test "$have_motif" = "yes"; then with_dialogs="motif" | |
2217 elif test "$have_xaw" = "yes"; then with_dialogs="athena" | |
2218 else with_dialogs=no | |
2219 fi ;; | |
2220 esac | |
2221 case "$with_scrollbars" in "" | "yes" ) | |
2222 with_scrollbars="lucid" ;; | |
2223 esac | |
2224 | |
2225 all_widgets="$with_menubars $with_scrollbars $with_dialogs $with_toolbars" | |
2226 | |
2227 case "$all_widgets" in *athena* ) | |
2228 AC_DEFINE(LWLIB_USES_ATHENA) | |
2229 libs_x="-lXaw $libs_x" ;; | |
2230 esac | |
2231 | |
2232 case "$all_widgets" in *motif* ) | |
2233 AC_DEFINE(LWLIB_USES_MOTIF) | |
2234 need_motif=yes ;; | |
2235 esac | |
2236 | |
2237 case "$with_scrollbars" in athena* ) AC_DEFINE(LWLIB_SCROLLBARS_ATHENA);; esac | |
2238 case "$with_dialogs" in athena* ) AC_DEFINE(LWLIB_DIALOGS_ATHENA) ;; esac | |
2239 test "$with_scrollbars" = "athena3d" && AC_DEFINE(LWLIB_SCROLLBARS_ATHENA3D) | |
2240 test "$with_dialogs" = "athena3d" && AC_DEFINE(LWLIB_DIALOGS_ATHENA3D) | |
2241 | |
2242 test "$with_menubars" != "no" && AC_DEFINE(HAVE_MENUBARS) | |
2243 test "$with_scrollbars" != "no" && AC_DEFINE(HAVE_SCROLLBARS) | |
2244 test "$with_dialogs" != "no" && AC_DEFINE(HAVE_DIALOGS) | |
2245 test "$with_toolbars" != "no" && AC_DEFINE(HAVE_TOOLBARS) | |
2246 | |
2247 test "$with_menubars" = "lucid" && AC_DEFINE(LWLIB_MENUBARS_LUCID) | |
2248 test "$with_scrollbars" = "lucid" && AC_DEFINE(LWLIB_SCROLLBARS_LUCID) | |
2249 | |
2250 test "$with_menubars" = "motif" && AC_DEFINE(LWLIB_MENUBARS_MOTIF) | |
2251 test "$with_scrollbars" = "motif" && AC_DEFINE(LWLIB_SCROLLBARS_MOTIF) | |
2252 test "$with_dialogs" = "motif" && AC_DEFINE(LWLIB_DIALOGS_MOTIF) | |
2253 | |
2254 test "$with_menubars" != "no" && extra_objs="$extra_objs menubar.o" | |
2255 test "$with_scrollbars" != "no" && extra_objs="$extra_objs scrollbar.o" | |
2256 test "$with_dialogs" != "no" && extra_objs="$extra_objs dialog.o" | |
2257 test "$with_toolbars" != "no" && extra_objs="$extra_objs toolbar.o" | |
2258 test "$all_widgets" != "no no no no" && extra_objs="$extra_objs gui.o" | |
2259 | |
2260 if test "$with_x11" = "yes"; then | |
2261 test "$with_menubars" != "no" && extra_objs="$extra_objs menubar-x.o" | |
2262 test "$with_scrollbars" != "no" && extra_objs="$extra_objs scrollbar-x.o" | |
2263 test "$with_dialogs" != "no" && extra_objs="$extra_objs dialog-x.o" | |
2264 test "$with_toolbars" != "no" && extra_objs="$extra_objs toolbar-x.o" | |
2265 test "$all_widgets" != "no no no no" && extra_objs="$extra_objs gui-x.o" | |
2266 fi | |
2267 | |
2268 dnl ------------------------ | |
2269 dnl Misc other feature tests | |
2270 dnl ------------------------ | |
2271 | |
2272 dnl Mule-dependent option processing | |
2273 test -z "$with_mule" && with_mule=no | |
2274 | |
2275 if test "$with_mule" = "yes" ; then | |
2276 AC_DEFINE(MULE) | |
2277 extra_objs="$extra_objs mule.o mule-ccl.o mule-charset.o mule-coding.o" | |
2278 | |
2279 dnl Use -lintl to get internationalized strerror for Mule | |
2280 AC_CHECK_LIB(intl, strerror) | |
2281 | |
2282 AC_CHECKING(for Mule input methods) | |
2283 dnl Do we have the XmIm* routines? And if so, do we want to use them? | |
2284 case "$with_xim" in "" | "yes" ) | |
2285 AC_CHECKING(for XIM) | |
2286 AC_CHECK_LIB(Xm, XmImMbLookupString, with_xim=motif, with_xim=xlib) | |
1911 esac | 2287 esac |
1912 fi | |
1913 | |
1914 if test "${opsys}" = "hpux9-shr"; then | |
1915 case "${x_libraries}" in | |
1916 *X11R4* ) opsysfile="s/hpux9shxr4.h" ;; | |
1917 esac | |
1918 fi | |
1919 | |
1920 ############################################################################ | |
1921 # # | |
1922 # Extract some information from the operating system and machine files # | |
1923 # # | |
1924 ############################################################################ | |
1925 | |
1926 echo "examining the machine- and system-dependent files to find out" | |
1927 echo " - which libraries the lib-src programs will want, and" | |
1928 echo " - whether the GNU malloc routines are usable." | |
1929 | |
1930 ### First figure out CFLAGS (which we use for running the compiler here) | |
1931 ### and REAL_CFLAGS (which we use for real compilation). | |
1932 ### The two are the same except on a few systems, where they are made | |
1933 ### different to work around various lossages. For example, | |
1934 ### GCC 2.5 on Linux needs them to be different because it treats -g | |
1935 ### as implying static linking. | |
1936 | |
1937 ### If the CFLAGS env var is specified, we use that value | |
1938 ### instead of the default. | |
1939 | |
1940 ### It's not important that this name contain the PID; you can't run | |
1941 ### two configures in the same directory and have anything work | |
1942 ### anyway. | |
1943 tempcname="conftest.c" | |
1944 | |
1945 echo ' | |
1946 #define NOT_C_CODE | |
1947 #include "'${srcdir}'/src/'${opsysfile}'" | |
1948 #include "'${srcdir}'/src/'${machfile}'" | |
1949 #ifndef LIBS_MACHINE | |
1950 #define LIBS_MACHINE | |
1951 #endif | |
1952 #ifndef LIBS_SYSTEM | |
1953 #define LIBS_SYSTEM | |
1954 #endif | |
1955 #ifndef C_SWITCH_SYSTEM | |
1956 #define C_SWITCH_SYSTEM | |
1957 #endif | |
1958 #ifndef C_SWITCH_X_SYSTEM | |
1959 #define C_SWITCH_X_SYSTEM | |
1960 #endif | |
1961 #ifndef C_SWITCH_MACHINE | |
1962 #define C_SWITCH_MACHINE | |
1963 #endif | |
1964 #ifndef LD_SWITCH_X_SYSTEM | |
1965 #define LD_SWITCH_X_SYSTEM | |
1966 #endif | |
1967 #ifndef LIB_STANDARD | |
1968 #define LIB_STANDARD | |
1969 #endif | |
1970 configure___ libsrc_libs=LIBS_MACHINE LIBS_SYSTEM LIB_STANDARD | |
1971 configure___ c_switch_system=C_SWITCH_SYSTEM | |
1972 configure___ c_switch_x_system=C_SWITCH_X_SYSTEM | |
1973 configure___ ld_switch_x_system=LD_SWITCH_X_SYSTEM | |
1974 configure___ c_switch_machine=C_SWITCH_MACHINE | |
1975 | |
1976 #ifndef LIB_X11_LIB | |
1977 #define LIB_X11_LIB -lX11 | |
1978 #endif | |
1979 | |
1980 #ifndef LIBX11_MACHINE | |
1981 #define LIBX11_MACHINE | |
1982 #endif | |
1983 | |
1984 #ifndef LIBX11_SYSTEM | |
1985 #define LIBX11_SYSTEM | |
1986 #endif | |
1987 configure___ LIBX=LIB_X11_LIB LIBX11_MACHINE LIBX11_SYSTEM | |
1988 | |
1989 #ifdef UNEXEC | |
1990 configure___ unexec=UNEXEC | |
1991 #else | |
1992 configure___ unexec=unexec.o | |
1993 #endif | |
1994 | |
1995 #ifdef SYSTEM_MALLOC | |
1996 configure___ system_malloc=yes | |
1997 #else | |
1998 configure___ system_malloc=no | |
1999 #endif | |
2000 | |
2001 #ifndef C_DEBUG_SWITCH | |
2002 #define C_DEBUG_SWITCH -g | |
2003 #endif | |
2004 | |
2005 #ifndef C_OPTIMIZE_SWITCH | |
2006 #define C_OPTIMIZE_SWITCH -O | |
2007 #endif | |
2008 | |
2009 #ifdef THIS_IS_CONFIGURE | |
2010 | |
2011 /* Get the CFLAGS for tests in configure. */ | |
2012 #ifdef __GNUC__ | |
2013 configure___ CFLAGS=C_DEBUG_SWITCH C_OPTIMIZE_SWITCH '${SPECIFIED_CFLAGS}' | |
2014 #else | |
2015 configure___ CFLAGS=C_DEBUG_SWITCH '${SPECIFIED_CFLAGS}' | |
2016 #endif | |
2017 | |
2018 #else /* not THIS_IS_CONFIGURE */ | |
2019 | |
2020 /* Get the CFLAGS for real compilation. */ | |
2021 #ifdef __GNUC__ | |
2022 configure___ REAL_CFLAGS=C_DEBUG_SWITCH C_OPTIMIZE_SWITCH '${SPECIFIED_CFLAGS}' | |
2023 #else | |
2024 configure___ REAL_CFLAGS=C_DEBUG_SWITCH '${SPECIFIED_CFLAGS}' | |
2025 #endif | |
2026 | |
2027 #endif /* not THIS_IS_CONFIGURE */ | |
2028 ' > ${tempcname} | |
2029 # The value of CPP is a quoted variable reference, so we need to do this | |
2030 # to get its actual value... | |
2031 CPP=`eval "echo $CPP"` | |
2032 eval `${CPP} -Isrc ${tempcname} \ | |
2033 | grep 'configure___' \ | |
2034 | sed -n -e 's/^configure___ \([[^=]]*=\)\(.*\)$/\1"\2"/p'` | |
2035 if test "x$SPECIFIED_CFLAGS" = x ; then | |
2036 eval `${CPP} -Isrc -DTHIS_IS_CONFIGURE ${tempcname} \ | |
2037 | grep 'configure___' \ | |
2038 | sed -n -e 's/^configure___ \([[^=]]*=\)\(.*\)$/\1"\2"/p'` | |
2039 else | |
2040 REAL_CFLAGS="$CFLAGS" | |
2041 fi | |
2042 rm ${tempcname} | |
2043 | |
2044 # override CFLAGS if user wishes | |
2045 if test "${cflags}" != "NO_CFLAGS_DEFINED" ; then | |
2046 REAL_CFLAGS=${cflags} | |
2047 fi | |
2048 | |
2049 ### Compute the unexec source name from the object name. | |
2050 UNEXEC_SRC="`echo ${unexec} | sed 's/\.o/.c/'`" | |
2051 | |
2052 # Do the opsystem or machine files prohibit the use of the GNU malloc? | |
2053 # Assume not, until told otherwise. | |
2054 GNU_MALLOC=yes | |
2055 if test "${system_malloc}" = "yes" ; then | |
2056 GNU_MALLOC=no | |
2057 GNU_MALLOC_reason=" | |
2058 (The GNU allocators don't work with this system configuration.)" | |
2059 elif test "${use_system_malloc}" = "yes" ; then | |
2060 GNU_MALLOC=no | |
2061 GNU_MALLOC_reason=" | |
2062 (User chose not to use GNU allocators.)" | |
2063 fi | |
2064 | |
2065 LISP_FLOAT_TYPE=yes | |
2066 | |
2067 | |
2068 #### Add the libraries to LIBS and check for some functions. | |
2069 | |
2070 CPPFLAGS="${C_SWITCH_SITE} $c_switch_system $c_switch_machine $c_switch_x_system $CPPFLAGS" | |
2071 DEFS="${C_SWITCH_SITE} $c_switch_system $c_switch_machine $c_switch_x_system $DEFS" | |
2072 LIBS="${LD_SWITCH_SITE} $ld_switch_x_system $libsrc_libs $LIBS" | |
2073 | |
2074 dnl If found, this defines HAVE_LIBDNET, which m/pmax.h checks, | |
2075 dnl and also adds -ldnet to LIBS, which Autoconf uses for checks. | |
2076 dnl FSF 19.29 also checks for function dnet_ntoa. | |
2077 test "${with_dnet}" != "no" -a \ | |
2078 "${with_dnet}" != "yes" && { AC_HAVE_LIBRARY(-ldnet, with_dnet="yes") } | |
2079 IF_YES_AC_DEFINE(with_dnet, HAVE_LIBDNET) | |
2080 | |
2081 dnl This causes -lresolv to get used in subsequent tests, | |
2082 dnl which causes failures on some systems such as HPUX 9. | |
2083 dnl FSF 19.29 also checks for function gethostbyname. | |
2084 dnl AC_HAVE_LIBRARY(-lresolv) | |
2085 | |
2086 dnl Alternative to getloadavg() that doesn't require root priveleges | |
2087 AC_HAVE_LIBRARY(-lkstat) | |
2088 | |
2089 dnl Use -lintl if Mule available. | |
2090 AC_HAVE_LIBRARY(-lintl, AC_DEFINE(HAVE_LIBINTL)) | |
2091 | |
2092 AC_HAVE_LIBRARY(-lXbsd, LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -lXbsd") | |
2093 | |
2094 dnl FSF 19.29 also checks for function cma_open. | |
2095 AC_HAVE_LIBRARY(-lpthreads, HAVE_PTHREADS=yes) | |
2096 if test -n "${HAVE_PTHREADS}" ; then | |
2097 AC_DEFINE(HAVE_PTHREADS) | |
2098 case "${opsys}" in | |
2099 decosf* ) CFLAGS="${CFLAGS} -threads" ;; | |
2100 esac | |
2101 fi | |
2102 | |
2103 if test "${window_system}" != "none" ; then | |
2104 AC_CHECKING(for XFree86) | |
2105 if test -d /usr/X386/include; then | |
2106 HAVE_XFREE386=yes | |
2107 test -z "${C_SWITCH_X_SITE}" && C_SWITCH_X_SITE="-I/usr/X386/include" | |
2108 elif test -f /etc/XF86Config -o \ | |
2109 -f /etc/X11/XF86Config -o \ | |
2110 -f /usr/X11R6/lib/X11/XF86Config; then | |
2111 HAVE_XFREE386=yes | |
2112 test -z "${C_SWITCH_X_SITE}" && C_SWITCH_X_SITE="-I/usr/X11R6/include" | |
2113 else | |
2114 HAVE_XFREE386=no | |
2115 fi | |
2116 AC_VERBOSE(${HAVE_XFREE386}) | |
2117 else | |
2118 HAVE_XFREE386=no | |
2119 fi | |
2120 | |
2121 ############################################################################ | |
2122 # # | |
2123 # Test for various X-specific features # | |
2124 # # | |
2125 ############################################################################ | |
2126 | |
2127 # Change CFLAGS temporarily for damn binutils 2.6.0.10 check. | |
2128 if test "${HAVE_X_WINDOWS}" = "yes"; then | |
2129 case "${opsys}" in | |
2130 linux* ) | |
2131 CFLAGS="-Wl,-rpath-link,/usr/X11R6/lib $CFLAGS" | |
2132 AC_COMPILE_CHECK(whether path-link option is needed, [], | |
2133 [;], | |
2134 [need_path_link=yes], | |
2135 [need_path_link=no]) | |
2136 if test "${need_path_link}" = "no"; then | |
2137 CFLAGS="$REAL_CFLAGS" | |
2138 AC_VERBOSE(no) | |
2139 else | |
2140 AC_VERBOSE(yes) | |
2141 fi | |
2142 ;; | |
2143 esac | |
2144 fi | |
2145 | |
2146 # Change CFLAGS temporarily so that C_SWITCH_X_SITE gets used | |
2147 # for the tests that follow. We set it back to REAL_CFLAGS later on. | |
2148 | |
2149 if test "${HAVE_X_WINDOWS}" = "yes"; then | |
2150 DEFS="$C_SWITCH_X_SITE $DEFS" | |
2151 LDFLAGS="$LDFLAGS $LD_SWITCH_X_SITE" | |
2152 LIBS="$LIBX $LIBS" | |
2153 CFLAGS="$C_SWITCH_X_SITE $CFLAGS" | |
2154 | |
2155 # On Solaris, arrange for LD_RUN_PATH to point to the X libraries for tests. | |
2156 # This is handled by LD_SWITCH_X_SITE_AUX during the real build, | |
2157 # but it's more convenient here to set LD_RUN_PATH | |
2158 # since this also works on hosts that don't understand LD_SWITCH_X_SITE_AUX. | |
2159 if test "${x_libraries}" != NONE && test -n "${x_libraries}"; then | |
2160 LD_RUN_PATH=$x_libraries${LD_RUN_PATH+:}$LD_RUN_PATH | |
2161 export LD_RUN_PATH | |
2162 fi | |
2163 | |
2164 if test "${HAVE_XFREE386}" = "yes" ; then | |
2165 case "${opsys}" in | |
2166 linux* ) | |
2167 AC_COMPILE_CHECK(whether XFree86 needs -b to link, [], | |
2168 [XOpenDisplay ("foo");], | |
2169 [xfree86_first_failure=no], | |
2170 [xfree86_first_failure=yes]) | |
2171 if test "${xfree86_first_failure}" = "yes"; then | |
2172 OLD_LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE" | |
2173 OLD_C_SWITCH_X_SITE="$C_SWITCH_X_SITE" | |
2174 OLD_CPPFLAGS="$CPPFLAGS" | |
2175 OLD_LIBS="$LIBS" | |
2176 LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -b i486-linuxaout" | |
2177 C_SWITCH_X_SITE="$C_SWITCH_X_SITE -b i486-linuxaout" | |
2178 CPPFLAGS="$CPPFLAGS -b i486-linuxaout" | |
2179 LIBS="$LIBS -b i486-linuxaout" | |
2180 AC_COMPILE_CHECK(,[], | |
2181 [XOpenDisplay ("foo");], | |
2182 [xfree86_second_failure=no], | |
2183 [xfree86_second_failure=yes]) | |
2184 if test "${xfree86_second_failure}" = "yes"; then | |
2185 # If we get the same failure with -b, there is no use adding -b. | |
2186 # So take it out. This plays safe. | |
2187 LD_SWITCH_X_SITE="$OLD_LD_SWITCH_X_SITE" | |
2188 C_SWITCH_X_SITE="$OLD_C_SWITCH_X_SITE" | |
2189 CPPFLAGS="$OLD_CPPFLAGS" | |
2190 LIBS="$OLD_LIBS" | |
2191 AC_VERBOSE(no) | |
2192 else | |
2193 AC_VERBOSE(yes) | |
2194 fi | |
2195 else | |
2196 AC_VERBOSE(no) | |
2197 fi | |
2198 ;; | |
2199 esac | |
2200 fi | |
2201 | |
2202 # A C_CHECK_FUNCS(XrmSetDatabase XScreenResourceString \ | |
2203 #XScreenNumberOfScreen XSetWMProtocols) | |
2204 fi | |
2205 | |
2206 # | |
2207 # make sure we can find libX11.* | |
2208 # | |
2209 if test "${window_system}" != "none" ; then | |
2210 internal_xlibs_found='no' | |
2211 AC_HAVE_LIBRARY(-lX11, internal_xlibs_found='yes') | |
2212 if test "${internal_xlibs_found}" = "no" ; then | |
2213 echo "Unable to find X11 libraries." >&2 | |
2214 exit 1 | |
2215 else | |
2216 AC_VERBOSE(yes) | |
2217 fi | |
2218 fi | |
2219 | |
2220 # | |
2221 # make sure we can find Intrinsic.h | |
2222 # | |
2223 if test "${window_system}" != "none" ; then | |
2224 internal_xincludes_found='no' | |
2225 for arg in ${DEFS} /usr/include | |
2226 do | |
2227 if test -f `echo "${arg}/X11/Intrinsic.h" | sed 's/^\-I//'` ; then | |
2228 internal_xincludes_found='yes' | |
2229 fi | |
2230 done | |
2231 if test "${internal_xincludes_found}" = "no" ; then | |
2232 echo "Unable to find X11 header files." >&2 | |
2233 exit 1 | |
2234 fi | |
2235 fi | |
2236 | |
2237 # | |
2238 # Sun OS 4 systems need the following kludge | |
2239 # | |
2240 if test "${window_system}" != "none" ; then | |
2241 case "${canonical}" in *-sunos4* ) | |
2242 LIBS="$LIBS -u _XtToolkitInitialize -u _get_applicationShellWidgetClass" ;; | |
2243 esac | |
2244 fi | |
2245 | |
2246 # | |
2247 # See if we can find Xauth. | |
2248 # | |
2249 with_xauth='no' | |
2250 if test "${window_system}" != "none" ; then | |
2251 internal_xauth_lib_found='no' | |
2252 AC_HAVE_LIBRARY(-lXau, internal_xauth_lib_found='yes') | |
2253 if test "${internal_xauth_lib_found}" = "yes" ; then | |
2254 internal_xauth_includes_found='no' | |
2255 for arg in ${DEFS} /usr/include | |
2256 do | |
2257 if test -f `echo "${arg}/X11/Xauth.h" | sed 's/^\-I//'` ; then | |
2258 internal_xauth_includes_found='yes' | |
2259 fi | |
2260 done | |
2261 if test "${internal_xauth_includes_found}" = "yes" ; then | |
2262 with_xauth='yes' | |
2263 fi | |
2264 fi | |
2265 fi | |
2266 IF_YES_AC_DEFINE(with_xauth, HAVE_XAUTH) | |
2267 | |
2268 # | |
2269 # See if we can find CDE. | |
2270 # | |
2271 if test "${window_system}" != "none" -a \ | |
2272 "${with_cde}" != "no" -a \ | |
2273 "${with_cde}" != "yes" ; then | |
2274 internal_cde_lib_found='no' | |
2275 AC_HAVE_LIBRARY(-lDtSvc, internal_cde_lib_found='yes') | |
2276 if test "${internal_cde_lib_found}" = "no" -a -f "/usr/dt/lib/libDtSvc.a"; then | |
2277 internal_cde_lib_found="yes" | |
2278 fi | |
2279 if test "${internal_cde_lib_found}" = "yes" ; then | |
2280 internal_cde_includes_found='no' | |
2281 for arg in ${DEFS} /usr/include /usr/dt/include ; do | |
2282 if test -f `echo "${arg}/Dt/Dt.h" | sed 's/^\-I//'` ; then | |
2283 internal_cde_includes_found='yes' | |
2284 fi | |
2285 done | |
2286 if test "${internal_cde_includes_found}" = "yes" ; then | |
2287 with_cde='yes' | |
2288 fi | |
2289 fi | |
2290 fi | |
2291 IF_YES_AC_DEFINE(with_cde, HAVE_CDE) | |
2292 | |
2293 # having CDE implies Tooltalk | |
2294 if test "${with_cde}" = "yes" -a \ | |
2295 "${with_tooltalk}" != "no" -a \ | |
2296 "${with_tooltalk}" != "none" ; then | |
2297 with_tooltalk='yes' | |
2298 fi | |
2299 | |
2300 # having CDE requires Motif | |
2301 if test "${with_cde}" = "yes" ; then | |
2302 motif_libs="-lXm -lXt" | |
2303 fi | |
2304 | |
2305 # | |
2306 # See if we can find OffiX. | |
2307 # | |
2308 if test "${window_system}" != "none" -a \ | |
2309 "${with_offix}" != "no" -a \ | |
2310 "${with_offix}" != "yes" ; then | |
2311 internal_offix_lib_found='no' | |
2312 AC_HAVE_LIBRARY(-lDnd, internal_offix_lib_found='yes') | |
2313 if test "${internal_offix_lib_found}" = "yes" ; then | |
2314 internal_offix_includes_found='no' | |
2315 for arg in ${DEFS} /usr/include ; do | |
2316 if test -f `echo "${arg}/OffiX/DragAndDrop.h" | sed 's/^\-I//'` ; then | |
2317 internal_offix_includes_found='yes' | |
2318 fi | |
2319 done | |
2320 test "${internal_offix_includes_found}" = "yes" && with_offix='yes' | |
2321 fi | |
2322 fi | |
2323 IF_YES_AC_DEFINE(with_offix, HAVE_OFFIX_DND) | |
2324 | |
2325 # X window options | |
2326 if test "${window_system}" != "none" ; then | |
2327 AC_FIND_X_VERSION | |
2328 AC_HAVE_HEADERS(X11/Xlocale.h) | |
2329 fi | |
2330 | |
2331 # | |
2332 # if Energize specified, make sure we can find its need libraries/headers | |
2333 # | |
2334 if test "${with_energize}" = "yes" ; then | |
2335 AC_HAVE_LIBRARY(-lenergize, energize_version='3.X') | |
2336 if test "${energize_version}" = "no" ; then | |
2337 AC_HAVE_LIBRARY(-lconn, energize_version='2.X') | |
2338 if test "${energize_version}" = "no" ; then | |
2339 echo "Unable to find Energize library." >&2 | |
2340 exit 1 | |
2341 fi | |
2342 fi | |
2343 | |
2344 internal_eincludes_found='no' | |
2345 for arg in ${DEFS} /usr/include | |
2346 do | |
2347 if test -f `echo "${arg}/editorconn.h" | sed 's/^\-I//'` ; then | |
2348 internal_eincludes_found='yes' | |
2349 fi | |
2350 done | |
2351 if test "${internal_eincludes_found}" = "no" ; then | |
2352 echo "Unable to find Energize editorconn.h header file." >&2 | |
2353 exit 1 | |
2354 fi | |
2355 fi | |
2356 | |
2357 # | |
2358 # logb and frexp are found in -lm on most systems. | |
2359 # | |
2360 AC_HAVE_LIBRARY(-lm) | |
2361 | |
2362 # | |
2363 # see if XPM is hanging around somewhere | |
2364 # | |
2365 test "${window_system}" != "none" -a \ | |
2366 "${with_xpm}" != "no" -a \ | |
2367 "${with_xpm}" != "yes" && { AC_HAVE_LIBRARY(-lXpm, with_xpm="yes") } | |
2368 | |
2369 IF_YES_AC_DEFINE(with_xpm, HAVE_XPM) | |
2370 | |
2371 # | |
2372 # see if Xmu is hanging around somewhere | |
2373 # | |
2374 # FSF 19.31 has this: | |
2375 #dnl If using toolkit, check whether libXmu.a exists. | |
2376 #dnl tranle@intellicorp.com says libXmu.a can need XtMalloc in libXt.a to link. | |
2377 # OLDLIBS="$LIBS" | |
2378 # if test x$HAVE_X11XTR6 = xyes; then | |
2379 # LIBS="-lXt -lSM -lICE $LIBS" | |
2380 # else | |
2381 # LIBS="-lXt $LIBS" | |
2382 # fi | |
2383 # A C_CHECK_LIB(Xmu, XmuConvertStandardSelection) | |
2384 # LIBS="$OLDLIBS" | |
2385 | |
2386 if test "${window_system}" != "none" ; then | |
2387 if test "${with_xmu}" != "no" ; then | |
2388 test "${with_xmu}" != "yes" && { AC_HAVE_LIBRARY(-lXmu, with_xmu="yes") } | |
2389 # On SunOS4 (and 5!) we must kludge harder to try to detect Xmu | |
2390 # Upgrade to autoconf 2 and use ac_check_lib - mrb | |
2391 if test "${with_xmu}" != "yes" ; then | |
2392 # begin expansion of ac_have_library | |
2393 ac_save_LIBS="${LIBS}" | |
2394 LIBS="${LIBS} -lXmu -lXt -lXext -lX11 -lm" | |
2395 if test ${machine} = sparc -a ${opsys} = linux; then | |
2396 LIBS="${LIBS} -lICE -lSM" | |
2397 fi | |
2398 ac_have_lib="" | |
2399 cat > conftest.${ac_ext} <<EOF | |
2400 int main() { return 0; } | |
2401 EOF | |
2402 if eval $ac_compile; then | |
2403 rm -rf conftest* | |
2404 ac_have_lib="1" | |
2405 fi | |
2406 rm -f conftest* | |
2407 LIBS="${ac_save_LIBS}" | |
2408 test -n "${ac_have_lib}" && with_xmu="yes" | |
2409 # end expansion of ac_have_library | |
2410 fi | |
2411 # Sparc/Linux test - fp | |
2412 if test "${with_xmu}" != "yes" -a ${machine} = sparc -a ${opsys} = linux; then | |
2413 # begin expansion of ac_have_library | |
2414 ac_save_LIBS="${LIBS}" | |
2415 LIBS="${LIBS} -lXmu -lXt -lXext -lX11 -lm -lICE -lSM" | |
2416 ac_have_lib="" | |
2417 cat > conftest.${ac_ext} <<EOF | |
2418 int main() { return 0; } | |
2419 EOF | |
2420 if eval $ac_compile; then | |
2421 rm -rf conftest* | |
2422 ac_have_lib="1" | |
2423 fi | |
2424 rm -f conftest* | |
2425 LIBS="${ac_save_LIBS}" | |
2426 test -n "${ac_have_lib}" && with_xmu="yes" | |
2427 # end expansion of ac_have_library | |
2428 fi | |
2429 # On UnixWare 2.1 we must kludge harder to try to detect Xmu | |
2430 # Upgrade to autoconf 2 and use ac_check_lib - mrb | |
2431 if test "${with_xmu}" != "yes" && test -f "/.UpgradeVer2.1" ; then | |
2432 # begin expansion of ac_have_library | |
2433 ac_save_LIBS="${LIBS}" | |
2434 if test x$HAVE_XFREE386 = xyes; then | |
2435 LIBS="-lXt -lSM -lICE ${LIBS}" | |
2436 else | |
2437 LIBS="${LIBS} -lXmu -lXt -lXext -lX11" | |
2438 fi | |
2439 ac_have_lib="" | |
2440 cat > conftest.${ac_ext} <<EOF | |
2441 int main() { return 0; } | |
2442 EOF | |
2443 if eval $ac_compile; then | |
2444 rm -rf conftest* | |
2445 ac_have_lib="1" | |
2446 fi | |
2447 rm -f conftest* | |
2448 LIBS="${ac_save_LIBS}" | |
2449 test -n "${ac_have_lib}" && with_xmu="yes" | |
2450 # end expansion of ac_have_library | |
2451 fi | |
2452 fi | |
2453 fi | |
2454 IF_YES_AC_DEFINE(with_xmu, HAVE_XMU) | |
2455 | |
2456 # | |
2457 # see if COMPFACE is hanging around somewhere | |
2458 # | |
2459 if test "${window_system}" != "none" -a \ | |
2460 "${with_xface}" != "no" -a \ | |
2461 "${with_xface}" != "yes" ; then | |
2462 AC_HEADER_CHECK(compface.h, compface_incl="yes", with_xface="no") | |
2463 if test "${compface_incl}" = "yes" ; then | |
2464 AC_HAVE_LIBRARY(-lcompface, with_xface="yes") | |
2465 fi | |
2466 fi | |
2467 IF_YES_AC_DEFINE(with_xface, HAVE_XFACE) | |
2468 | |
2469 # | |
2470 # check whether we're using GIF support | |
2471 # | |
2472 if test "${window_system}" = "none" ; then | |
2473 if test -z "${with_gif}" ; then | |
2474 with_gif=no | |
2475 elif test "${with_gif}" != "no" ; then | |
2476 echo "GIF support cannot be specified without a window system." | |
2477 exit 1 | |
2478 fi | |
2479 elif test -z "${with_gif}" ; then | |
2480 with_gif=yes | |
2481 fi | |
2482 IF_YES_AC_DEFINE(with_gif, HAVE_GIF) | |
2483 | |
2484 dnl # autodetect JPEG | |
2485 if test "${window_system}" = "none" ; then | |
2486 if test -z "${with_jpeg}" ; then | |
2487 with_jpeg=no | |
2488 elif test "${with_jpeg}" != "no" ; then | |
2489 echo "JPEG support cannot be specified without a window system." | |
2490 exit 1 | |
2491 fi | |
2492 else | |
2493 if test "${with_jpeg}" != "no" -a \ | |
2494 "${with_jpeg}" != "yes" ; then | |
2495 AC_HEADER_CHECK(jpeglib.h, jpeglib_incl="yes", with_jpeg="no") | |
2496 test "${jpeglib_incl}" = "yes" && { AC_HAVE_LIBRARY(-ljpeg, with_jpeg="yes") } | |
2497 fi | |
2498 fi | |
2499 IF_YES_AC_DEFINE(with_jpeg, HAVE_JPEG) | |
2500 | |
2501 dnl ### autodetect PNG | |
2502 if test "${window_system}" = "none" ; then | |
2503 if test -z "${with_png}" ; then | |
2504 with_png=no | |
2505 elif test "${with_png}" != "no" ; then | |
2506 echo "PNG support cannot be specified without a window system." | |
2507 exit 1 | |
2508 fi | |
2509 fi | |
2510 test -z "${with_png}" && { AC_HEADER_CHECK(png.h, , with_png="no") } | |
2511 test -z "${with_png}" && { AC_FUNC_CHECK(pow, , with_png="no") } | |
2512 if test -z "${with_png}" ; then | |
2513 AC_HAVE_LIBRARY(-lz, with_png="yes") | |
2514 test -z "${with_png}" && { AC_HAVE_LIBRARY(-lgz, with_png="gnuz", with_png="no") } | |
2515 if test "${with_png}" != "no"; then | |
2516 png_save_libs="${LIBS}" | |
2517 case "${with_png}" in | |
2518 yes ) LIBS="${LIBS} -lz" ;; | |
2519 gnuz ) LIBS="${LIBS} -lgz" ;; | |
2520 esac | |
2521 AC_HAVE_LIBRARY(-lpng, , with_png="no") | |
2522 LIBS="$png_save_libs" | |
2523 fi | |
2524 fi | |
2525 case "${with_png}" in | |
2526 yes ) AC_DEFINE(HAVE_PNG) ;; | |
2527 gnuz ) AC_DEFINE(HAVE_PNG) AC_DEFINE(HAVE_PNG_GNUZ) ;; | |
2528 esac | |
2529 | |
2530 dnl ### autodetect TIFF (not yet implemented) | |
2531 IF_YES_AC_DEFINE(with_tiff, HAVE_TIFF) | |
2532 | |
2533 # We use Lucid toolkit defaults for the menubars and scrollbars, but | |
2534 # if Motif is available we use it for the dialog boxes. | |
2535 if test "${window_system}" != "none" ; then | |
2536 save_libs="${LIBS}" | |
2537 if test "x${with_dialogs}" = "x" ; then | |
2538 # We can't use ac_have_library because it simply appends -lXm to the | |
2539 # end of the link line which is insufficient since -lXm will generate | |
2540 # dependencies on -lXt | |
2541 # begin expansion of ac_have_library | |
2542 ac_save_LIBS="${LIBS}" | |
2543 LIBS="${LIBS} -lXm -lXt ${LIBS}" | |
2544 ac_have_lib="" | |
2545 test -n "$silent" || echo "checking for -lXm" | |
2546 cat > conftest.${ac_ext} <<EOF | |
2547 #include "confdefs.h" | |
2548 | |
2549 int main() { return 0; } | |
2550 int t() { main();; return 0; } | |
2551 EOF | |
2552 if eval $ac_compile; then | |
2553 rm -rf conftest* | |
2554 ac_have_lib="1" | |
2555 | |
2556 fi | |
2557 rm -f conftest* | |
2558 LIBS="${ac_save_LIBS}" | |
2559 if test -n "${ac_have_lib}"; then | |
2560 :; with_dialogs="motif" motif_libs="-lXm -lXt" | |
2561 else | |
2562 :; | |
2563 fi | |
2564 # end expansion of ac_have_library | |
2565 # Sigh. My Motif (MoTeeth) under Linux also depends on Xpm and Xext. | |
2566 if test "${with_dialogs}" != "motif" ; then | |
2567 # begin expansion of ac_have_library | |
2568 ac_save_LIBS="${LIBS}" | |
2569 LIBS="${LIBS} -lXm -lXt -lXpm -lXext ${LIBS}" | |
2570 ac_have_lib="" | |
2571 test -n "$silent" || echo "checking for -lXm in another way" | |
2572 cat > conftest.${ac_ext} <<EOF | |
2573 #include "confdefs.h" | |
2574 | |
2575 int main() { return 0; } | |
2576 int t() { main();; return 0; } | |
2577 EOF | |
2578 if eval $ac_compile; then | |
2579 rm -rf conftest* | |
2580 ac_have_lib="1" | |
2581 | |
2582 fi | |
2583 rm -f conftest* | |
2584 LIBS="${ac_save_LIBS}" | |
2585 if test -n "${ac_have_lib}"; then | |
2586 :; with_dialogs="motif" motif_libs="-lXm -lXt -lXpm -lXext" | |
2587 else | |
2588 :; | |
2589 fi | |
2590 # end expansion of ac_have_library | |
2591 fi | |
2592 test "${with_dialogs}" = "motif" && AC_VERBOSE(Found Motif) | |
2593 fi | |
2594 fi | |
2595 | |
2596 # Finish ensuring that we have values for the various toolkit items. | |
2597 | |
2598 test "${with_menubars}" = "motif" -o \ | |
2599 "${with_scrollbars}" = "motif" -o \ | |
2600 "${with_dialogs}" = "motif" && with_motif="yes" | |
2601 test "${with_menubars}" = "athena" -o \ | |
2602 "${with_scrollbars}" = "athena" -o \ | |
2603 "${with_dialogs}" = "athena" && with_athena="yes" | |
2604 test "${with_menubars}" = "athena3d" -o \ | |
2605 "${with_scrollbars}" = "athena3d" -o \ | |
2606 "${with_dialogs}" = "athena3d" && with_athena="yes" | |
2607 test "${with_menubars}" = "" && with_menubars="lucid" | |
2608 test "${with_menubars}" = "athena" && with_menubars="lucid" | |
2609 test "${with_scrollbars}" = "" && with_scrollbars="lucid" | |
2610 test "${with_dialogs}" = "" && with_dialogs="athena" | |
2611 test "${with_dialogs}" = "lucid" && with_dialogs="athena" | |
2612 | |
2613 test "${with_menubars}" != "no" && AC_DEFINE(HAVE_MENUBARS) | |
2614 test "${with_scrollbars}" != "no" && AC_DEFINE(HAVE_SCROLLBARS) | |
2615 test "${with_dialogs}" != "no" && AC_DEFINE(HAVE_DIALOGS) | |
2616 | |
2617 test "${with_menubars}" = "lucid" && AC_DEFINE(LWLIB_MENUBARS_LUCID) | |
2618 test "${with_menubars}" = "motif" && AC_DEFINE(LWLIB_MENUBARS_MOTIF) | |
2619 test "${with_scrollbars}" = "lucid" && AC_DEFINE(LWLIB_SCROLLBARS_LUCID) | |
2620 test "${with_scrollbars}" = "motif" && AC_DEFINE(LWLIB_SCROLLBARS_MOTIF) | |
2621 test "${with_scrollbars}" = "athena" && AC_DEFINE(LWLIB_SCROLLBARS_ATHENA) | |
2622 if test "${with_scrollbars}" = "athena3d"; then | |
2623 AC_DEFINE(LWLIB_SCROLLBARS_ATHENA) | |
2624 AC_DEFINE(LWLIB_SCROLLBARS_ATHENA3D) | |
2625 fi | |
2626 test "${with_dialogs}" = "motif" && AC_DEFINE(LWLIB_DIALOGS_MOTIF) | |
2627 test "${with_dialogs}" = "athena" && AC_DEFINE(LWLIB_DIALOGS_ATHENA) | |
2628 if test "${with_dialogs}" = "athena3d"; then | |
2629 AC_DEFINE(LWLIB_DIALOGS_ATHENA) | |
2630 AC_DEFINE(LWLIB_DIALOGS_ATHENA3D) | |
2631 fi | |
2632 | |
2633 ############################################################################ | |
2634 # # | |
2635 # Misc other feature tests # | |
2636 # # | |
2637 ############################################################################ | |
2638 | |
2639 # Mule-dependent option processing | |
2640 if test "$with_mule" = "yes" ; then | |
2641 # Do we have the XmIm* routines? And if so, do we want to use them? | |
2642 test "$with_xim" != no && AC_CHECKING(for XIM) | |
2643 if test -z "$with_xim" -o "$with_xim" = "yes" ; then | |
2644 xim_save_libs="$LIBS" | |
2645 LIBS="${motif_libs} ${LIBS}" | |
2646 AC_FUNC_CHECK(XmImMbLookupString, have_XmIm=yes, have_XmIm=no) | |
2647 LIBS="$xim_save_libs" | |
2648 if test "$with_xim" = "yes" -a "$have_XmIm" = "yes"; then with_xim=motif | |
2649 elif test "$with_xim" = "yes"; then with_xim=xlib | |
2650 else with_xim=no | |
2651 fi | |
2652 fi | |
2653 if test "$with_xim" != "no" ; then | 2288 if test "$with_xim" != "no" ; then |
2654 AC_DEFINE(HAVE_XIM) | 2289 AC_DEFINE(HAVE_XIM) |
2655 test "$with_xim" = "xlib" && AC_DEFINE(XIM_XLIB) | 2290 if test "$with_xim" = "xlib"; then |
2656 test "$with_xim" = "motif" && AC_DEFINE(XIM_MOTIF) | 2291 AC_DEFINE(XIM_XLIB) |
2292 extra_objs="$extra_objs input-method-xlib.o" | |
2657 fi | 2293 fi |
2658 # wnn6 implies wnn support | 2294 if test "$with_xim" = "motif"; then |
2659 if test "$with_wnn6" = "yes" ; then | 2295 AC_DEFINE(XIM_MOTIF) |
2660 with_wnn=yes | 2296 need_motif=yes |
2297 extra_objs="$extra_objs input-method-motif.o" | |
2661 fi | 2298 fi |
2662 else # Other internationalization features depend on Mule | |
2663 with_mule="no" | |
2664 for feature in xim canna wnn wnn6 ; do | |
2665 if eval "test -n \"\$with_$feature\" -a \"\$with_$feature\" != no" ; then | |
2666 AC_WARN(--with-$feature ignored: Not valid without Mule support) | |
2667 fi | 2299 fi |
2668 eval "with_$feature=no" | 2300 |
2301 dnl Autodetect WNN | |
2302 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) } | |
2304 test -z "$with_wnn" && { AC_CHECK_LIB(wnn,jl_dic_list,[:],with_wnn=no) } | |
2305 test -z "$with_wnn" && with_wnn=yes | |
2306 if test "$with_wnn" = "yes"; then | |
2307 AC_DEFINE(HAVE_WNN) | |
2308 libs_x="-lwnn $libs_x" | |
2309 extra_objs="$extra_objs mule-wnnfns.o" | |
2310 AC_CHECK_LIB(wnn, jl_fi_dic_list, with_wnn6=yes) | |
2311 test "$with_wnn6" = "yes" && AC_DEFINE(HAVE_WNN6) | |
2312 fi | |
2313 | |
2314 dnl Autodetect canna | |
2315 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) } | |
2317 test -z "$with_canna" && { AC_CHECK_LIB(canna,jrKanjiControl,[:],with_canna=no) } | |
2318 test -z "$with_canna" && with_canna=yes | |
2319 if test "$with_canna" = "yes"; then | |
2320 AC_DEFINE(HAVE_CANNA) | |
2321 libs_x="-lcanna -lRKC $libs_x" | |
2322 extra_objs="$extra_objs mule-canna.o" | |
2323 fi | |
2324 else # "$with_mule" = "no" | |
2325 for feature in xim canna wnn; do | |
2326 if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then | |
2327 AC_MSG_WARN("--with-${feature} ignored: Not valid without Mule support") | |
2328 fi | |
2329 eval "with_${feature}=no" | |
2669 done | 2330 done |
2670 fi | 2331 fi |
2671 | 2332 |
2672 # | 2333 |
2673 # set defaults for finding WNN includes and libs | 2334 dnl At this point, we know whether we need the motif lib or not. |
2674 # | 2335 test "$need_motif" = "yes" && libs_x="-lXm $libs_x" |
2675 if test "${with_wnn}" = "yes" ; then | 2336 |
2676 for arg in "-I${wnn_includes}" "-I/usr/X11R6/include/wnn" "-I/usr/include/wnn" | 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) |
2677 do | 2338 |
2678 if test -f `echo "${arg}/wnnerror.h" | sed 's/^\-I//'` ; then | 2339 test "$ac_cv_func_realpath" = "yes" && extra_objs="$extra_objs realpath.o" |
2679 C_SWITCH_SITE="${C_SWITCH_SITE} ${arg}" | 2340 |
2680 wnn_includes=${arg} | 2341 dnl If netdb.h does not declare h_errno, we must declare it by hand. |
2681 break | 2342 AC_MSG_CHECKING(whether netdb declares h_errno) |
2682 fi | 2343 AC_TRY_LINK([#include <netdb.h>], |
2683 done | 2344 [return h_errno;], |
2684 for arg in "-L${wnn_libraries}" "-L/usr/X11R6/lib" "-L/usr/lib" | 2345 [AC_MSG_RESULT(yes) |
2685 do | 2346 AC_DEFINE(HAVE_H_ERRNO)], |
2686 if test -f `echo "${arg}/libwnn.a" | sed 's/^\-L//'` ; then | 2347 [AC_MSG_RESULT(no)]) |
2687 LD_SWITCH_SITE="${LD_SWITCH_SITE} ${arg}" | 2348 |
2688 wnn_libraries=${arg} | 2349 AC_MSG_CHECKING(for sigsetjmp) |
2689 break | 2350 AC_TRY_COMPILE([#include <setjmp.h>], |
2690 fi | |
2691 done | |
2692 fi | |
2693 | |
2694 # | |
2695 # set defaults for finding Canna includes and libs | |
2696 # | |
2697 if test "${with_canna}" = "yes" ; then | |
2698 for arg in "-I${canna_includes}" "-I/usr/X11R6/include" | |
2699 do | |
2700 if test -f `echo "${arg}/canna/RK.h" | sed 's/^\-I//'` ; then | |
2701 C_SWITCH_SITE="${C_SWITCH_SITE} ${arg}" | |
2702 canna_includes=${arg} | |
2703 break | |
2704 fi | |
2705 done | |
2706 for arg in "-L${canna_libraries}" "-L/usr/X11R6/lib" | |
2707 do | |
2708 if test -f `echo "${arg}/libcanna.a" | sed 's/^\-L//'` ; then | |
2709 LD_SWITCH_SITE="${LD_SWITCH_SITE} ${arg}" | |
2710 canna_libraries=${arg} | |
2711 break | |
2712 fi | |
2713 done | |
2714 fi | |
2715 | |
2716 # If netdb.h doesn't declare h_errno, we must declare it by hand. | |
2717 AC_COMPILE_CHECK(declaration of h_errno in netdb.h, | |
2718 [#include <netdb.h>], | |
2719 [int i = h_errno;], | |
2720 AC_DEFINE(HAVE_H_ERRNO)) | |
2721 | |
2722 AC_COMPILE_CHECK(sigsetjmp, | |
2723 [#include <setjmp.h>], | |
2724 [sigjmp_buf bar; sigsetjmp (bar, 0);], | 2351 [sigjmp_buf bar; sigsetjmp (bar, 0);], |
2725 AC_DEFINE(HAVE_SIGSETJMP)) | 2352 [AC_MSG_RESULT(yes) |
2726 | 2353 AC_DEFINE(HAVE_SIGSETJMP)], |
2727 AC_CHECKING(whether localtime caches TZ) | 2354 [AC_MSG_RESULT(no)]) |
2728 emacs_cv_localtime_cache= | 2355 |
2729 AC_TEST_PROGRAM([#include <time.h> | 2356 AC_MSG_CHECKING(whether localtime caches TZ) |
2730 #if 1 /* STDC_HEADERS */ | 2357 AC_CACHE_VAL(emacs_cv_localtime_cache, |
2358 [if test "$ac_cv_func_tzset" = "yes"; then | |
2359 AC_TRY_RUN([#include <time.h> | |
2360 #if STDC_HEADERS | |
2731 # include <stdlib.h> | 2361 # include <stdlib.h> |
2732 #endif | 2362 #endif |
2733 extern char **environ; | 2363 extern char **environ; |
2734 unset_TZ () | 2364 unset_TZ () |
2735 { | 2365 { |
2736 char **from, **to; | 2366 char **from, **to; |
2737 for (to = from = environ; (*to = *from); from++) | 2367 for (to = from = environ; (*to = *from); from++) |
2738 if (! (to[0][0] == 'T' && to[0][1] == 'Z' && to[0][2] == '=')) | 2368 if (! (to[0][0] == 'T' && to[0][1] == 'Z' && to[0][2] == '=')) |
2739 to++; | 2369 to++; |
2740 } | 2370 } |
2371 char TZ_GMT0[] = "TZ=GMT0"; | |
2372 char TZ_PST8[] = "TZ=PST8"; | |
2741 main() | 2373 main() |
2742 { | 2374 { |
2743 time_t now = time ((time_t *) 0); | 2375 time_t now = time ((time_t *) 0); |
2744 int hour_GMT0, hour_unset; | 2376 int hour_GMT0, hour_unset; |
2745 if (putenv ("TZ=GMT0") != 0) | 2377 if (putenv (TZ_GMT0) != 0) |
2746 exit (1); | 2378 exit (1); |
2747 hour_GMT0 = localtime (&now)->tm_hour; | 2379 hour_GMT0 = localtime (&now)->tm_hour; |
2748 unset_TZ (); | 2380 unset_TZ (); |
2749 hour_unset = localtime (&now)->tm_hour; | 2381 hour_unset = localtime (&now)->tm_hour; |
2750 if (putenv ("TZ=PST8") != 0) | 2382 if (putenv (TZ_PST8) != 0) |
2751 exit (1); | 2383 exit (1); |
2752 if (localtime (&now)->tm_hour == hour_GMT0) | 2384 if (localtime (&now)->tm_hour == hour_GMT0) |
2753 exit (1); | 2385 exit (1); |
2754 unset_TZ (); | 2386 unset_TZ (); |
2755 if (localtime (&now)->tm_hour != hour_unset) | 2387 if (localtime (&now)->tm_hour != hour_unset) |
2756 exit (1); | 2388 exit (1); |
2757 exit (0); | 2389 exit (0); |
2758 }], emacs_cv_localtime_cache=no, emacs_cv_localtime_cache=yes, | 2390 }], emacs_cv_localtime_cache=no, emacs_cv_localtime_cache=yes, |
2759 [# If we have tzset, assume the worst when cross-compiling. | 2391 [# If we have tzset, assume the worst when cross-compiling. |
2760 emacs_cv_localtime_cache=yes]) | 2392 emacs_cv_localtime_cache=yes]) |
2761 AC_VERBOSE("$emacs_cv_localtime_cache") | 2393 else |
2762 if test x$emacs_cv_localtime_cache = xyes; then | 2394 # If we lack tzset, report that localtime does not cache TZ, |
2395 # since we can't invalidate the cache if we don't have tzset. | |
2396 emacs_cv_localtime_cache=no | |
2397 fi],[:])dnl | |
2398 AC_MSG_RESULT($emacs_cv_localtime_cache) | |
2399 if test $emacs_cv_localtime_cache = yes; then | |
2763 AC_DEFINE(LOCALTIME_CACHE) | 2400 AC_DEFINE(LOCALTIME_CACHE) |
2764 fi | 2401 fi |
2765 | 2402 |
2766 if test "x$HAVE_TIMEVAL" = xyes; then | 2403 if test "$HAVE_TIMEVAL" = "yes"; then |
2767 AC_COMPILE_CHECK(whether gettimeofday can't accept two arguments, | 2404 AC_MSG_CHECKING(whether gettimeofday cannot accept two arguments) |
2768 [ | 2405 AC_TRY_LINK([ |
2769 #ifdef TIME_WITH_SYS_TIME | 2406 #ifdef TIME_WITH_SYS_TIME |
2770 #include <sys/time.h> | 2407 #include <sys/time.h> |
2771 #include <time.h> | 2408 #include <time.h> |
2772 #else | 2409 #else |
2773 #ifdef HAVE_SYS_TIME_H | 2410 #ifdef HAVE_SYS_TIME_H |
2780 [ | 2417 [ |
2781 struct timeval time; | 2418 struct timeval time; |
2782 struct timezone dummy; | 2419 struct timezone dummy; |
2783 gettimeofday (&time, &dummy); | 2420 gettimeofday (&time, &dummy); |
2784 ], | 2421 ], |
2785 [AC_VERBOSE(no)], | 2422 [AC_MSG_RESULT(no)], |
2786 [AC_VERBOSE(yes) | 2423 [AC_MSG_RESULT(yes) |
2787 AC_DEFINE(GETTIMEOFDAY_ONE_ARGUMENT)]) | 2424 AC_DEFINE(GETTIMEOFDAY_ONE_ARGUMENT)]) |
2788 fi | 2425 fi |
2789 | 2426 |
2790 AC_COMPILE_CHECK(whether inline functions are supported, | 2427 |
2791 , | 2428 AC_C_INLINE |
2792 [ | 2429 test "$ac_cv_c_inline" != "no" && AC_DEFINE(HAVE_INLINE) |
2793 inline int | 2430 |
2794 foo () | 2431 |
2795 { | 2432 AC_FUNC_ALLOCA |
2796 return 0; | 2433 test -n "$ALLOCA" && extra_objs="$extra_objs $ALLOCA" |
2797 } | 2434 |
2798 ], | 2435 dnl Check whether vfork exists and works correctly. (This does more |
2799 AC_DEFINE(HAVE_INLINE)) | 2436 dnl than just check for its existence.) If so, it defines HAVE_VFORK_H. |
2800 | 2437 dnl If not, it defines vfork to be fork. |
2801 # This does all sorts of magic to make sure alloca() works OK. | 2438 AC_FUNC_VFORK |
2802 # It might even add some junk to the top of <config.h>. | 2439 |
2803 # (I don't understand what goes on here, but it seems to work.) | 2440 dnl Check whether strcoll exists and works correctly. (This does more |
2804 AC_ALLOCA | 2441 dnl than just check for its existence.) If so, it defines HAVE_STRCOLL. |
2805 | 2442 AC_FUNC_STRCOLL |
2806 # Check whether vfork exists and works correctly. (This does more | 2443 |
2807 # than just check for its existence.) If so, it defines HAVE_VFORK_H. | 2444 AC_CHECK_SIZEOF(short) |
2808 # If not, it defines vfork to be fork. | 2445 AC_CHECK_SIZEOF(int) |
2809 AC_VFORK | 2446 AC_CHECK_SIZEOF(long) |
2810 | 2447 |
2811 # Check whether mmap exists and works correctly. (This does more | 2448 AC_FUNC_MMAP |
2812 # than just check for its existence.) If so, it defines HAVE_MMAP. | 2449 |
2813 # Actually, this seems to rule out some cases where mmap() can | 2450 dnl rel_alloc requires either GNU malloc or system malloc with mmap |
2814 # work fine for our purposes (e.g. HPUX). We get a big win out | 2451 dnl We only turn rel_alloc on by default if mmap is available. |
2815 # of using mmap(), so let's go back to the old way. | 2452 test "$GNU_MALLOC" != "yes" -a "$ac_cv_func_mmap_fixed_mapped" != "yes" && rel_alloc=no |
2816 dnl AC_MMAP | 2453 test "$rel_alloc" = "default" -a "$ac_cv_func_mmap_fixed_mapped" = "yes" && rel_alloc=yes |
2817 | 2454 test "$rel_alloc" = "yes" && AC_DEFINE(REL_ALLOC) |
2818 # Check whether strcoll exists and works correctly. (This does more | 2455 |
2819 # than just check for its existence.) If so, it defines HAVE_STRCOLL. | 2456 dnl Check for Internet sockets. |
2820 AC_STRCOLL | 2457 AC_CHECK_FUNC(socket, |
2821 | 2458 [AC_CHECK_HEADER(netinet/in.h, |
2822 AC_SIZEOF_TYPE(short) | 2459 [AC_CHECK_HEADER(arpa/inet.h, [ |
2823 AC_SIZEOF_TYPE(int) | |
2824 AC_SIZEOF_TYPE(long) | |
2825 | |
2826 # FSF 19.29 does this: | |
2827 # # fmod, logb, and frexp are found in -lm on most systems. | |
2828 # # On HPUX 9.01, -lm does not contain logb, so check for sqrt. | |
2829 # A C_CHECK_LIB(m, sqrt) | |
2830 | |
2831 AC_HAVE_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) | |
2832 | |
2833 # Check for mmap. | |
2834 found_mmap=true | |
2835 AC_FUNC_CHECK(mmap, , found_mmap=) | |
2836 test -n "$found_mmap" && AC_DEFINE(HAVE_MMAP) | |
2837 | |
2838 dnl # rel_alloc requires either GNU malloc or system malloc with mmap | |
2839 dnl # We only turn rel_alloc on by default if mmap is available. | |
2840 test "${GNU_MALLOC}" != "yes" -a "${found_mmap}" != "true" && rel_alloc=no | |
2841 test "${rel_alloc}" = "default" -a "${found_mmap}" = "true" && rel_alloc=yes | |
2842 | |
2843 # Check for Internet sockets. | |
2844 | |
2845 ok_so_far=true | |
2846 AC_FUNC_CHECK(socket, , ok_so_far=) | |
2847 test -n "$ok_so_far" && { AC_HEADER_CHECK(netinet/in.h, , ok_so_far=) } | |
2848 test -n "$ok_so_far" && { AC_HEADER_CHECK(arpa/inet.h, , ok_so_far=) } | |
2849 if test -n "$ok_so_far"; then | |
2850 AC_DEFINE(HAVE_SOCKETS) | 2460 AC_DEFINE(HAVE_SOCKETS) |
2851 # Check for the sun_len member in struct sockaddr_un. | 2461 AC_MSG_CHECKING("for sun_len member in struct sockaddr_un") |
2852 | 2462 AC_TRY_LINK([ |
2853 AC_COMPILE_CHECK(sun_len member in struct sockaddr_un, | 2463 #include <sys/types.h> |
2854 [#include <sys/types.h> | 2464 #include <sys/socket.h> |
2855 #include <sys/socket.h> | 2465 #include <sys/un.h> |
2856 #include <sys/un.h>], [static struct sockaddr_un x; x.sun_len = 1;], | 2466 ], |
2857 AC_DEFINE(HAVE_SOCKADDR_SUN_LEN)) | 2467 [static struct sockaddr_un x; x.sun_len = 1;], |
2858 fi | 2468 [AC_MSG_RESULT(yes); AC_DEFINE(HAVE_SOCKADDR_SUN_LEN)], |
2859 | 2469 [AC_MSG_RESULT(no)])])])]) |
2860 # Check for SYS V IPC. (Inferior to sockets.) | 2470 |
2861 | 2471 dnl Check for SYS V IPC. (Inferior to sockets.) |
2862 if test -z "$ok_so_far"; then | 2472 AC_CHECK_FUNC(msgget, |
2863 ok_so_far=true | 2473 [AC_CHECK_HEADER(sys/ipc.h, |
2864 AC_FUNC_CHECK(msgget, , ok_so_far=) | 2474 [AC_CHECK_HEADER(sys/msg.h, |
2865 test -n "$ok_so_far" && { AC_HEADER_CHECK(sys/ipc.h, , ok_so_far=) } | 2475 [AC_DEFINE(HAVE_SYSVIPC)])])]) |
2866 test -n "$ok_so_far" && { AC_HEADER_CHECK(sys/msg.h, , ok_so_far=) } | 2476 |
2867 test -n "$ok_so_far" && AC_DEFINE(HAVE_SYSVIPC) | 2477 dnl Check for directory variants |
2868 fi | 2478 AC_CHECK_HEADER(dirent.h, [AC_DEFINE(SYSV_SYSTEM_DIR)], |
2869 | 2479 [AC_CHECK_HEADER(sys/dir.h, , [AC_DEFINE(NONSYSTEM_DIR_LIBRARY)])]) |
2870 # Check for directory variants | 2480 |
2871 | 2481 dnl Check for nlist.h |
2872 sysv_system_dir= | 2482 AC_CHECK_HEADER(nlist.h, AC_DEFINE(NLIST_STRUCT), ) |
2873 nonsystem_dir_library= | 2483 |
2874 AC_HEADER_CHECK(dirent.h, sysv_system_dir=yes, ) | 2484 dnl AIX export list |
2875 test -z "$sysv_system_dir" && | 2485 for f in "/usr/lpp/X11/bin/smt.exp" "/usr/bin/X11/smt.exp" ; do |
2876 { AC_HEADER_CHECK(sys/dir.h, , nonsystem_dir_library=yes) } | 2486 if test -r $f; then AC_DEFINE_UNQUOTED(AIX_SMT_EXP, -bI:$f) break; fi |
2877 if test -n "$sysv_system_dir" ; then AC_DEFINE(SYSV_SYSTEM_DIR) | 2487 done |
2878 elif test -n "$nonsystem_dir_library" ; then AC_DEFINE(NONSYSTEM_DIR_LIBRARY) | 2488 |
2879 fi | 2489 dnl Set up the CFLAGS for real compilation, so we can substitute it. |
2880 | |
2881 dnl # Check for terminal I/O variants | |
2882 | |
2883 echo "checking how to do terminal I/O" | |
2884 | |
2885 have_termios= | |
2886 have_termio= | |
2887 AC_HEADER_CHECK(termios.h, have_termios=yes, ) | |
2888 dnl # TERMIOS systems may have termio.h, but not vice-versa, I think. | |
2889 test -z "$have_termios" && { AC_HEADER_CHECK(termio.h, have_termio=yes, ) } | |
2890 if test -n "$have_termios" ; then AC_DEFINE(HAVE_TERMIOS) | |
2891 elif test -n "$have_termio" ; then AC_DEFINE(HAVE_TERMIO) | |
2892 fi | |
2893 | |
2894 # Check for nlist.h | |
2895 AC_HEADER_CHECK(nlist.h, AC_DEFINE(NLIST_STRUCT), ) | |
2896 | |
2897 # AIX export list | |
2898 if test -f /usr/lpp/X11/bin/smt.exp ; then | |
2899 AC_DEFINE(AIX_SMT_EXP, -bI:/usr/lpp/X11/bin/smt.exp) | |
2900 elif test -f /usr/bin/X11/smt.exp ; then | |
2901 AC_DEFINE(AIX_SMT_EXP, -bI:/usr/bin/X11/smt.exp) | |
2902 fi | |
2903 | |
2904 dnl # Set up the CFLAGS for real compilation, so we can substitute it. | |
2905 CFLAGS="$REAL_CFLAGS" | 2490 CFLAGS="$REAL_CFLAGS" |
2906 | 2491 |
2907 dnl # Find out which version of XEmacs this is. | 2492 dnl Find out which version of XEmacs this is. |
2908 file="${srcdir}/lisp/version.el" | 2493 file="$srcdir/lisp/version.el" |
2909 version=`sed -ne 's/^(defconst emacs-version "\(.*\)".*/\1/p' "$file"` | 2494 version=`sed -ne 's/^(defconst emacs-version "\(.*\)".*/\1/p' "$file"` |
2910 if test -z "${version}"; then | 2495 if test -z "$version"; then |
2911 echo "${progname}: can't find current emacs version in \"$file\"." >&2 | 2496 echo "$progname: can't find current emacs version in \"$file\"." >&2 |
2912 exit 1 | 2497 exit 1 |
2913 fi | 2498 fi |
2914 beta=`sed -ne 's/^.*XEmacs Lucid (beta\([[0-9]][[0-9]]*\)).*$/\1/p' "$file"` | 2499 beta=`sed -ne 's/^.*XEmacs Lucid (beta\([[0-9]][[0-9]]*\)).*$/\1/p' "$file"` |
2915 test -n "$beta" && version="${version}-b${beta}" | 2500 test -n "$beta" && version="${version}-b${beta}" |
2916 | 2501 |
2917 | 2502 |
2918 dnl # Check for sound of various sorts. | 2503 dnl Check for sound of various sorts. |
2919 | 2504 |
2920 # the following needs to be fixed for SGI. | 2505 dnl Autodetect native sound |
2921 if test -z "${native_sound_lib}" ; then | 2506 AC_CHECKING("for sound support") |
2922 if test -r /usr/demo/SOUND/lib/libaudio.a; then | 2507 case "$with_sound" in |
2923 native_sound_lib=/usr/demo/SOUND/lib/libaudio.a | 2508 native | both ) with_native_sound=yes;; |
2924 elif test -r /usr/demo/SOUND/libaudio.a ; then | 2509 nas | no ) with_native_sound=no;; |
2925 native_sound_lib=/usr/demo/SOUND/libaudio.a | 2510 esac |
2511 if test "$with_native_sound" != "no"; then | |
2512 dnl Autodetect Sun native sound from SUNWaudmo package | |
2513 if test -d "/usr/demo/SOUND"; then | |
2514 sound_found="yes" extra_objs="$extra_objs sunplay.o" | |
2515 if test -d "/usr/demo/SOUND/include" | |
2516 then sound_cflags="-I/usr/demo/SOUND/include" | |
2517 else sound_cflags="-I/usr/demo/SOUND" | |
2518 fi | |
2519 if test -z "$native_sound_lib" ; then | |
2520 if test -r "/usr/demo/SOUND/lib/libaudio.a" | |
2521 then native_sound_lib="/usr/demo/SOUND/lib/libaudio.a" | |
2522 else native_sound_lib="/usr/demo/SOUND/libaudio.a" | |
2523 fi | |
2524 fi | |
2926 else | 2525 else |
2927 case "${canonical}" in | 2526 case "$canonical" in \ |
2928 *-sgi-* ) AC_HAVE_LIBRARY(-laudio, native_sound_lib="-laudio") ;; | 2527 *-sgi-* ) |
2929 hppa*-hp-hpux* ) AC_HAVE_LIBRARY(-lAlib, native_sound_lib="-lAlib") ;; | 2528 AC_CHECK_LIB(audio, ALopenport, native_sound_lib="-laudio") |
2529 if test "$native_sound_lib" = "-laudio"; then | |
2530 sound_found="yes" extra_objs="$extra_objs sgiplay.o" sound_cflags="" | |
2531 fi ;; | |
2532 hppa*-hp-hpux* ) | |
2533 AC_CHECK_LIB(Alib, AOpenAudio, native_sound_lib="-lAlib") | |
2534 if test "$native_sound_lib" = "-lAlib"; then | |
2535 sound_found="yes" extra_objs="$extra_objs hpplay.o" | |
2536 if test "$with_gcc" = "yes" # Kludge city | |
2537 then sound_cflags="-Dconst= -Dvolatile= -I/usr/audio/examples" | |
2538 else sound_cflags="+e -I/usr/audio/examples" | |
2539 fi | |
2540 fi ;; | |
2930 esac | 2541 esac |
2931 fi | 2542 fi |
2932 fi | 2543 |
2933 test -z "${with_sound}" -a -n "${native_sound_lib}" && with_sound="native"; | 2544 if test -z "$sound_found"; then |
2934 | 2545 for dir in "machine" "sys" "linux"; do |
2935 #### If the nas library doesn't contain the error jump point, then | 2546 AC_CHECK_HEADER(${dir}/soundcard.h, |
2936 #### we force safer behaviour. | 2547 sound_found=yes |
2937 | 2548 extra_objs="$extra_objs linuxplay.o" |
2938 if test "${with_sound}" = "nas" -o \ | 2549 [AC_DEFINE_UNQUOTED(SOUNDCARD_H_PATH, "${dir}/soundcard.h")] |
2939 "${with_sound}" = "both"; then | 2550 break) |
2940 AC_HEADER_EGREP(AuXtErrorJump,audio/Xtutil.h, , old_nas=true) | 2551 done |
2941 fi | |
2942 | |
2943 if test "${with_cde}" = "yes" ; then | |
2944 if test -f "/usr/dt/include/Dt/Dt.h" ; then | |
2945 C_SWITCH_X_SITE="${C_SWITCH_X_SITE} -I/usr/dt/include" | |
2946 fi | 2552 fi |
2947 if test -f "/usr/dt/lib/libDtSvc.a" ; then | 2553 |
2948 LD_SWITCH_X_SITE="${LD_SWITCH_X_SITE} -L/usr/dt/lib" | 2554 test "$sound_found" = "yes" && with_native_sound=yes |
2555 fi | |
2556 | |
2557 if test -z "$with_sound"; then | |
2558 if test "$with_native_sound" = "yes" -o -n "$native_sound_lib"; then | |
2559 with_sound=native | |
2949 fi | 2560 fi |
2950 fi | 2561 fi |
2951 | 2562 |
2952 if test "${with_tooltalk}" = "yes" ; then | 2563 if test "$with_native_sound" = "yes"; then |
2953 for arg in "-I/usr/include/desktop" "-I${OPENWINHOME-/usr/openwin}/include/desktop" "-I/usr/dt/include/Tt" | 2564 AC_DEFINE(HAVE_NATIVE_SOUND) |
2954 do | 2565 test -n "$native_sound_lib" && LIBS="$LIBS $native_sound_lib" |
2955 if test -f `echo "${arg}/tt_c.h" | sed 's/^\-I//'` ; then | 2566 fi |
2956 C_SWITCH_X_SITE="${C_SWITCH_X_SITE} ${arg}" | 2567 |
2957 fi | 2568 case "$with_sound" in both | nas ) |
2958 done | 2569 AC_DEFINE(HAVE_NAS_SOUND) |
2959 for arg in "-L/usr/lib" "-L${OPENWINHOME-/usr/openwin}/lib" "-L/usr/dt/lib" | 2570 extra_objs="$extra_objs nas.o" |
2960 do | 2571 LIBS="$LIBS -laudio" |
2961 case "${arg}" in | 2572 dnl If the nas library does not contain the error jump point, |
2962 -L*) if test -f `echo "${arg}/libtt.a" | sed 's/^\-L//'` ; then | 2573 dnl then we force safer behaviour. |
2963 dash_r='' | 2574 AC_EGREP_HEADER(AuXtErrorJump,audio/Xtutil.h,,[AC_DEFINE(NAS_NO_ERROR_JUMP)]) |
2964 if test "${add_runtime_flag}" = "yes" ; then | 2575 esac |
2965 dash_r=`echo ${arg} | sed "s/^-L */${runtime_arg}/"` | 2576 |
2966 fi | 2577 |
2967 LD_SWITCH_X_SITE="${LD_SWITCH_X_SITE} ${arg} ${dash_r}" | 2578 dnl TTY-dependent options |
2968 fi | 2579 |
2969 ;; | 2580 |
2970 esac | 2581 AC_CHECKING("how to do terminal I/O") |
2971 done | 2582 |
2972 fi | 2583 test -z "$with_tty" && with_tty=yes |
2973 | 2584 |
2974 dnl Check for ncurses. | 2585 if test "$with_tty" = "yes" ; then |
2975 | 2586 AC_DEFINE(HAVE_TTY) |
2976 if test "${with_tty}" != "no" ; then | 2587 |
2977 AC_HAVE_LIBRARY(-lncurses, have_ncurses=yes, have_ncurses=no) | 2588 dnl Check for terminal I/O variants |
2978 if test "${have_ncurses}" = "yes" ; then | 2589 dnl TERMIOS systems may have termio.h, but not vice-versa, I think. |
2590 AC_CHECK_HEADER(termios.h, [AC_DEFINE(HAVE_TERMIOS)], | |
2591 [AC_CHECK_HEADER(termio.h, [AC_DEFINE(HAVE_TERMIO)])]) | |
2592 | |
2593 dnl Autodetect gpm | |
2594 #### Attn: Bill Perry: Remove next line when GPM support is added | |
2595 test -z "$with_gpm" && with_gpm=no | |
2596 | |
2597 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) } | |
2599 if test "$with_gpm" = "yes"; then | |
2600 AC_DEFINE(HAVE_GPM) | |
2601 extra_objs="$extra_objs gpmevent.o" | |
2602 LIBS="$LIBS -lgpm" | |
2603 fi | |
2604 | |
2605 dnl Autodetect ncurses. | |
2606 if test -z "$with_ncurses"; then | |
2607 AC_CHECK_LIB(ncurses, tparm, with_ncurses=yes, with_ncurses=no) | |
2608 fi | |
2609 if test "$with_ncurses" = "yes"; then | |
2979 AC_DEFINE(HAVE_NCURSES) | 2610 AC_DEFINE(HAVE_NCURSES) |
2980 AC_HEADER_CHECK(ncurses/term.h, have_ncurses_term_h=yes, have_ncurses_term_h=no) | 2611 AC_CHECK_HEADER(ncurses/curses.h, curses_h_path=ncurses/curses.h) |
2981 IF_YES_AC_DEFINE(have_ncurses_term_h, HAVE_NCURSES_TERM_H) | 2612 AC_CHECK_HEADER(ncurses/term.h, term_h_path=ncurses/term.h) |
2982 AC_HEADER_CHECK(ncurses/curses.h, have_ncurses_curses_h=yes, have_ncurses_curses_h=no) | 2613 extra_objs="$extra_objs terminfo.o" |
2983 if test "${have_ncurses_curses_h}" = "no" ; then | 2614 LIBS="$LIBS -lncurses" |
2615 | |
2616 if test "$ac_cv_header_ncurses_curses_h" != "yes" ; then | |
2984 dnl Try again, and check for the bogus ncurses/ include bug. | 2617 dnl Try again, and check for the bogus ncurses/ include bug. |
2985 dnl (i.e. ncurses/curses.h bogusly includes <unctrl.h> instead of | 2618 dnl (i.e. ncurses/curses.h bogusly includes <unctrl.h> instead of |
2986 dnl <ncurses/unctrl.h>) | 2619 dnl <ncurses/unctrl.h>) |
2987 OLD_CPP="${CPP}" | 2620 save_c_switch_site="$c_switch_site" |
2988 CPP="${CPP} -I/usr/include/ncurses" | 2621 c_switch_site="$c_switch_site -I/usr/include/ncurses" |
2989 AC_HEADER_CHECK(ncurses/curses.h, have_ncurses_curses_h=yes, have_ncurses_curses_h=no) | 2622 AC_CHECK_HEADER(ncurses/curses.h, curses_h_path=ncurses/curses.h) |
2990 if test "${have_ncurses_curses_h}" = "yes" ; then | 2623 if test "$ac_cv_header_ncurses_curses_h" = "yes"; |
2991 site_includes="${site_includes} /usr/include/ncurses" | 2624 then AC_MSG_WARN("Your system has the bogus ncurses include bug.") |
2992 C_SWITCH_SITE="${C_SWITCH_SITE} -I/usr/include/ncurses" | 2625 else c_switch_site="$save_c_switch_site" |
2993 AC_VERBOSE(Your system has the bogus ncurses include bug.) | |
2994 else | |
2995 CPP="${OLD_CPP}" | |
2996 fi | 2626 fi |
2997 fi | 2627 fi |
2998 IF_YES_AC_DEFINE(have_ncurses_curses_h, HAVE_NCURSES_CURSES_H) | 2628 else dnl "$with_ncurses" = "no" |
2629 dnl Autodetect terminfo/-ltermlib/-ltermcap/-lcurses | |
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 | |
2635 extra_objs="$extra_objs terminfo.o" | |
2636 if test -n "$libs_termcap"; then LIBS="$LIBS $libs_termcap" | |
2637 elif test "$have_libcurses" = "yes"; then LIBS="$LIBS -lcurses" | |
2638 elif test "$have_libtermlib" = "yes"; then LIBS="$LIBS -ltermlib" | |
2639 elif test "$have_libtermcap" = "yes"; then LIBS="$LIBS -ltermcap" | |
2640 fi | |
2641 else dnl "$have_terminfo" = "no" && "with_ncurses" = "no" | |
2642 extra_objs="$extra_objs tparam.o" | |
2643 if test -n "$libs_termcap"; then LIBS="$LIBS $libs_termcap" | |
2644 elif test "$have_libtermcap" = "yes"; then LIBS="$LIBS -ltermcap" | |
2645 elif test "$have_libcurses" = "yes"; then LIBS="$LIBS -lcurses" | |
2646 else extra_objs="$extra_objs termcap.o" | |
2647 fi | |
2648 fi | |
2999 fi | 2649 fi |
3000 fi | 2650 AC_DEFINE_UNQUOTED(CURSES_H_PATH, "${curses_h_path-curses.h}") |
3001 | 2651 AC_DEFINE_UNQUOTED(TERM_H_PATH, "${term_h_path-term.h}") |
3002 dnl Check for database support. | 2652 else # "$with_tty" = "no" |
3003 | 2653 for feature in ncurses gpm; do |
3004 dnl <mdiers@logware.de> | 2654 if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then |
3005 dnl We don't necessarily have to have libdb/lib(g)dbm for DB/(G)DBM support. | 2655 AC_MSG_WARN("--with-${feature} ignored: Not valid without TTY support") |
2656 fi | |
2657 eval "with_${feature}=no" | |
2658 done | |
2659 fi | |
2660 | |
2661 dnl Database support | |
2662 dnl <mdiers@logware.de> | |
2663 dnl We do not necessarily have to have libdb/lib(g)dbm for DB/(G)DBM support. | |
3006 dnl On FreeBSD, both DB and DBM are part of libc. | 2664 dnl On FreeBSD, both DB and DBM are part of libc. |
3007 dnl Note that unless support for DB/(G)DBM is explicitly disabled, we always | 2665 dnl Note that unless support for DB/(G)DBM is explicitly disabled, we always |
3008 dnl want to check for libdb/lib(g)dbm. Also note that libc will not be | 2666 dnl want to check for libdb/lib(g)dbm. Also note that libc will not be |
3009 dnl checked if we have the libraries. | 2667 dnl checked if we have the libraries. |
3010 dnl If support for DB/(G)DBM is requested, but we neither have libdb/lib(g)dbm, | 2668 dnl If support for DB/(G)DBM is requested, but we neither have libdb/lib(g)dbm, |
3011 dnl nor does libc implement it, we are a bit lost :) | 2669 dnl nor does libc implement it, we are a bit lost :) |
3012 | 2670 |
3013 if test "${with_database_berkdb}" != "no" ; then | 2671 AC_CHECKING(for database support) |
3014 AC_HAVE_LIBRARY(-ldb, have_libdb=yes, have_libdb=no) | 2672 |
3015 IF_YES_AC_DEFINE(have_libdb, HAVE_LIBDB) | 2673 if test "$with_database_gnudbm" != "no" ; then |
3016 if test "${with_database_berkdb}" != "yes" ; then | 2674 AC_CHECK_LIB(gdbm, dbm_open, with_database_gnudbm=yes have_libgdbm=yes) |
3017 if test "${have_libdb}" = "yes" ; then | 2675 if test "$with_database_gnudbm" != "yes"; then |
3018 with_database_berkdb=yes | 2676 AC_CHECK_FUNC(dbm_open, with_database_gnudbm=yes) |
3019 else | 2677 fi |
3020 AC_FUNC_CHECK(dbopen, with_database_berkdb=yes, with_database_berkdb=no) | 2678 if test "$with_database_gnudbm" = "yes" ; then |
2679 AC_DEFINE(HAVE_DBM) | |
2680 test "$have_libgdbm" = "yes" && LIBS="$LIBS -lgdbm" | |
2681 with_database_dbm=no | |
2682 else with_database_gnudbm=no | |
2683 fi | |
2684 fi | |
2685 | |
2686 if test "$with_database_dbm" != "no" ; then | |
2687 AC_CHECK_FUNC(dbm_open, with_database_dbm=yes need_libdbm=no) | |
2688 if test "$need_libdbm" != "no"; then | |
2689 AC_CHECK_LIB(dbm, dbm_open, with_database_dbm=yes need_libdbm=yes) | |
2690 fi | |
2691 if test "$with_database_dbm" = "yes" ; then | |
2692 AC_DEFINE(HAVE_DBM) | |
2693 test "$need_libdbm" = "yes" && LIBS="$LIBS -ldbm" | |
2694 else with_database_dbm=no | |
2695 fi | |
2696 fi | |
2697 | |
2698 if test "$with_database_berkdb" != "no"; then | |
2699 AC_CHECK_FUNC(dbopen, with_database_berkdb=yes need_libdb=no) | |
2700 if test "$need_libdb" != "no"; then | |
2701 AC_CHECK_LIB(db, dbopen, with_database_berkdb=yes need_libdb=yes) | |
3021 fi | 2702 fi |
2703 if test "$with_database_berkdb" = "yes"; then | |
2704 for path in "db/db.h" "db.h"; do | |
2705 AC_TRY_COMPILE([#ifdef HAVE_INTTYPES_H | |
2706 #define __BIT_TYPES_DEFINED__ | |
2707 #include <inttypes.h> | |
2708 typedef uint8_t u_int8_t; | |
2709 typedef uint16_t u_int16_t; | |
2710 typedef uint32_t u_int32_t; | |
2711 #ifdef WE_DONT_NEED_QUADS | |
2712 typedef uint64_t u_int64_t; | |
2713 #endif | |
2714 #endif | |
2715 #include <$path> | |
2716 ],[], db_h_path="$path"; break) | |
2717 done | |
2718 test -z "$db_h_path" && with_database_berkdb=no | |
3022 fi | 2719 fi |
3023 fi | 2720 if test "$with_database_berkdb" = "yes"; then |
3024 IF_YES_AC_DEFINE(with_database_berkdb, HAVE_BERKELEY_DB) | 2721 AC_DEFINE_UNQUOTED(DB_H_PATH, "$db_h_path") |
3025 | 2722 AC_DEFINE(HAVE_BERKELEY_DB) |
3026 if test "${with_database_gnudbm}" != "no" ; then | 2723 test "$need_libdb" = "yes" && LIBS="$LIBS -ldb" |
3027 AC_HAVE_LIBRARY(-lgdbm, have_libgdbm=yes, have_libgdbm=no) | 2724 else with_database_berkdb=no |
3028 IF_YES_AC_DEFINE(have_libgdbm, HAVE_LIBGDBM) | |
3029 test -z "${with_database_gnudbm}" && with_database_gnudbm="${have_libgdbm}" | |
3030 fi | |
3031 if test "${with_database_gnudbm}" = "yes" ; then | |
3032 AC_DEFINE(HAVE_DBM) | |
3033 AC_DEFINE(HAVE_GNU_DBM) | |
3034 with_database_dbm=no | |
3035 fi | |
3036 | |
3037 if test "${with_database_dbm}" != "no" ; then | |
3038 AC_HAVE_LIBRARY(-ldbm, have_libdbm=yes, have_libdbm=no) | |
3039 IF_YES_AC_DEFINE(have_libdbm, HAVE_LIBDBM) | |
3040 if test "${with_database_dbm}" != "yes" ; then | |
3041 if test "${have_libdbm}" = "yes" ; then | |
3042 with_database_dbm=yes | |
3043 else | |
3044 AC_FUNC_CHECK(dbm_open, with_database_dbm=yes, with_database_dbm=no) | |
3045 fi | |
3046 fi | 2725 fi |
3047 fi | 2726 fi |
3048 IF_YES_AC_DEFINE(with_database_dbm, HAVE_DBM) | 2727 |
3049 | 2728 if test "$with_database_gnudbm" = "yes" -o \ |
3050 | 2729 "$with_database_dbm" = "yes" -o \ |
3051 ############################################################################ | 2730 "$with_database_berkdb" = "yes"; then |
3052 # # | 2731 AC_DEFINE(HAVE_DATABASE) |
3053 # Substitute into Makefile and config.h # | 2732 extra_objs="$extra_objs database.o" |
3054 # # | 2733 fi |
3055 ############################################################################ | 2734 |
3056 | 2735 dnl Socks support |
3057 dnl what sort of things we'll be editing into Makefile and config.h. | 2736 if test "$with_socks" = "yes"; then |
2737 AC_CHECK_LIB(socks, SOCKSinit) | |
2738 test -n "$ac_cv_lib_socks_SOCKSinit" && AC_DEFINE(HAVE_SOCKS) | |
2739 fi | |
2740 | |
2741 dnl Usage tracking (undocumented and likely unused option) | |
2742 if test "$usage_tracking" = "yes"; then | |
2743 AC_DEFINE(USAGE_TRACKING) | |
2744 LIBS="$LIBS -Bstatic -lut -Bdynamic" | |
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 | |
2811 | |
2812 dnl -------------------------------- | |
2813 dnl Compute SUBST-itutable variables | |
2814 dnl -------------------------------- | |
2815 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" | |
2817 c_switch_window_system="$c_switch_x_site $X_CFLAGS" | |
2818 c_switch_all="$c_switch_general $c_switch_window_system" | |
2819 ld_switch_general="$ld_switch_site $ld_switch_machine $ld_switch_system" | |
2820 ld_switch_window_system="$ld_switch_x_site" | |
2821 ld_switch_all="$ld_switch_general $ld_switch_window_system" | |
2822 ld_libs_general="$LIBS $libs_machine $libs_system $libs_standard" | |
2823 ld_libs_window_system="$X_PRE_LIBS $libs_x $X_EXTRA_LIBS" | |
2824 ld_libs_all="$ld_libs_window_system $ld_libs_general" | |
2825 | |
2826 dnl Compute lists of Makefiles | |
2827 internal_makefile_list="Makefile" | |
2828 SUBDIR_MAKEFILES='' | |
2829 for dir in $MAKE_SUBDIR; do | |
2830 SUBDIR_MAKEFILES="$SUBDIR_MAKEFILES $dir/Makefile" | |
2831 internal_makefile_list="$internal_makefile_list $dir/Makefile.in" | |
2832 done | |
2833 AC_SUBST(MAKE_SUBDIR) | |
2834 AC_SUBST(SUBDIR_MAKEFILES) | |
2835 | |
2836 if test "$extra_verbose" = "yes"; then | |
2837 echo "" | |
2838 PRINT_VAR(extra_objs, | |
2839 c_switch_general, c_switch_window_system, c_switch_all, | |
2840 ld_switch_general, ld_switch_window_system, ld_switch_all, | |
2841 ld_libs_general, ld_libs_window_system, ld_libs_all) | |
2842 echo "" | |
2843 fi | |
2844 | |
2845 dnl ------------------------------------- | |
2846 dnl Substitute into Makefile and config.h | |
2847 dnl ------------------------------------- | |
2848 | |
2849 dnl what sort of things to edit into Makefile and config.h. | |
3058 dnl configuration here uncanonicalized to avoid exceeding size limits. | 2850 dnl configuration here uncanonicalized to avoid exceeding size limits. |
3059 | 2851 |
3060 AC_SUBST(version) | 2852 AC_SUBST(version) |
3061 AC_SUBST(configuration) | 2853 AC_SUBST(configuration) |
3062 AC_SUBST(canonical) | 2854 AC_SUBST(canonical) |
3079 AC_SUBST(lockdir_user_defined) | 2871 AC_SUBST(lockdir_user_defined) |
3080 AC_SUBST(archlibdir) | 2872 AC_SUBST(archlibdir) |
3081 AC_SUBST(archlibdir_user_defined) | 2873 AC_SUBST(archlibdir_user_defined) |
3082 AC_SUBST(docdir) | 2874 AC_SUBST(docdir) |
3083 AC_SUBST(bitmapdir) | 2875 AC_SUBST(bitmapdir) |
3084 AC_SUBST(c_switch_system) | 2876 AC_SUBST(extra_objs) |
3085 AC_SUBST(c_switch_machine) | 2877 |
3086 AC_SUBST(libsrc_libs) | 2878 dnl The following flags combine all the information from: |
3087 AC_SUBST(LD_SWITCH_X_SITE) | 2879 dnl - command line options (user always gets priority) |
3088 AC_SUBST(LD_SWITCH_X_SITE_AUX) | 2880 dnl - user environment variables |
3089 AC_SUBST(C_SWITCH_X_SITE) | 2881 dnl - determined by configure |
3090 AC_SUBST(LD_SWITCH_SITE) | 2882 dnl - the s&m header files (deprecated) |
3091 AC_SUBST(C_SWITCH_SITE) | |
3092 AC_SUBST(CFLAGS) | |
3093 AC_SUBST(native_sound_lib) | |
3094 AC_SUBST(machfile) | 2883 AC_SUBST(machfile) |
3095 AC_SUBST(opsysfile) | 2884 AC_SUBST(opsysfile) |
2885 AC_SUBST(c_switch_general) | |
2886 AC_SUBST(c_switch_window_system) | |
2887 AC_SUBST(c_switch_all) | |
2888 AC_SUBST(ld_switch_general) | |
2889 AC_SUBST(ld_switch_window_system) | |
2890 AC_SUBST(ld_switch_all) | |
2891 AC_SUBST(ld_libs_general) | |
2892 AC_SUBST(ld_libs_window_system) | |
2893 AC_SUBST(ld_libs_all) | |
2894 AC_SUBST(libsrc_libs) | |
2895 AC_SUBST(CFLAGS) | |
2896 AC_SUBST(CPPFLAGS) | |
2897 AC_SUBST(LDFLAGS) | |
2898 | |
2899 AC_SUBST(native_sound_lib) | |
2900 AC_SUBST(sound_cflags) | |
3096 AC_SUBST(RANLIB) | 2901 AC_SUBST(RANLIB) |
3097 AC_SUBST(dynodump_arch) | 2902 AC_SUBST(dynodump_arch) |
3098 | 2903 |
3099 AC_DEFINE_UNQUOTED(EMACS_VERSION, "${version}") | 2904 AC_DEFINE_UNQUOTED(EMACS_VERSION, $version) |
3100 AC_DEFINE_UNQUOTED(EMACS_CONFIGURATION, "\"${canonical}\"") | 2905 AC_DEFINE_UNQUOTED(EMACS_CONFIGURATION, "$canonical") |
3101 AC_DEFINE_UNQUOTED(config_machfile, "\"${machfile}\"") | 2906 AC_DEFINE_UNQUOTED(config_machfile, "$machfile") |
3102 AC_DEFINE_UNQUOTED(config_opsysfile, "\"${opsysfile}\"") | 2907 AC_DEFINE_UNQUOTED(config_opsysfile, "$opsysfile") |
3103 AC_DEFINE_UNQUOTED(LD_SWITCH_X_SITE, ${LD_SWITCH_X_SITE}) | 2908 AC_DEFINE_UNQUOTED(UNEXEC_SRC, $UNEXEC_SRC) |
3104 AC_DEFINE_UNQUOTED(LD_SWITCH_X_SITE_AUX, ${LD_SWITCH_X_SITE_AUX}) | 2909 |
3105 AC_DEFINE_UNQUOTED(C_SWITCH_X_SITE, ${C_SWITCH_X_SITE}) | 2910 dnl Following are deprecated |
3106 AC_DEFINE_UNQUOTED(LD_SWITCH_SITE, ${LD_SWITCH_SITE}) | 2911 |
3107 AC_DEFINE_UNQUOTED(C_SWITCH_SITE, ${C_SWITCH_SITE}) | 2912 null_string="" |
3108 AC_DEFINE_UNQUOTED(UNEXEC_SRC, ${UNEXEC_SRC}) | 2913 AC_DEFINE_UNQUOTED(LD_SWITCH_X_SITE, $null_string) |
2914 AC_DEFINE_UNQUOTED(LD_SWITCH_X_SITE_AUX, $null_string) | |
2915 AC_DEFINE_UNQUOTED(C_SWITCH_X_SITE, $null_string) | |
2916 AC_DEFINE_UNQUOTED(LD_SWITCH_SITE, $null_string) | |
2917 AC_DEFINE_UNQUOTED(C_SWITCH_SITE, $null_string) | |
3109 | 2918 |
3110 dnl Note: as a general rule, *only* define things here that are not | 2919 dnl Note: as a general rule, *only* define things here that are not |
3111 dnl autodetected. For things that are autodetected, define them | 2920 dnl autodetected. For things that are autodetected, define them |
3112 dnl at the point where the autodetection occurs or would occur, | 2921 dnl at the point where the autodetection occurs or would occur, |
3113 dnl so that the user gets immediate feedback on the results of the | 2922 dnl so that the user gets immediate feedback on the results of the |
3114 dnl autodetection. | 2923 dnl autodetection. |
3115 | 2924 |
3116 test -n "${puresize}" && AC_DEFINE_UNQUOTED(RAW_PURESIZE, ${puresize}) | 2925 test -n "$puresize" && AC_DEFINE_UNQUOTED(RAW_PURESIZE, $puresize) |
3117 IF_YES_AC_DEFINE(HAVE_X_WINDOWS,HAVE_X_WINDOWS) | 2926 |
3118 IF_YES_AC_DEFINE(HAVE_XFREE386, HAVE_XFREE386) | 2927 if test "$GNU_MALLOC" = "yes"; then AC_DEFINE(GNU_MALLOC) |
3119 | 2928 elif test "$use_system_malloc" = "yes"; then AC_DEFINE(USE_SYSTEM_MALLOC) |
3120 if test "${GNU_MALLOC}" = yes; then AC_DEFINE(GNU_MALLOC) | 2929 fi |
3121 elif test "${use_system_malloc}" = yes; then AC_DEFINE(USE_SYSTEM_MALLOC) | 2930 test "$with_motif" = "yes" && AC_DEFINE(LWLIB_USES_MOTIF) |
3122 fi | 2931 test "$with_i18n3" = "yes" && AC_DEFINE(I18N3) |
3123 IF_YES_AC_DEFINE(rel_alloc, REL_ALLOC) | 2932 test "$with_mocklisp" = "yes" && AC_DEFINE(MOCKLISP_SUPPORT) |
3124 IF_YES_AC_DEFINE(LISP_FLOAT_TYPE, LISP_FLOAT_TYPE) | 2933 test "$with_gcc" = "yes" && AC_DEFINE(USE_GCC) |
3125 IF_YES_AC_DEFINE(with_motif, LWLIB_USES_MOTIF) | 2934 test "$with_term" = "yes" && AC_DEFINE(HAVE_TERM) |
3126 IF_YES_AC_DEFINE(with_athena, LWLIB_USES_ATHENA) | 2935 test "$external_widget" = "yes" && AC_DEFINE(EXTERNAL_WIDGET) |
3127 IF_YES_AC_DEFINE(with_toolbars, HAVE_TOOLBARS) | 2936 test "$with_gnu_make" = "yes" && AC_DEFINE(USE_GNU_MAKE) |
3128 IF_YES_AC_DEFINE(with_tty, HAVE_TTY) | 2937 test "$no_doc_file" = "yes" && AC_DEFINE(NO_DOC_FILE) |
3129 IF_YES_AC_DEFINE(with_tooltalk, TOOLTALK) | 2938 test "$const_is_losing" = "yes" && AC_DEFINE(CONST_IS_LOSING) |
3130 IF_YES_AC_DEFINE(with_i18n3, I18N3) | 2939 test "$use_assertions" = "yes" && AC_DEFINE(USE_ASSERTIONS) |
3131 IF_YES_AC_DEFINE(with_mule, MULE) | 2940 test "$debug" = "yes" && AC_DEFINE(DEBUG_XEMACS) |
3132 IF_YES_AC_DEFINE(with_canna, HAVE_CANNA) | 2941 test "$with_quantify" = "yes" && AC_DEFINE(QUANTIFY) |
3133 IF_YES_AC_DEFINE(with_wnn, HAVE_WNN) | 2942 test "$memory_usage_stats" = "yes" && AC_DEFINE(MEMORY_USAGE_STATS) |
3134 IF_YES_AC_DEFINE(with_wnn6, WNN6) | 2943 test "$with_pop" = "yes" && AC_DEFINE(MAIL_USE_POP) |
3135 IF_YES_AC_DEFINE(with_mock, MOCKLISP_SUPPORT) | 2944 test "$with_kerberos" = "yes" && AC_DEFINE(KERBEROS) |
3136 IF_YES_AC_DEFINE(with_sparcworks,SUNPRO) | 2945 test "$with_hesiod" = "yes" && AC_DEFINE(HESIOD) |
3137 IF_YES_AC_DEFINE(usage_tracking, USAGE_TRACKING) | 2946 |
3138 IF_YES_AC_DEFINE(need_dynodump, DYNODUMP) | 2947 test "$error_check_extents" = "yes" && AC_DEFINE(ERROR_CHECK_EXTENTS) |
3139 IF_YES_AC_DEFINE(need_xildoff, NEED_XILDOFF) | 2948 test "$error_check_typecheck" = "yes" && AC_DEFINE(ERROR_CHECK_TYPECHECK) |
3140 IF_YES_AC_DEFINE(with_gcc, USE_GCC) | 2949 test "$error_check_bufpos" = "yes" && AC_DEFINE(ERROR_CHECK_BUFPOS) |
3141 IF_YES_AC_DEFINE(with_lcc, USE_LCC) | 2950 test "$error_check_gc" = "yes" && AC_DEFINE(ERROR_CHECK_GC) |
3142 IF_YES_AC_DEFINE(with_socks, HAVE_SOCKS) | 2951 test "$error_check_malloc" = "yes" && AC_DEFINE(ERROR_CHECK_MALLOC) |
3143 IF_YES_AC_DEFINE(with_term, HAVE_TERM) | 2952 |
3144 IF_YES_AC_DEFINE(external_widget,EXTERNAL_WIDGET) | 2953 test "$use_union_type" != yes && AC_DEFINE(NO_UNION_TYPE) |
3145 IF_YES_AC_DEFINE(with_gnu_make, USE_GNU_MAKE) | 2954 |
3146 IF_YES_AC_DEFINE(no_doc_file, NO_DOC_FILE) | 2955 dnl ------------------------------- |
3147 IF_YES_AC_DEFINE(const_is_losing,CONST_IS_LOSING) | 2956 dnl Report on what we decided to do |
3148 IF_YES_AC_DEFINE(use_assertions, USE_ASSERTIONS) | 2957 dnl ------------------------------- |
3149 IF_YES_AC_DEFINE(debug, DEBUG_XEMACS) | |
3150 IF_YES_AC_DEFINE(quantify, QUANTIFY) | |
3151 IF_YES_AC_DEFINE(memory_usage_stats, MEMORY_USAGE_STATS) | |
3152 IF_YES_AC_DEFINE(with_pop, MAIL_USE_POP) | |
3153 IF_YES_AC_DEFINE(with_kerberos, KERBEROS) | |
3154 IF_YES_AC_DEFINE(with_hesiod, HESIOD) | |
3155 | |
3156 IF_YES_AC_DEFINE(error_check_extents, ERROR_CHECK_EXTENTS) | |
3157 IF_YES_AC_DEFINE(error_check_typecheck, ERROR_CHECK_TYPECHECK) | |
3158 IF_YES_AC_DEFINE(error_check_bufpos, ERROR_CHECK_BUFPOS) | |
3159 IF_YES_AC_DEFINE(error_check_gc, ERROR_CHECK_GC) | |
3160 IF_YES_AC_DEFINE(error_check_malloc, ERROR_CHECK_MALLOC) | |
3161 | |
3162 if test "${with_energize}" = yes; then | |
3163 AC_DEFINE(ENERGIZE) | |
3164 test "${energize_version}" = "2.X" && AC_DEFINE(ENERGIZE_2) | |
3165 test "${energize_version}" = "3.X" && AC_DEFINE(ENERGIZE_3) | |
3166 fi | |
3167 | |
3168 test "${with_sound}" = "native" -o "${with_sound}" = "both" && AC_DEFINE(HAVE_NATIVE_SOUND) | |
3169 test "${with_sound}" = "nas" -o "${with_sound}" = "both" && AC_DEFINE(HAVE_NAS_SOUND) | |
3170 test "${old_nas}" = "true" && AC_DEFINE(NAS_NO_ERROR_JUMP) | |
3171 | |
3172 test "${use_union_type}" != yes && AC_DEFINE(NO_UNION_TYPE) | |
3173 | |
3174 dnl ############################################################################ | |
3175 dnl # Report on what we decided to do # | |
3176 dnl ############################################################################ | |
3177 | 2958 |
3178 ( | 2959 ( |
3179 if test -f /etc/osversion; then | 2960 dnl /etc/osversion is on SONY NEWS-OS |
3180 # SONY NEWS-OS | 2961 if test -f /etc/osversion; then dnl SONY NEWS-OS |
3181 echo "osversion: `cat /etc/osversion`" | 2962 echo "osversion: `cat /etc/osversion`" |
3182 eles | 2963 else |
3183 echo "uname -a: `uname -a`" | 2964 echo "uname -a: `uname -a`" |
3184 fi | 2965 fi |
3185 echo "" | 2966 echo "" |
3186 echo "$0 $quoted_arguments" | 2967 echo "$0 $quoted_arguments" |
3187 ) >> Installation | 2968 ) >> Installation |
3188 # Start stdout redirection to '| tee -a Installation' | 2969 |
2970 dnl Start stdout redirection to '| tee -a Installation' | |
3189 ( | 2971 ( |
3190 echo " | 2972 echo " |
3191 | 2973 |
3192 Configured for \`${canonical}'. | 2974 Configured for \`$canonical'. |
3193 | 2975 |
3194 Where should the build process find the source code? ${srcdir} | 2976 Where should the build process find the source code? $srcdir |
3195 What installation prefix should install use? ${prefix} | 2977 What installation prefix should install use? $prefix |
3196 What operating system and machine description files should XEmacs use? | 2978 What operating system and machine description files should XEmacs use? |
3197 \`${opsysfile}' and \`${machfile}' | 2979 \`$opsysfile' and \`$machfile' |
3198 What compiler should XEmacs be built with? ${CC} ${CFLAGS} | 2980 What compiler should XEmacs be built with? $CC $CFLAGS |
3199 Should XEmacs use the GNU version of malloc? ${GNU_MALLOC}${GNU_MALLOC_reason} | 2981 Should XEmacs use the GNU version of malloc? ${GNU_MALLOC}${GNU_MALLOC_reason} |
3200 Should XEmacs use the relocating allocator for buffers? ${rel_alloc} | 2982 Should XEmacs use the relocating allocator for buffers? $rel_alloc |
3201 What window system should XEmacs use? ${window_system}${x_includes+ | 2983 What window system should XEmacs use? ${window_system}" |
3202 Where do we find X Windows header files? }${x_includes}${x_libraries+ | 2984 if test "$with_x11" = "yes"; then |
3203 Where do we find X Windows libraries? }${x_libraries}" | 2985 echo " Where do we find X Windows header files? $x_includes" |
3204 | 2986 echo " Where do we find X Windows libraries? $x_libraries" |
2987 fi | |
3205 if test -n "$site_includes"; then | 2988 if test -n "$site_includes"; then |
3206 echo " Additional header files: ${site_includes}" | 2989 echo " Additional header files: $site_includes" |
3207 fi | 2990 fi |
3208 | 2991 if test -n "$site_libraries"; then |
3209 if test -n "$site_libraries" -a -n "$site_runtime_libraries"; then | 2992 echo " Additional libraries: $site_libraries" |
3210 echo " Additional libraries: ${site_libraries} ${site_runtime_libraries}" | 2993 fi |
3211 elif test -n "$site_libraries"; then | 2994 if test -n "$runpath"; then |
3212 echo " Additional libraries: ${site_libraries}" | 2995 echo " Runtime library search path: $runpath" |
3213 elif test -n "$site_runtime_libraries"; then | |
3214 echo " Additional libraries: ${site_runtime_libraries}" | |
3215 fi | 2996 fi |
3216 test "$with_dnet" = yes && echo " Compiling in support for DNET." | 2997 test "$with_dnet" = yes && echo " Compiling in support for DNET." |
3217 test "$with_socks" = yes && echo " Compiling in support for SOCKS." | 2998 test "$with_socks" = yes && echo " Compiling in support for SOCKS." |
3218 test "$with_term" = yes && echo " Compiling in support for TERM." | 2999 test "$with_term" = yes && echo " Compiling in support for TERM." |
3219 test "$with_xauth" = yes && echo " Compiling in support for XAUTH." | 3000 test "$with_xauth" = yes && echo " Compiling in support for XAUTH." |
3220 test "$with_xpm" = yes && echo " Compiling in support for XPM." | 3001 if test "$with_xmu" != yes -a "$with_x11" = yes; then |
3221 if test "$with_xmu" != yes -a "$window_system" != none; then | |
3222 echo " No Xmu; substituting equivalent routines." | 3002 echo " No Xmu; substituting equivalent routines." |
3223 fi | 3003 fi |
3224 test "$with_xface" = yes && echo " Compiling in support for X-Face headers." | 3004 |
3225 test "$with_gif" = yes && echo " Compiling in support for GIF image conversion." | 3005 test "$with_gif" = yes && echo " Compiling in support for GIF image conversion." |
3006 test "$with_xpm" = yes && echo " Compiling in support for XPM images." | |
3007 test "$with_xface" = yes && echo " Compiling in support for X-Face message headers." | |
3226 test "$with_jpeg" = yes && echo " Compiling in support for JPEG image conversion." | 3008 test "$with_jpeg" = yes && echo " Compiling in support for JPEG image conversion." |
3227 if test "$with_png" = yes -o "$with_png" = gnuz; then | 3009 test "$with_png" = yes && echo " Compiling in support for PNG image conversion." |
3228 echo " Compiling in support for PNG image conversion." | |
3229 fi | |
3230 if test "$with_png" = gnuz; then | |
3231 echo " (Using -lgz instead of -lz.)" | |
3232 fi | |
3233 test "$with_tiff" = yes && echo " Compiling in support for TIFF image conversion (not implemented)." | 3010 test "$with_tiff" = yes && echo " Compiling in support for TIFF image conversion (not implemented)." |
3234 | 3011 |
3235 test "$with_sound" = nas && echo " Compiling in network sound support." | 3012 case "$with_sound" in |
3236 test "$with_sound" = native && echo " Compiling in native sound support." | 3013 nas ) echo " Compiling in network sound (NAS) support." ;; |
3237 test "$with_sound" = both && echo " Compiling in both network and native sound support." | 3014 native ) echo " Compiling in native sound support." ;; |
3238 test "$old_nas" = true && echo " nas library lacks error trapping, will play synchronously" | 3015 both ) echo " Compiling in both network and native sound support." ;; |
3016 esac | |
3017 test "$old_nas" = yes && echo " nas library lacks error trapping, will play synchronously" | |
3239 | 3018 |
3240 test "$with_database_berkdb" = yes && echo " Compiling in support for Berkeley DB." | 3019 test "$with_database_berkdb" = yes && echo " Compiling in support for Berkeley DB." |
3241 test "$with_database_dbm" = yes && echo " Compiling in support for DBM." | 3020 test "$with_database_dbm" = yes && echo " Compiling in support for DBM." |
3242 test "$with_database_gnudbm" = yes && echo " Compiling in support for GNU DBM." | 3021 test "$with_database_gnudbm" = yes && echo " Compiling in support for GNU DBM." |
3243 | 3022 |
3244 test "$have_ncurses" = yes && echo " Compiling in support for ncurses." | 3023 test "$with_ncurses" = yes && echo " Compiling in support for ncurses." |
3245 test "$with_socks" = yes && echo " Compiling in support for SOCKS." | 3024 test "$with_gpm" = yes && echo " Compiling in support for GPM (General Purpose Mouse)." |
3246 | 3025 |
3247 test "$with_mule" = yes && echo " Compiling in Mule (multi-lingual) support." | 3026 test "$with_mule" = yes && echo " Compiling in Mule (multi-lingual) support." |
3248 test "$with_xim" != no && echo " Compiling in XIM (X11R5+ I18N input method) support." | 3027 test "$with_xim" != no && echo " Compiling in XIM (X11R5+ I18N input method) support." |
3249 test "$with_xim" = motif && echo " Using Motif to provide XIM support." | 3028 test "$with_xim" = motif && echo " Using Motif to provide XIM support." |
3250 test "$with_xim" = xlib && echo " Using raw Xlib to provide XIM support." | 3029 test "$with_xim" = xlib && echo " Using raw Xlib to provide XIM support." |
3251 test "$with_canna" = yes && echo " Compiling in support for Canna on Mule." | 3030 test "$with_canna" = yes && echo " Compiling in support for Canna on Mule." |
3252 if test "$with_wnn" = yes; then | 3031 if test "$with_wnn" = yes; then |
3253 echo " Compiling in support for the WNN input method on Mule." | 3032 echo " Compiling in support for the WNN input method on Mule." |
3254 test "$with_wnn6" = yes && echo " WNN support for version 6." | 3033 test "$with_wnn6" = yes && echo " WNN support for version 6." |
3255 echo " Finding WNN includes with: ${wnn_includes}" | |
3256 echo " Finding WNN libs with: ${wnn_libraries}" | |
3257 fi | 3034 fi |
3258 test "$with_i18n3" = yes && echo " Compiling in I18N support, level 3 (doesn't currently work)." | 3035 test "$with_i18n3" = yes && echo " Compiling in I18N support, level 3 (doesn't currently work)." |
3259 | 3036 |
3260 test "$with_cde" = yes && echo " Compiling in support for CDE." | 3037 test "$with_cde" = yes && echo " Compiling in support for CDE." |
3261 test "$with_tooltalk" = yes && echo " Compiling in support for ToolTalk." | 3038 test "$with_tooltalk" = yes && echo " Compiling in support for ToolTalk." |
3262 test "$with_offix" = yes && echo " Compiling in support for OffiX." | 3039 test "$with_offix" = yes && echo " Compiling in support for OffiX." |
3263 test "$with_mocklisp" = yes && echo " Compiling in support for Mocklisp." | 3040 test "$with_mocklisp" = yes && echo " Compiling in support for Mocklisp." |
3264 test "$with_sparcworks" = yes && echo " Compiling in support for SparcWorks." | 3041 test "$with_workshop" = yes && echo " Compiling in support for Sun WorkShop." |
3265 test "$with_energize" = yes && echo " Compiling in support for Lucid Energize (doesn't currently work)." | 3042 test "$with_energize" = yes && echo " Compiling in support for Lucid Energize (doesn't currently work)." |
3266 test "$with_menubars" = "lucid" && echo " Using the Lucid menubar." | 3043 case "$with_menubars" in |
3267 if test "$with_menubars" = "motif"; then | 3044 lucid ) echo " Using the Lucid menubar." ;; |
3268 echo " Using the Motif menubar." | 3045 motif ) echo " Using the Motif menubar." |
3269 echo " *WARNING* The Motif menubar is currently buggy. We recommend" | 3046 echo " *WARNING* The Motif menubar is currently buggy." |
3270 echo " that you use the Lucid menubar instead. Re-run" | 3047 echo " We recommend using the Lucid menubar instead." |
3271 echo " configure with --with-menubars='lucid'." | 3048 echo " Re-run configure with --with-menubars='lucid'." ;; |
3272 fi | 3049 esac |
3273 test "$with_scrollbars" = lucid && echo " Using the Lucid scrollbar." | 3050 case "$with_scrollbars" in |
3274 test "$with_scrollbars" = motif && echo " Using the Motif scrollbar." | 3051 lucid ) echo " Using the Lucid scrollbar." ;; |
3275 test "$with_scrollbars" = athena && echo " Using the Athena scrollbar." | 3052 motif ) echo " Using the Motif scrollbar." ;; |
3276 test "$with_scrollbars" = athena3d && echo " Using the Athena-3d scrollbar." | 3053 athena ) echo " Using the Athena scrollbar." ;; |
3277 test "$with_dialogs" = motif && echo " Using the Motif dialog boxes." | 3054 athena3d ) echo " Using the Athena-3d scrollbar." ;; |
3278 test "$with_dialogs" = athena && echo " Using the Athena dialog boxes." | 3055 esac |
3279 test "$with_dialogs" = athena3d && echo " Using the Athena-3d dialog boxes." | 3056 case "$with_dialogs" in |
3057 motif ) echo " Using the Motif dialog boxes." ;; | |
3058 athena ) echo " Using the Athena dialog boxes." ;; | |
3059 athena3d ) echo " Using the Athena-3d dialog boxes." ;; | |
3060 esac | |
3280 test "$with_pop" = yes && echo " Using POP for mail access" | 3061 test "$with_pop" = yes && echo " Using POP for mail access" |
3281 test "$with_kerberos" = yes && echo " Using Kerberos for POP authentication" | 3062 test "$with_kerberos" = yes && echo " Using Kerberos for POP authentication" |
3282 test "$with_hesiod" = yes && echo " Using Hesiod to get POP server host" | 3063 test "$with_hesiod" = yes && echo " Using Hesiod to get POP server host" |
3283 | 3064 |
3284 test "${use_union_type}" = yes && echo " Using the union type for Lisp_Objects." | 3065 test "$use_union_type" = yes && echo " Using the union type for Lisp_Objects." |
3285 test "${debug}" = yes && echo " Compiling in extra code for debugging." | 3066 test "$debug" = yes && echo " Compiling in extra code for debugging." |
3286 test "${memory_usage_stats}" = yes && echo " Compiling in code for checking XEmacs memory usage." | 3067 test "$memory_usage_stats" = yes && echo " Compiling in code for checking XEmacs memory usage." |
3287 test "$usage_tracking" = yes && echo " Compiling with usage tracking active (Sun internal)." | 3068 test "$usage_tracking" = yes && echo " Compiling with usage tracking active (Sun internal)." |
3288 echo "" | 3069 echo "" |
3289 ) | tee -a Installation | 3070 ) | tee -a Installation |
3290 echo 'The above configure report is appended to "Installation" file.' | 3071 echo 'The above configure report is appended to "Installation" file.' |
3291 echo "" | 3072 echo "" |
3292 | 3073 |
3293 dnl ############################################################################ | 3074 dnl ----------------------------------- |
3294 dnl # Now generate! # | 3075 dnl Now generate config.h and Makefiles |
3295 dnl ############################################################################ | 3076 dnl ----------------------------------- |
3296 | 3077 |
3297 dnl This has to be called in order for this variable to get into config.status | 3078 dnl This has to be called in order for this variable to get into config.status |
3298 AC_SUBST(internal_makefile_list) | 3079 AC_SUBST(internal_makefile_list) |
3299 # Remove any trailing slashes in these variables. | 3080 # Remove any trailing slashes in these variables. |
3300 test -n "${prefix}" && | 3081 test -n "$prefix" && |
3301 prefix=`echo "${prefix}" | sed 's,\([[^/]]\)/*$,\1,'` | 3082 prefix=`echo "$prefix" | sed 's,\([[^/]]\)/*$,\1,'` |
3302 test -n "${exec_prefix}" && | 3083 test -n "$exec_prefix" && |
3303 exec_prefix=`echo "${exec_prefix}" | sed 's,\([[^/]]\)/*$,\1,'` | 3084 exec_prefix=`echo "$exec_prefix" | sed 's,\([[^/]]\)/*$,\1,'` |
3304 | 3085 |
3305 AC_OUTPUT($internal_makefile_list) | 3086 dnl Build Makefile.in's from Makefile.in.in's |
3306 # Build: | 3087 dnl except ./Makefile from $srcdir/Makefile.in |
3307 # src/Makefile from ${srcdir}/src/Makefile.in | 3088 |
3308 # lwlib/Makefile from ${srcdir}/lwlib/Makefile.in | 3089 AC_OUTPUT($internal_makefile_list,[ |
3309 # lib-src/Makefile from ${srcdir}/lib-src/Makefile.in | 3090 for dir in $MAKE_SUBDIR; do |
3310 # dynodump/Makefile from ${srcdir}/dynodump/Makefile.in | 3091 echo creating $dir/Makefile |
3311 # and possibly | 3092 ( set -e |
3312 # lwlib/energize/Makefile from ${srcdir}/lwlib/energize/Makefile.in. | 3093 cd $dir |
3313 # This must be done after src/config.h is built, since we rely on that | 3094 rm -f junk.c |
3314 # file. Only do the build if "config.status" is present, since its | 3095 sed -e 's/^# Generated.*//' -e 's%/\*\*/#.*%%' < Makefile.in > junk.c; |
3315 # non-presence indicates an error occured. | 3096 $CPP -I. -I${top_srcdir}/src $CPPFLAGS junk.c > junk.cpp; |
3316 status=$? | 3097 < junk.cpp \ |
3317 if test ! -f ./config.status ; then | 3098 sed -e 's/^#.*//' \ |
3318 exit $status | 3099 -e 's/^[[ \f\t]][[ \f\t]]*$//' \ |
3319 fi | 3100 -e 's/^ / /' \ |
3320 topsrcdir=${srcdir} | 3101 | sed -n -e '/^..*$/p' \ |
3321 # We discard all lines in Makefile.in that start with `# Generated' or /**/# | 3102 > Makefile.new |
3322 # because some cpps get confused by them. | 3103 chmod 444 Makefile.new |
3323 # Really we should preserve them somehow into Makefile, | 3104 mv -f Makefile.new Makefile |
3324 # but that is beyond my level of shell programming. | 3105 rm -f junk.c junk.cpp |
3325 makefile_command='echo "creating src/Makefile"; | 3106 ) |
3326 topsrcdir='"${topsrcdir}"'; | 3107 test "$?" != 0 && exit "$?" # For debugging |
3327 ( cd ./src; | 3108 done |
3328 rm -f junk.c; | 3109 ], |
3329 sed -e '\''s/^# Generated.*//'\'' -e '\''s%/\*\*/#.*%%'\'' < Makefile.in > junk.c; | 3110 [CPP="$CPP" |
3330 eval `echo ${CPP} -I. -I${topsrcdir}/src ${CPPFLAGS} junk.c \>junk.cpp`; | 3111 CPPFLAGS="$CPPFLAGS" |
3331 < junk.cpp '\ | 3112 top_srcdir="$srcdir" |
3332 ' sed -e '\''s/^#.*//'\'' '\ | 3113 MAKE_SUBDIR="$MAKE_SUBDIR" |
3333 ' -e '\''s/^[[ \f\t]][[ \f\t]]*$//'\'' '\ | 3114 ]) |
3334 ' -e '\''s/^ / /'\'' '\ | |
3335 ' | sed -n -e '\''/^..*$/p'\'' '\ | |
3336 ' > Makefile.new; | |
3337 chmod 444 Makefile.new; | |
3338 mv -f Makefile.new Makefile; | |
3339 rm -f junk.c junk.cpp; | |
3340 )' | |
3341 eval `echo $makefile_command` | |
3342 lwlib_makefile_command='echo "creating lwlib/Makefile"; | |
3343 topsrcdir='"${topsrcdir}"'; | |
3344 ( cd ./lwlib; | |
3345 rm -f junk.c; | |
3346 sed -e '\''s/^# Generated.*//'\'' -e '\''s%/\*\*/#.*%%'\'' < Makefile.in > junk.c; | |
3347 eval `echo ${CPP} -I. -I${topsrcdir}/src ${CPPFLAGS} junk.c \>junk.cpp`; | |
3348 < junk.cpp '\ | |
3349 ' sed -e '\''s/^#.*//'\'' '\ | |
3350 ' -e '\''s/^[[ \f\t]][[ \f\t]]*$//'\'' '\ | |
3351 ' -e '\''s/^ / /'\'' '\ | |
3352 ' | sed -n -e '\''/^..*$/p'\'' '\ | |
3353 ' > Makefile.new; | |
3354 chmod 444 Makefile.new; | |
3355 mv -f Makefile.new Makefile; | |
3356 rm -f junk.c junk.cpp; | |
3357 )' | |
3358 eval `echo $lwlib_makefile_command` | |
3359 lib_src_makefile_command='echo "creating lib-src/Makefile"; | |
3360 topsrcdir='"${topsrcdir}"'; | |
3361 ( cd ./lib-src; | |
3362 rm -f junk.c; | |
3363 sed -e '\''s/^# Generated.*//'\'' -e '\''s%/\*\*/#.*%%'\'' < Makefile.in > junk.c; | |
3364 eval `echo ${CPP} -I. -I${topsrcdir}/src ${CPPFLAGS} junk.c \>junk.cpp`; | |
3365 < junk.cpp '\ | |
3366 ' sed -e '\''s/^#.*//'\'' '\ | |
3367 ' -e '\''s/^[[ \f\t]][[ \f\t]]*$//'\'' '\ | |
3368 ' -e '\''s/^ / /'\'' '\ | |
3369 ' | sed -n -e '\''/^..*$/p'\'' '\ | |
3370 ' > Makefile.new; | |
3371 chmod 444 Makefile.new; | |
3372 mv -f Makefile.new Makefile; | |
3373 rm -f junk.c junk.cpp; | |
3374 )' | |
3375 eval `echo $lib_src_makefile_command` | |
3376 | |
3377 # Mule utilitity programs - currently disabled | |
3378 if test "${with_mule_util}" = "yes"; then | |
3379 lib_src_mule_makefile_command='echo "creating lib-src/mule/Makefile"; | |
3380 topsrcdir='"${topsrcdir}"'; | |
3381 ( cd ./lib-src/mule; | |
3382 rm -f junk.c; | |
3383 sed -e '\''s/^# Generated.*//'\'' -e '\''s%/\*\*/#.*%%'\'' < Makefile.in > junk.c; | |
3384 eval `echo ${CPP} -I. -I${topsrcdir}/src ${CPPFLAGS} junk.c \>junk.cpp`; | |
3385 < junk.cpp '\ | |
3386 ' sed -e '\''s/^#.*//'\'' '\ | |
3387 ' -e '\''s/^[[ \f\t]][[ \f\t]]*$//'\'' '\ | |
3388 ' -e '\''s/^ / /'\'' '\ | |
3389 ' | sed -n -e '\''/^..*$/p'\'' '\ | |
3390 ' > Makefile.new; | |
3391 chmod 444 Makefile.new; | |
3392 mv -f Makefile.new Makefile; | |
3393 rm -f junk.c junk.cpp; | |
3394 )' | |
3395 eval `echo $lib_src_mule_makefile_command` | |
3396 fi # Mule | |
3397 | |
3398 dynodump_makefile_command='echo "creating dynodump/Makefile"; | |
3399 topsrcdir='"${topsrcdir}"'; | |
3400 ( cd ./dynodump; | |
3401 rm -f junk.c; | |
3402 sed -e '\''s/^# Generated.*//'\'' -e '\''s%/\*\*/#.*%%'\'' < Makefile.in > junk.c; | |
3403 eval `echo ${CPP} -I. -I${topsrcdir}/src ${CPPFLAGS} junk.c \>junk.cpp`; | |
3404 < junk.cpp '\ | |
3405 ' sed -e '\''s/^#.*//'\'' '\ | |
3406 ' -e '\''s/^[[ \f\t]][[ \f\t]]*$//'\'' '\ | |
3407 ' -e '\''s/^ / /'\'' '\ | |
3408 ' | sed -n -e '\''/^..*$/p'\'' '\ | |
3409 ' > Makefile.new; | |
3410 chmod 444 Makefile.new; | |
3411 mv -f Makefile.new Makefile; | |
3412 rm -f junk.c junk.cpp; | |
3413 )' | |
3414 eval `echo $dynodump_makefile_command` | |
3415 if test "${with_energize}" = "yes" ; then | |
3416 energize_makefile_command='echo "creating lwlib/energize/Makefile"; | |
3417 topsrcdir='"${topsrcdir}"'; | |
3418 ( cd ./lwlib/energize; | |
3419 rm -f junk.c; | |
3420 sed -e '\''s/^# Generated.*//'\'' -e '\''s%/\*\*/#.*%%'\'' < Makefile.in > junk.c; | |
3421 eval `echo ${CPP} -I. -I${topsrcdir}/src ${CPPFLAGS} junk.c \>junk.cpp`; | |
3422 < junk.cpp '\ | |
3423 ' sed -e '\''s/^#.*//'\'' '\ | |
3424 ' -e '\''s/^[[ \f\t]][[ \f\t]]*$//'\'' '\ | |
3425 ' -e '\''s/^ / /'\'' '\ | |
3426 ' | sed -n -e '\''/^..*$/p'\'' '\ | |
3427 ' > Makefile.new; | |
3428 chmod 444 Makefile.new; | |
3429 mv -f Makefile.new Makefile; | |
3430 rm -f junk.c junk.cpp; | |
3431 )' | |
3432 eval `echo $energize_makefile_command` | |
3433 fi | |
3434 # AC-OUTPUT has created `config.status' already. We need to add the | |
3435 # above commands to re-create `src/Makefile', `lwlib/Makefile', | |
3436 # `lib-src/Makefile', `dynodump/Makefile', and possibly | |
3437 # `lwlib/energize/Makefile', and we need to insert them before the final | |
3438 # "exit 0" which appears at the end of `config.status'. | |
3439 <config.status sed -e 's/^exit 0$//' >config.new | |
3440 echo $makefile_command >>config.new | |
3441 echo $lwlib_makefile_command >>config.new | |
3442 echo $lib_src_makefile_command >>config.new | |
3443 if test "${with_mule_util}" = "yes"; then | |
3444 echo $lib_src_mule_makefile_command >>config.new | |
3445 fi | |
3446 echo $dynodump_makefile_command >>config.new | |
3447 echo $man_makefile_command >>config.new | |
3448 if test "${with_energize}" = "yes" ; then | |
3449 echo $energize_makefile_command >>config.new | |
3450 fi | |
3451 echo exit 0 >>config.new | |
3452 mv -f config.new config.status | |
3453 chmod +x config.status | |
3454 # Don't let the fact that we just rewrote config.status make Makefile think | |
3455 # that it is now newer. We have just rewritten all of the Makefiles as well. | |
3456 MFS="Makefile \ | |
3457 src/Makefile src/Makefile.in \ | |
3458 lib-src/Makefile lib-src/Makefile.in \ | |
3459 dynodump/Makefile dynodump/Makefile.in \ | |
3460 lwlib/Makefile lwlib/Makefile.in" | |
3461 chmod a+w $MFS | |
3462 touch $MFS | |
3463 chmod 444 $MFS | |
3464 | 3115 |
3465 if test ! -f src/gdbinit && test -f $topsrcdir/src/gdbinit; then | 3116 if test ! -f src/gdbinit && test -f $topsrcdir/src/gdbinit; then |
3466 echo creating src/gdbinit | 3117 echo "creating src/gdbinit" |
3467 echo source $topsrcdir/src/gdbinit > src/gdbinit | 3118 echo "source $topsrcdir/src/gdbinit" > src/gdbinit |
3468 fi | 3119 fi |
3469 | 3120 |
3470 exit 0 | 3121 if test "$sunpro_c" = "yes"; then dnl create useful .sbinit file |
3471 | 3122 cat < EOF > .sbinit |
3472 | 3123 # For use with Sun WorkShop's Source browser. |
3473 # Local Variables: | 3124 # See sbquery(1) and sbinit(4) for more information |
3474 # eval: (modify-syntax-entry ?\" "\"") | 3125 import src |
3475 # End: | 3126 import lwlib |
3127 import lib-src | |
3128 import dynodump | |
3129 EOF | |
3130 fi |