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