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