207
|
1 dnl Define our own header notice with own copyright
|
149
|
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 [
|
460
|
6 #### Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000 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.
|
771
|
9 #### Copyright (C) 1995, 1996, 2002 Ben Wing.
|
460
|
10 #### Copyright (C) 2000, 2001 Martin Buchholz.
|
388
|
11 #### Copyright (C) 1998, 1999 J. Kean Johnston.
|
0
|
12
|
|
13 ### Don't edit this script!
|
|
14 ### This script was automatically generated by the `autoconf' program
|
|
15 ### from the file `./configure.in'.
|
|
16 ### To rebuild it, execute the command
|
|
17 ### autoconf
|
442
|
18 ### in the this directory. You must have autoconf version 2.13 or later.
|
724
|
19 ### Note: this script has not yet been ported to autoconf version 2.5x.
|
0
|
20
|
|
21 ### This file is part of XEmacs.
|
|
22
|
|
23 ### XEmacs is free software; you can redistribute it and/or modify it
|
|
24 ### under the terms of the GNU General Public License as published by
|
|
25 ### the Free Software Foundation; either version 2, or (at your
|
|
26 ### option) any later version.
|
|
27
|
|
28 ### XEmacs is distributed in the hope that it will be useful, but
|
|
29 ### WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
30 ### MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
31 ### General Public License for more details.
|
|
32
|
|
33 ### You should have received a copy of the GNU General Public License
|
|
34 ### along with XEmacs; see the file COPYING. If not, write to the Free
|
|
35 ### Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
|
36 ### 02111-1307, USA.
|
|
37
|
149
|
38 ### For usage, run `./configure --help'
|
|
39 ### For more detailed information on building and installing XEmacs,
|
|
40 ### read the file `INSTALL'.
|
0
|
41 ###
|
|
42 ### If configure succeeds, it leaves its status in config.status.
|
149
|
43 ### A log of configuration tests can be found in config.log.
|
0
|
44 ### If configure fails after disturbing the status quo,
|
|
45 ### config.status is removed.
|
149
|
46 ])
|
|
47
|
|
48 dnl Since XEmacs has configuration requirements that autoconf cannot
|
|
49 dnl meet, this file is an unholy marriage of custom-baked
|
|
50 dnl configuration code and autoconf macros.
|
|
51
|
|
52 dnl We use the m4 quoting characters [ ] (as established by the
|
|
53 dnl autoconf system), so quote them like this: [[foo]]
|
|
54
|
442
|
55 AC_PREREQ(2.13)dnl
|
1111
|
56
|
|
57 dnl #### Doesn't work currently. it would be really nice if we could
|
|
58 dnl get this working, because many autoconfs v2.5 come with support for
|
|
59 dnl v2.1 source files but get snafued by our nasty configure.ac kludge.
|
|
60 dnl
|
|
61 dnl m4_if(m4_version_compare(m4_defn([m4_PACKAGE_VERSION]), 2.5), -1,
|
|
62 dnl [m4_fatal([Autoconf version 2.5 or higher not supported])])
|
|
63
|
149
|
64 dnl Redefine some standard autoconf macros
|
|
65 dnl here is how XEmacs is different:
|
|
66 dnl - no cache file
|
|
67 dnl - non-standard options
|
708
|
68 dnl - support for extra-verbosity
|
149
|
69 dnl - ordinary libs are handled separately from X libs (might be a mistake)
|
444
|
70 dnl - various random kludges (e.g. -with-dnet=no)
|
149
|
71
|
163
|
72 dnl PRINT_VAR(var var ...) prints values of shell variables
|
|
73 define([PRINT_VAR],[for var in patsubst([$1],[[
|
|
74 ]+],[ ]); do eval "echo \"$var = '\$$var'\""; done])
|
153
|
75
|
149
|
76 dnl Disable cache files:
|
|
77 dnl This is controversial, but I am convinced this is the right way to go,
|
|
78 dnl at least by default. Otherwise there are too many surprises.
|
|
79 define([AC_CACHE_LOAD], )dnl
|
|
80 define([AC_CACHE_SAVE], )dnl
|
|
81 define([AC_CACHE_VAL], [
|
|
82 $2
|
|
83 ])dnl
|
|
84
|
151
|
85 dnl Redefine AC_TRY_RUN_NATIVE to not throw away stderr while running
|
|
86 dnl AC_TRY_RUN_NATIVE(PROGRAM, [ACTION-IF-TRUE [, ACTION-IF-FALSE]])
|
|
87 define([AC_TRY_RUN_NATIVE],
|
|
88 [cat > conftest.$ac_ext <<EOF
|
|
89 [#]line __oline__ "configure"
|
|
90 #include "confdefs.h"
|
|
91 [$1]
|
|
92 EOF
|
373
|
93 if AC_TRY_EVAL(ac_link) && test -s conftest && (./conftest; exit $?) 2>&AC_FD_CC
|
151
|
94 then
|
|
95 dnl Do not remove the temporary files here, so they can be examined.
|
|
96 ifelse([$2], , :, [$2])
|
|
97 else
|
373
|
98 conftest_rc="$?"
|
151
|
99 echo "configure: failed program was:" >&AC_FD_CC
|
|
100 cat conftest.$ac_ext >&AC_FD_CC
|
|
101 ifelse([$3], , , [ rm -fr conftest*
|
|
102 $3
|
|
103 ])dnl
|
|
104 fi
|
284
|
105 rm -fr conftest*])dnl AC_TRY_RUN_NATIVE
|
151
|
106
|
|
107
|
149
|
108 dnl Avoid spurious cross-compiling warnings from AC_TRY_RUN
|
|
109 dnl XEmacs is unlikely to ever cross-compile
|
|
110 define([AC_TRY_RUN],[AC_TRY_RUN_NATIVE([$1], [$2], [$3])])dnl
|
|
111
|
|
112 dnl Redefine AC_DEFINE* to provide more output if extra_verbose
|
|
113 dnl Set VARIABLE to VALUE, verbatim, or 1.
|
|
114 dnl AC_DEFINE(VARIABLE [, VALUE])
|
|
115 define([AC_DEFINE],
|
|
116 [{ test "$extra_verbose" = "yes" && cat << \EOF
|
|
117 Defining $1[]ifelse($#, 2, [ = $2],)
|
|
118 EOF
|
|
119 cat >> confdefs.h <<\EOF
|
|
120 [#define] $1 ifelse($#, 2, [$2], 1)
|
|
121 EOF
|
|
122 }
|
284
|
123 ])dnl AC_DEFINE
|
149
|
124
|
|
125 define([AC_DEFINE_UNQUOTED],
|
|
126 [{ test "$extra_verbose" = "yes" && cat << EOF
|
|
127 Defining $1[]ifelse($#, 2, [ = $2],)
|
|
128 EOF
|
|
129 cat >> confdefs.h <<EOF
|
|
130 [#define] $1 ifelse($#, 2, [$2], 1)
|
|
131 EOF
|
|
132 }
|
284
|
133 ])dnl AC_DEFINE_UNQUOTED
|
149
|
134
|
|
135 dnl redefine AC_CHECK_LIB in accordance with our own value of ac_link
|
|
136 dnl Add in extra kludgy check to support with_dnet=no
|
708
|
137 dnl Add in extra LDFLAGS arg, which PRECEDES libs
|
149
|
138 dnl Support --with-dnet=no
|
|
139
|
|
140 dnl AC_CHECK_LIB(LIBRARY, FUNCTION [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND
|
|
141 dnl [, OTHER-LIBRARIES] [, LDFLAGS]]]])
|
|
142 define([AC_CHECK_LIB],
|
151
|
143 [ifelse([$1],dnet, [if test "$with_dnet" = "no" ; then
|
149
|
144 ac_cv_lib_dnet_dnet_ntoa=no
|
|
145 ifelse([$4], , , [$4]
|
|
146 )dnl
|
|
147 else
|
|
148 ])]
|
|
149 AC_CHECK_LIB_ORIG_HACKED([$1],[$2],[$3],[$4],[$5], [$6])
|
|
150 [ifelse([$1],dnet,[fi
|
|
151 ])]dnl
|
284
|
152 )dnl AC_CHECK_LIB
|
149
|
153
|
|
154 define([AC_CHECK_LIB_ORIG_HACKED],
|
|
155 [ifelse([$5],,AC_MSG_CHECKING([for $2 in -l$1]),
|
|
156 xe_msg_checking="for [$2] in -l[$1]"
|
|
157 test -n "[$5]" && xe_msg_checking="$xe_msg_checking using extra libs [$5]"
|
|
158 AC_MSG_CHECKING("$xe_msg_checking"))
|
|
159 dnl Use a cache variable name containing both the library and function name,
|
|
160 dnl because the test really is for library $1 defining function $2, not
|
|
161 dnl just for library $1. Separate tests with the same $1 and different $2s
|
|
162 dnl may have different results.
|
|
163 ac_lib_var=`echo $1['_']$2 | sed 'y%./+-%__p_%'`
|
|
164 AC_CACHE_VAL(ac_cv_lib_$ac_lib_var,
|
|
165 [xe_check_libs="$6 -l$1 $5"
|
|
166 AC_TRY_LINK(dnl
|
|
167 ifelse([$2], [main], , dnl Avoid conflicting decl of main.
|
|
168 [/* Override any gcc2 internal prototype to avoid an error. */
|
|
169 ]ifelse(AC_LANG, CPLUSPLUS, [#ifdef __cplusplus
|
|
170 extern "C"
|
|
171 #endif
|
|
172 ])dnl
|
|
173 [/* We use char because int might match the return type of a gcc2
|
|
174 builtin and then its argument prototype would still apply. */
|
|
175 char $2();
|
|
176 ]),
|
|
177 [$2()],
|
|
178 eval "ac_cv_lib_$ac_lib_var=yes",
|
|
179 eval "ac_cv_lib_$ac_lib_var=no")
|
|
180 xe_check_libs=""
|
|
181 ])dnl
|
151
|
182 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
|
149
|
183 AC_MSG_RESULT(yes)
|
|
184 ifelse([$3], ,
|
|
185 [changequote(, )dnl
|
|
186 ac_tr_lib=HAVE_LIB`echo $1 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
|
|
187 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
|
|
188 changequote([, ])dnl
|
|
189 AC_DEFINE_UNQUOTED($ac_tr_lib)
|
151
|
190 XE_PREPEND([-l$1], LIBS)
|
149
|
191 ], [$3])
|
|
192 else
|
|
193 AC_MSG_RESULT(no)
|
|
194 ifelse([$4], , , [$4
|
|
195 ])dnl
|
|
196 fi
|
284
|
197 ])dnl AC_CHECK_LIB_ORIG_HACKED
|
149
|
198
|
|
199
|
|
200 dnl AC_LANG_C()
|
|
201 define([AC_LANG_C],
|
|
202 [define([AC_LANG], [C])dnl
|
|
203 ac_ext=c
|
|
204 dnl CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
|
|
205 dnl ac_cpp='$CPP $CPPFLAGS'
|
|
206 dnl ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&AC_FD_CC'
|
|
207 dnl ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&AC_FD_CC'
|
151
|
208 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
|
|
209 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
|
462
|
210 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $libs_gtk $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
|
149
|
211 ac_cpp='$CPP '"$xe_cppflags"
|
151
|
212 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&AC_FD_CC'
|
|
213 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&AC_FD_CC'
|
149
|
214 cross_compiling=no
|
284
|
215 ]) dnl AC_LANG_C
|
149
|
216
|
155
|
217 dnl The construct foo=`echo $w1 $w2 $w3` fails on some systems if $w1 = -e or -n
|
|
218 dnl So we use the following instead.
|
|
219 dnl XE_SPACE(var, words)
|
|
220 define([XE_SPACE],[
|
|
221 T=""
|
|
222 for W in $2; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
|
|
223 $1="$T"
|
284
|
224 ])dnl XE_SPACE
|
151
|
225
|
|
226 dnl XE_ADD_OBJS(foo.o ...)
|
|
227 define([XE_ADD_OBJS],
|
|
228 [extra_objs="$extra_objs [$1]" && dnl
|
|
229 if test "$extra_verbose" = "yes"; then
|
|
230 echo " xemacs will be linked with \"[$1]\""
|
284
|
231 fi])dnl XE_ADD_OBJS
|
151
|
232
|
|
233 dnl XE_APPEND(value, varname)
|
|
234 define([XE_APPEND],
|
|
235 [[$2]="$[$2] [$1]" && dnl
|
|
236 if test "$extra_verbose" = "yes"; then echo " Appending \"[$1]\" to \$[$2]"; fi])
|
|
237
|
|
238 dnl XE_PREPEND(value, varname)
|
|
239 define([XE_PREPEND],
|
|
240 [[$2]="[$1] $[$2]" && dnl
|
|
241 if test "$extra_verbose" = "yes"; then echo " Prepending \"[$1]\" to \$[$2]"; fi])
|
|
242
|
380
|
243 dnl XE_DIE(message)
|
384
|
244 define([XE_DIE], [{ echo "Error:" $1 >&2; exit 1; }])
|
380
|
245
|
|
246 dnl XE_STRIP_4TH_COMPONENT(var)
|
|
247 dnl Changes i986-pc-linux-gnu to i986-pc-linux, as God (not RMS) intended.
|
|
248 define([XE_STRIP_4TH_COMPONENT],
|
|
249 [$1=`echo "$$1" | sed '[s/^\([^-][^-]*-[^-][^-]*-[^-][^-]*\)-.*$/\1/]'`])
|
151
|
250
|
|
251 dnl Initialize some variables set by options.
|
|
252 dnl The variables have the same names as the options, with
|
|
253 dnl dashes changed to underlines.
|
|
254
|
149
|
255 define([AC_INIT_PARSE_ARGS],[
|
284
|
256
|
|
257 dnl Get sane consistent behavior from various shells
|
|
258 dnl Avoid losing with weird user CDPATHs
|
|
259
|
|
260 if test -n "$ZSH_VERSION"; then
|
|
261 dnl zsh's Bourne shell emulation options
|
|
262 setopt NO_BAD_PATTERN NO_BANG_HIST NO_BG_NICE NO_EQUALS NO_FUNCTION_ARGZERO
|
|
263 setopt GLOB_SUBST NO_HUP INTERACTIVE_COMMENTS KSH_ARRAYS NO_MULTIOS NO_NOMATCH
|
|
264 setopt RM_STAR_SILENT POSIX_BUILTINS SH_FILE_EXPANSION SH_GLOB SH_OPTION_LETTERS
|
|
265 setopt SH_WORD_SPLIT BSD_ECHO IGNORE_BRACES
|
|
266 dnl zsh-3.1-beta drops core on the following
|
|
267 dnl unset CDPATH
|
|
268 if test -n "$CDPATH"; then CDPATH="."; export CDPATH; fi
|
|
269 elif test -n "$BASH_VERSION"; then
|
|
270 dnl Use Posix mode with bash
|
|
271 set -o posix
|
|
272 unset CDPATH
|
|
273 else
|
|
274 if test -n "$CDPATH"; then CDPATH="."; export CDPATH; fi
|
|
275 fi
|
|
276
|
149
|
277 dnl Initialize some variables set by options.
|
|
278 dnl The variables have the same names as the options, with
|
|
279 dnl dashes changed to underlines.
|
|
280 exec_prefix=NONE
|
|
281 host=NONE
|
|
282 no_create=
|
|
283 nonopt=NONE
|
|
284 no_recursion=
|
|
285 prefix=NONE
|
|
286 program_prefix=NONE
|
|
287 program_suffix=NONE
|
|
288 program_transform_name=s,x,x,
|
|
289 silent=
|
|
290 site=
|
|
291 srcdir=
|
|
292 target=NONE
|
|
293 verbose=
|
|
294 x_includes=NONE
|
|
295 x_libraries=NONE
|
153
|
296
|
149
|
297 dnl Initialize some other variables.
|
|
298 subdirs=
|
|
299 MFLAGS= MAKEFLAGS=
|
442
|
300 SHELL=${CONFIG_SHELL-/bin/sh}
|
149
|
301 dnl Maximum number of lines to put in a shell here document.
|
|
302 ac_max_here_lines=12
|
284
|
303 ])dnl AC_INIT_PARSE_ARGS
|
|
304
|
149
|
305 AC_INIT(src/lisp.h)dnl
|
276
|
306 AC_CONFIG_HEADER(src/config.h lwlib/config.h)
|
149
|
307 dnl Remove any more than one leading "." element from the path name.
|
|
308 dnl If we do not remove them, then another "./" will be prepended to
|
|
309 dnl the file name each time we use config.status, and the program name
|
|
310 dnl will get larger and larger. This would not be a problem, except
|
|
311 dnl that since progname gets recorded in all the Makefiles this script
|
|
312 dnl produces, move-if-change thinks they're different when they're
|
|
313 dnl not.
|
|
314 dnl
|
|
315 dnl It would be nice if we could put the ./ in a \( \) group and then
|
|
316 dnl apply the * operator to that, so we remove as many leading './././'s
|
|
317 dnl as are present, but some seds (like Ultrix's sed) don't allow you to
|
|
318 dnl apply * to a \( \) group. Bleah.
|
0
|
319 progname="`echo $0 | sed 's:^\./\./:\./:'`"
|
|
320
|
149
|
321 dnl -----------------------------
|
|
322 dnl Establish some default values
|
|
323 dnl -----------------------------
|
|
324
|
151
|
325 XE_APPEND(lib-src, MAKE_SUBDIR)
|
167
|
326 XE_APPEND(lib-src, INSTALL_ARCH_DEP_SUBDIR)
|
149
|
327
|
0
|
328 prefix='/usr/local'
|
|
329 exec_prefix='${prefix}'
|
|
330 bindir='${exec_prefix}/bin'
|
149
|
331 dnl FSF 19.29 changes to:
|
|
332 dnl datadir='${prefix}/share'
|
|
333 dnl sharedstatedir='${prefix}/com'
|
|
334 dnl libexecdir='${exec_prefix}/libexec'
|
0
|
335 datadir='${prefix}/lib'
|
|
336 statedir='${prefix}/lib'
|
|
337 libdir='${exec_prefix}/lib'
|
|
338 mandir='${prefix}/man/man1'
|
422
|
339 inststaticdir='${PROGNAME}'
|
|
340 instvardir='${PROGNAME}-${version}'
|
|
341 infodir='${datadir}/${instvardir}/info'
|
274
|
342 infopath=''
|
276
|
343 install_pp=''
|
422
|
344 lispdir='${datadir}/${instvardir}/lisp'
|
668
|
345 moduledir='${libdir}/${instvardir}/${configuration}/modules'
|
422
|
346 sitelispdir='${datadir}/${inststaticdir}/site-lisp'
|
668
|
347 sitemoduledir='${libdir}/${inststaticdir}/site-modules'
|
422
|
348 pkgdir='${datadir}/${instvardir}/lisp'
|
274
|
349 package_path=''
|
422
|
350 etcdir='${datadir}/${instvardir}/etc'
|
668
|
351 archlibdir='${libdir}/${instvardir}/${configuration}'
|
420
|
352 docdir='${archlibdir}'
|
462
|
353 with_netinstall="no"
|
420
|
354 with_prefix='yes'
|
269
|
355 with_site_lisp='no'
|
388
|
356 with_site_modules='yes'
|
1111
|
357 need_modules_common=''
|
0
|
358 with_menubars=''
|
|
359 with_scrollbars=''
|
420
|
360 with_widgets=''
|
0
|
361 with_dialogs=''
|
272
|
362 cpp='' cppflags='' libs='' ldflags=''
|
452
|
363 extra_includes=''
|
0
|
364 dynamic=''
|
|
365 with_x11=''
|
263
|
366 with_msw=''
|
0
|
367 rel_alloc='default'
|
181
|
368 with_system_malloc='default'
|
261
|
369 with_dlmalloc='default'
|
0
|
370 native_sound_lib=''
|
462
|
371 dnl These should be set to the empty string when we want gtk / gnome to
|
|
372 dnl be auto-detected instead of manually specified.
|
|
373 with_gtk='no'
|
|
374 with_gnome='no'
|
272
|
375 dnl use_assertions should be 'yes' by default. Too many people in this
|
149
|
376 dnl world have core dumps turned off by default or \"cannot find where the
|
|
377 dnl core file went\". At least we should get some useful output ...
|
153
|
378 use_assertions="yes"
|
149
|
379 dnl the following is set to yes or no later.
|
153
|
380 with_toolbars=""
|
157
|
381 with_tty=""
|
153
|
382 use_union_type="no"
|
|
383 with_dnet=""
|
424
|
384 pdump="no"
|
771
|
385 dnl dragndrop is still experimental, except on Windows. When it is stable, comment out the following line:
|
|
386 with_dragndrop_default="no"
|
708
|
387 dnl Too annoying, even if mandated by IPv6 (and I'm not even sure of that)
|
724
|
388 dnl #### Change this to yes when somebody understands IPv6 and handle bugs.
|
708
|
389 with_ipv6_cname="no"
|
0
|
390
|
149
|
391 dnl ------------------
|
|
392 dnl Options Processing
|
|
393 dnl ------------------
|
0
|
394
|
120
|
395 define([USAGE_ERROR],
|
149
|
396 [(echo "$progname: Usage error:"
|
120
|
397 echo " " $1
|
149
|
398 echo " Use \`$progname --help' to show usage.") >&2 && exit 1])
|
|
399
|
|
400 dnl Record all the arguments, so we can save them in config.status.
|
0
|
401 arguments="$@"
|
|
402
|
149
|
403 dnl Shell Magic: Quote the quoted arguments in ARGUMENTS. At a later date,
|
|
404 dnl in order to get the arguments back in $@, we have to do an
|
|
405 dnl 'eval set x "$quoted_arguments"; shift'
|
|
406 dnl # We use sed to turn embedded ' into '"'"'. I truly hate sh quoting.
|
120
|
407 quoted_sed_magic=s/"'"/"'"'"'"'"'"'"'"/g
|
0
|
408 quoted_arguments=
|
|
409 for i in "$@"; do
|
120
|
410 case "$i" in
|
|
411 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
|
|
412 | --no-cr | --no-c) ;;
|
153
|
413 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
|
|
414 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
|
120
|
415 *)
|
159
|
416 quoted_i="`echo '' $i | sed -e 's:^ ::' -e $quoted_sed_magic`"
|
120
|
417 quoted_arguments="$quoted_arguments '$quoted_i'" ;;
|
|
418 esac
|
0
|
419 done
|
|
420
|
149
|
421 dnl Do not use shift -- that destroys the argument list, which autoconf needs
|
|
422 dnl to produce config.status. It turns out that "set - $arguments" does not
|
|
423 dnl work portably.
|
|
424 dnl However, it also turns out that many shells cannot expand ${10} at all.
|
|
425 dnl So using an index variable does not work either. It is possible to use
|
|
426 dnl some shell magic to make 'set x "$arguments"; shift' work portably.
|
70
|
427 while test $# != 0; do
|
0
|
428 arg="$1"; shift
|
149
|
429 case "$arg" in
|
157
|
430 --no-create|--no-recursion) ;;
|
149
|
431 dnl Anything starting with a hyphen we assume is an option.
|
0
|
432 -* )
|
149
|
433 dnl Separate the switch name from the value it is being given.
|
|
434 case "$arg" in
|
0
|
435 -*=*)
|
149
|
436 opt=`echo '' $arg | sed -e 's:^ ::' -e 's:^-*\([[^=]]*\)=.*$:\1:'`
|
|
437 val=`echo '' $arg | sed -e 's:^ ::' -e 's:^-*[[^=]]*=\(.*\)$:\1:'`
|
0
|
438 valomitted=no
|
|
439 ;;
|
149
|
440 dnl special case these strings since echo may silently eat them:
|
|
441 dnl --help ) opt=help val=yes valomitted=yes ;;
|
|
442 dnl --version ) opt=version val=yes valomitted=yes ;;
|
|
443 dnl -e ) opt=e val=yes valomitted=yes ;;
|
|
444 dnl -E ) opt=E val=yes valomitted=yes ;;
|
|
445 dnl -n ) opt=n val=yes valomitted=yes ;;
|
0
|
446 -*)
|
149
|
447 dnl If FOO is a boolean argument, --FOO is equivalent to
|
|
448 dnl --FOO=yes. Otherwise, the value comes from the next
|
|
449 dnl argument - see below.
|
|
450 opt=`echo '' $arg | sed -e 's:^ ::' -e 's:^-*\(.*\)$:\1:'`
|
243
|
451 val="yes" valomitted=yes
|
0
|
452 ;;
|
|
453 esac
|
|
454
|
274
|
455 dnl translate "-" in option string to "_"
|
|
456 optname="$opt"
|
|
457 opt="`echo '' $opt | sed -e 's:^ ::' | tr - _`"
|
|
458
|
243
|
459 dnl Support --without-FOO as a synonym for --with-FOO=no
|
|
460 case "${valomitted}-${opt}" in yes-without_* )
|
|
461 opt=`echo $opt | sed 's/without/with/'`
|
|
462 valomitted="no" val="no" ;;
|
|
463 esac
|
|
464
|
149
|
465 dnl Process the option.
|
|
466 case "$opt" in
|
|
467
|
|
468 dnl Process (many) boolean options
|
380
|
469 with_site_lisp | \
|
420
|
470 with_prefix | \
|
|
471 with_site_modules | \
|
70
|
472 with_x | \
|
|
473 with_x11 | \
|
462
|
474 with_gtk | \
|
|
475 with_gnome | \
|
263
|
476 with_msw | \
|
70
|
477 with_gcc | \
|
|
478 dynamic | \
|
149
|
479 with_ncurses | \
|
|
480 with_dnet | \
|
|
481 with_socks | \
|
282
|
482 with_dragndrop | \
|
70
|
483 with_cde | \
|
|
484 with_offix | \
|
149
|
485 with_gpm | \
|
|
486 with_xpm | \
|
|
487 with_xface | \
|
251
|
488 with_gif | \
|
|
489 with_jpeg | \
|
|
490 with_png | \
|
|
491 with_tiff | \
|
771
|
492 with_zlib | \
|
414
|
493 with_wmcommand | \
|
70
|
494 with_xmu | \
|
380
|
495 with_purify | \
|
149
|
496 with_quantify | \
|
70
|
497 with_toolbars | \
|
|
498 with_tty | \
|
215
|
499 with_xfs | \
|
70
|
500 with_mule | \
|
771
|
501 with_default_eol_detection | \
|
70
|
502 with_canna | \
|
|
503 with_wnn | \
|
98
|
504 with_wnn6 | \
|
149
|
505 with_workshop | \
|
70
|
506 with_sparcworks | \
|
380
|
507 with_tooltalk | \
|
259
|
508 with_ldap | \
|
442
|
509 with_postgresql | \
|
118
|
510 with_pop | \
|
|
511 with_kerberos | \
|
|
512 with_hesiod | \
|
136
|
513 with_dnet | \
|
280
|
514 with_infodock | \
|
724
|
515 with_netinstall | \
|
|
516 with_ipv6_cname | \
|
70
|
517 external_widget | \
|
925
|
518 use_kkcc | \
|
120
|
519 verbose | \
|
|
520 extra_verbose | \
|
380
|
521 usage_tracking | \
|
|
522 use_union_type | \
|
424
|
523 pdump | \
|
70
|
524 debug | \
|
|
525 use_assertions | \
|
|
526 memory_usage_stats | \
|
173
|
527 with_clash_detection | \
|
422
|
528 with_modules | \
|
442
|
529 quick_build )
|
149
|
530 dnl Make sure the value given was either "yes" or "no".
|
|
531 case "$val" in
|
0
|
532 y | ye | yes ) val=yes ;;
|
380
|
533 n | no ) val=no ;;
|
149
|
534 * ) USAGE_ERROR("The \`--$optname' option requires a boolean value: \`yes' or \`no'.") ;;
|
0
|
535 esac
|
380
|
536 eval "$opt=\"$val\"" ;;
|
149
|
537
|
|
538
|
398
|
539 dnl Options that take a user-supplied value, as in --x-includes=/usr/X11R6/include
|
153
|
540 dnl The cache-file option is ignored (for compatibility with other configures)
|
70
|
541 srcdir | \
|
|
542 compiler | \
|
596
|
543 xemacs_compiler | \
|
157
|
544 cflags | \
|
1111
|
545 cflags_warning | \
|
272
|
546 cpp | \
|
|
547 cppflags | \
|
|
548 libs | \
|
|
549 ldflags | \
|
153
|
550 cache_file | \
|
380
|
551 native_sound_lib| \
|
267
|
552 site_lisp | \
|
70
|
553 x_includes | \
|
|
554 x_libraries | \
|
|
555 site_includes | \
|
|
556 site_libraries | \
|
209
|
557 site_prefixes | \
|
149
|
558 site_runtime_libraries )
|
|
559 dnl If the value was omitted, get it from the next argument.
|
|
560 if test "$valomitted" = "yes" ; then
|
|
561 dnl Get the next argument from the argument list, if there is one.
|
|
562 if test "$#" = 0 ; then
|
|
563 USAGE_ERROR("The \`--$optname' option requires a value.");
|
0
|
564 fi
|
|
565 val="$1"; shift
|
|
566 fi
|
149
|
567 eval "$opt=\"$val\""
|
0
|
568 ;;
|
|
569
|
149
|
570 dnl Options that take "yes", "no", or "default" values
|
70
|
571 rel_alloc | \
|
261
|
572 with_dlmalloc | \
|
181
|
573 with_debug_malloc | use_debug_malloc | \
|
|
574 with_system_malloc | use_system_malloc )
|
149
|
575 case "$val" in
|
0
|
576 y | ye | yes ) val=yes ;;
|
|
577 n | no ) val=no ;;
|
181
|
578 d | de | def | defa | defau | defaul | default ) val=default ;;
|
149
|
579 * ) USAGE_ERROR(["The \`--$optname' option requires one of these values:
|
120
|
580 \`yes', \`no', or \`default'."]) ;;
|
0
|
581 esac
|
265
|
582 case "$opt" in use_* ) opt="`echo $opt | sed s/use/with/`" ;; esac
|
149
|
583 eval "$opt=\"$val\""
|
0
|
584 ;;
|
|
585
|
149
|
586 dnl Has the user requested database support?
|
70
|
587 "with_database" )
|
120
|
588 with_database_berkdb=no
|
|
589 with_database_dbm=no
|
426
|
590 with_database_gdbm=no
|
300
|
591 for x in `echo "$val" | sed -e 's/,/ /g'` ; do
|
149
|
592 case "$x" in
|
426
|
593 no ) ;;
|
|
594 b | be | ber | berk | berkd | berkdb ) with_database_berkdb=yes ;;
|
|
595 d | db | dbm ) with_database_dbm=yes ;;
|
|
596 g | gn | gnu | gnud | gnudb | gnudbm | gdbm) with_database_gdbm=yes ;;
|
|
597 * ) USAGE_ERROR(["The \`--$optname' option value
|
120
|
598 must be either \`no' or a comma-separated list
|
380
|
599 of one or more of \`berkdb' and either \`dbm' or \`gnudbm'."]) ;;
|
120
|
600 esac
|
|
601 done
|
426
|
602 if test "$with_database_dbm" = "yes" -a \
|
|
603 "$with_database_gdbm" = "yes"; then
|
120
|
604 USAGE_ERROR("Only one of \`dbm' and \`gnudbm' may be specified
|
149
|
605 with the \`--$optname' option.")
|
0
|
606 fi
|
70
|
607 ;;
|
0
|
608
|
149
|
609 dnl Has the user requested sound support?
|
0
|
610 "with_sound" )
|
426
|
611 dnl values is a subset of all,native,nas,esd
|
|
612 dnl or their negatives: none,nonative,nonas,noesd
|
|
613 for x in `echo "$val" | sed -e 's/,/ /g'` ; do
|
|
614 case "$x" in
|
|
615 dnl all and none are only permitted as the first in the list.
|
|
616 n | no | non | none ) new_sdefault=no ;;
|
|
617 a | al | all | both ) new_sdefault=yes ;;
|
|
618
|
|
619 native ) with_native_sound=yes ;;
|
|
620 nonative ) with_native_sound=no ;;
|
|
621
|
|
622 nas ) with_nas_sound=yes ;;
|
|
623 nonas ) with_nas_sound=no ;;
|
|
624
|
432
|
625 esd ) with_esd_sound=yes ;;
|
|
626 noesd ) with_esd_sound=no ;;
|
426
|
627
|
|
628 * ) bogus_sound=yes ;;
|
|
629 esac
|
|
630 if test "$bogus_sound" -o \
|
|
631 \( -n "$new_sdefault" -a -n "$sound_notfirst" \) ; then
|
|
632 types="\`all', \`none', \`(no)native', \`no(nas)', \`(no)esd'."
|
|
633 USAGE_ERROR(["Valid types for the \`--$optname' option are:
|
|
634 $types.
|
724
|
635 Option \`all' or \`none' must be first in the list.
|
|
636 The default is to autodetect native and NAS sound support."])
|
426
|
637 elif test -n "$new_sdefault" ; then
|
|
638 with_native_sound=$new_sdefault
|
|
639 with_nas_sound=$new_sdefault
|
432
|
640 with_esd_sound=$new_sdefault
|
426
|
641 new_sdefault= # reset this
|
|
642 fi
|
|
643 sound_notfirst=true
|
|
644 done
|
2
|
645 ;;
|
|
646
|
442
|
647 dnl Has the user specified a preferred Athena widget set?
|
434
|
648 dnl This bit expands any alias names out for us...
|
|
649 "with_athena" )
|
|
650 case "$val" in
|
|
651 xa | xaw ) val=xaw ;;
|
|
652 3 | 3d | xaw3d ) val=3d ;;
|
|
653 dnl No `n' for next, someone may try `no'
|
|
654 ne | nex | next | naxtaw) val=next ;;
|
|
655 dnl Have not tested the next two...
|
|
656 9 | 95 | xaw95 ) val=95 ;;
|
|
657 xp | xpm | xawxpm ) val=xpm ;;
|
|
658 * ) USAGE_ERROR(["The \`--$optname' option must have one of these values:
|
|
659 \`xaw', \`3d', \`next', \`95', or \`xpm'."]) ;;
|
|
660 esac
|
|
661 eval "$opt=\"$val\""
|
|
662 ;;
|
|
663
|
149
|
664 dnl Has the user requested XIM support?
|
70
|
665 "with_xim" )
|
149
|
666 case "$val" in
|
|
667 y | ye | yes ) val=yes ;;
|
|
668 n | no | non | none ) val=no ;;
|
|
669 x | xl | xli | xlib ) val=xlib ;;
|
|
670 m | mo | mot | moti | motif ) val=motif ;;
|
|
671 * ) USAGE_ERROR(["The \`--$optname' option must have one of these values:
|
120
|
672 \`motif', \`xlib', \`yes', or \`no'."]) ;;
|
0
|
673 esac
|
149
|
674 eval "$opt=\"$val\""
|
0
|
675 ;;
|
|
676
|
149
|
677 dnl Mail locking specification
|
|
678 "mail_locking" )
|
|
679 case "$val" in
|
|
680 lockf ) val=lockf ;;
|
|
681 flock ) val=flock ;;
|
438
|
682 file | dot ) val=file ;;
|
|
683 locking ) val=locking ;;
|
149
|
684 * ) USAGE_ERROR(["The \`--$optname' option must have one of these values:
|
438
|
685 \`lockf', \`flock', \`file', \`locking', or \`mmdf'."]) ;;
|
0
|
686 esac
|
149
|
687 eval "$opt=\"$val\""
|
0
|
688 ;;
|
|
689
|
149
|
690 dnl Has the user requested error-checking?
|
0
|
691 "error_checking" )
|
149
|
692 dnl value can be all, none, and/or a list of categories to check.
|
665
|
693 dnl Example: --error-checking=all,noextents,nocharbpos
|
149
|
694 dnl Example: --error-checking=none,malloc,gc
|
|
695
|
267
|
696 for x in `echo "$val" | sed -e 's/,/ /g'` ; do
|
149
|
697 case "$x" in
|
|
698 dnl all and none are only permitted as the first in the list.
|
0
|
699 n | no | non | none ) new_default=no ;;
|
|
700 a | al | all ) new_default=yes ;;
|
|
701
|
|
702 extents ) error_check_extents=yes ;;
|
|
703 noextents ) error_check_extents=no ;;
|
|
704
|
800
|
705 types ) error_check_types=yes ;;
|
|
706 notypes ) error_check_types=no ;;
|
|
707
|
|
708 text ) error_check_text=yes ;;
|
|
709 notext ) error_check_text=no ;;
|
0
|
710
|
|
711 gc ) error_check_gc=yes ;;
|
|
712 nogc ) error_check_gc=no ;;
|
|
713
|
|
714 malloc ) error_check_malloc=yes ;;
|
|
715 nomalloc ) error_check_malloc=no ;;
|
149
|
716
|
414
|
717 byte_code ) error_check_byte_code=yes ;;
|
|
718 nobyte_code ) error_check_byte_code=no ;;
|
|
719
|
800
|
720 glyphs ) error_check_glyphs=yes ;;
|
|
721 noglyphs ) error_check_glyphs=no ;;
|
|
722
|
|
723 display ) error_check_display=yes ;;
|
|
724 nodisplay ) error_check_display=no ;;
|
|
725
|
|
726 structures ) error_check_structures=yes ;;
|
|
727 nostructures ) error_check_structures=no ;;
|
442
|
728
|
0
|
729 * ) bogus_error_check=yes ;;
|
|
730 esac
|
70
|
731 if test "$bogus_error_check" -o \
|
|
732 \( -n "$new_default" -a -n "$echeck_notfirst" \) ; then
|
267
|
733 if test "$error_check_default" = yes ; then
|
800
|
734 types="\`all' (default), \`none', \`noextents', \`notypes', \`notext', \`nogc', \`nomalloc', \`noglyphs', \`nobyte-code', \`nodisplay', \`nostructures'."
|
0
|
735 else
|
800
|
736 types="\`all', \`none' (default), \`extents', \`types', \`text', \`gc', \`malloc', \`glyphs', \`byte-code', \`display', \`structures'."
|
0
|
737 fi
|
149
|
738 USAGE_ERROR(["Valid types for the \`--$optname' option are:
|
120
|
739 $types."])
|
151
|
740 elif test -n "$new_default" ; then
|
0
|
741 error_check_extents=$new_default
|
800
|
742 error_check_types=$new_default
|
|
743 error_check_text=$new_default
|
0
|
744 error_check_gc=$new_default
|
|
745 error_check_malloc=$new_default
|
414
|
746 error_check_byte_code=$new_default
|
442
|
747 error_check_glyphs=$new_default
|
800
|
748 error_check_display=$new_default
|
|
749 error_check_structures=$new_default
|
0
|
750 new_default= # reset this
|
|
751 fi
|
|
752 echeck_notfirst=true
|
|
753 done
|
|
754 ;;
|
|
755
|
149
|
756 dnl Has the user tried to tell us where the X files are?
|
|
757 dnl I think these are dopey, but no less than three alpha
|
|
758 dnl testers, at large sites, have said they have their X files
|
|
759 dnl installed in odd places.
|
|
760
|
|
761 dnl Has the user specified one of the path options?
|
0
|
762 prefix | exec_prefix | bindir | datadir | statedir | libdir | \
|
442
|
763 mandir | infodir | infopath | lispdir | etcdir | pkgdir | \
|
864
|
764 archlibdir | docdir | package_path | moduledir )
|
149
|
765 dnl If the value was omitted, get it from the next argument.
|
151
|
766 if test "$valomitted" = "yes"; then
|
|
767 if test "$#" = 0; then
|
149
|
768 USAGE_ERROR("The \`--$optname' option requires a value.");
|
120
|
769 fi
|
|
770 val="$1"; shift
|
0
|
771 fi
|
149
|
772 eval "$opt=\"$val\""
|
|
773
|
278
|
774 dnl You need to synchronize this with the way the
|
|
775 dnl default values are built.
|
|
776 case "$opt" in
|
420
|
777 dnl prefix is taken care of by --with-prefix
|
|
778 exec_prefix ) AC_DEFINE(EXEC_PREFIX_USER_DEFINED) ;;
|
274
|
779 lispdir ) AC_DEFINE(LISPDIR_USER_DEFINED) ;;
|
388
|
780 sitelispdir ) AC_DEFINE(SITELISPDIR_USER_DEFINED) ;;
|
|
781 moduledir ) AC_DEFINE(MODULEDIR_USER_DEFINED) ;;
|
274
|
782 etcdir ) AC_DEFINE(ETCDIR_USER_DEFINED) ;;
|
|
783 infodir ) AC_DEFINE(INFODIR_USER_DEFINED) ;;
|
|
784 infopath ) AC_DEFINE(INFOPATH_USER_DEFINED) ;;
|
|
785 package_path ) AC_DEFINE(PACKAGE_PATH_USER_DEFINED) ;;
|
278
|
786 datadir )
|
462
|
787 AC_DEFINE(INFODIR_USER_DEFINED)
|
|
788 AC_DEFINE(LISPDIR_USER_DEFINED)
|
|
789 AC_DEFINE(MODULEDIR_USER_DEFINED)
|
458
|
790 AC_DEFINE(ETCDIR_USER_DEFINED)
|
|
791 AC_DEFINE(DOCDIR_USER_DEFINED)
|
|
792 AC_DEFINE(ARCHLIBDIR_USER_DEFINED) ;;
|
420
|
793 docdir ) AC_DEFINE(DOCDIR_USER_DEFINED) ;;
|
274
|
794 exec_prefix | libdir | archlibdir ) AC_DEFINE(ARCHLIBDIR_USER_DEFINED) ;;
|
149
|
795 esac
|
0
|
796 ;;
|
|
797
|
149
|
798 dnl --no-create added by autoconf for use by config.status
|
|
799 "no_create" ) ;;
|
|
800
|
|
801 dnl Has the user asked for some help?
|
215
|
802 "usage" | "help" ) ${PAGER-more} ${srcdir}/configure.usage; exit 0 ;;
|
149
|
803
|
380
|
804 dnl Has the user specified the toolkit(s) to use for GUI elements?
|
|
805 "with_menubars" | \
|
|
806 "with_scrollbars" | \
|
442
|
807 "with_dialogs" | \
|
420
|
808 "with_widgets" )
|
149
|
809 case "$val" in
|
0
|
810 l | lu | luc | luci | lucid ) val=lucid ;;
|
724
|
811 mo | mot | moti | motif ) val=motif ;;
|
0
|
812 a | at | ath | athe | athen | athena ) val=athena ;;
|
442
|
813 n | no | non | none ) val=no ;;
|
|
814 y | ye | yes ) val=yes ;;
|
726
|
815 dnl Explicit --with-widgets on command line means yes.
|
|
816 "") val=yes ;;
|
462
|
817 g | gt | gtk ) val=gtk ;;
|
724
|
818 ms | msw ) val=msw ;;
|
149
|
819 * ) USAGE_ERROR(["The \`--$optname' option must have one of these values:
|
585
|
820 \`gtk', \`lucid', \`motif', \`athena', \`yes', or \`no'."]) ;;
|
0
|
821 esac
|
149
|
822 eval "$opt=\"$val\""
|
0
|
823 ;;
|
|
824
|
380
|
825 dnl Obsolete legacy argument? Warn, but otherwise ignore.
|
424
|
826 "use_minimal_tagbits" | \
|
|
827 "use_indexed_lrecord_implementation" | \
|
380
|
828 "run_in_place" | \
|
442
|
829 "const_is_losing" | \
|
380
|
830 "with_gnu_make" )
|
|
831 AC_MSG_WARN([Obsolete option \`--$optname' ignored.])
|
|
832 ;;
|
|
833
|
|
834 dnl Unrecognized option? No mercy for user errors.
|
149
|
835 * ) USAGE_ERROR("Unrecognized option: $arg") ;;
|
0
|
836
|
|
837 esac
|
|
838 ;;
|
|
839
|
243
|
840 dnl Assume anything with multiple hyphens is a configuration name.
|
|
841 *-*-*) configuration="$arg" ;;
|
|
842
|
380
|
843 dnl Unrecognized argument? No mercy for user errors.
|
243
|
844 *) USAGE_ERROR("Unrecognized argument: $arg") ;;
|
0
|
845
|
|
846 esac
|
|
847 done
|
|
848
|
149
|
849 dnl -------------------------
|
|
850 dnl Finish options processing
|
|
851 dnl -------------------------
|
|
852
|
272
|
853 dnl Several options are equivalent to, and override, environment variables.
|
|
854 test -n "$cpp" && CPP="$cpp"
|
|
855 test -n "$cppflags" && CPPFLAGS="$cppflags"
|
|
856 test -n "$libs" && LIBS="$libs"
|
|
857 test -n "$ldflags" && LDFLAGS="$ldflags"
|
|
858
|
149
|
859 dnl Get the arguments back. See the diatribe on Shell Magic above.
|
0
|
860 eval set x "$quoted_arguments"; shift
|
|
861
|
149
|
862 dnl --extra-verbose implies --verbose
|
|
863 test "$extra_verbose" = "yes" && verbose=yes
|
|
864
|
187
|
865 dnl with_x is an obsolete synonym for with_x11
|
149
|
866 test -n "$with_x" && with_x11="$with_x"
|
|
867
|
380
|
868 dnl --with-quantify or --with-purify imply --use-system-malloc
|
|
869 if test "$with_purify" = "yes" -o "$with_quantify" = "yes"; then
|
|
870 test "$with_system_malloc" = "default" && with_system_malloc=yes
|
|
871 fi
|
|
872
|
284
|
873 dnl XE_CHECK_FEATURE_DEPENDENCY(feature1, feature2)
|
|
874 define([XE_CHECK_FEATURE_DEPENDENCY],
|
|
875 [if test "$with_$1 $with_$2" = "yes no"; then
|
|
876 USAGE_ERROR("--with-$1 requires --with-$2")
|
|
877 elif test "$with_$2" = "no" ; then with_$1=no
|
|
878 elif test "$with_$1" = "yes"; then with_$2=yes
|
|
879 fi
|
|
880 ])
|
|
881
|
|
882 dnl CDE requires tooltalk
|
|
883 XE_CHECK_FEATURE_DEPENDENCY(cde, tooltalk)
|
|
884
|
149
|
885 dnl Find the source directory.
|
|
886 case "$srcdir" in
|
|
887
|
|
888 dnl If srcdir is not specified, see if "." or ".." might work.
|
0
|
889 "" )
|
120
|
890 for dir in "`echo $0 | sed 's|//|/|' | sed 's|/[[^/]]*$||'`" "." ".." ; do
|
|
891 if test -f "$dir/src/lisp.h" -a \
|
|
892 -f "$dir/lisp/version.el" ; then
|
149
|
893 srcdir="$dir"
|
70
|
894 break
|
|
895 fi
|
|
896 done
|
149
|
897 if test -z "$srcdir" ; then
|
120
|
898 USAGE_ERROR(["Neither the current directory nor its parent seem to
|
|
899 contain the XEmacs sources. If you do not want to build XEmacs in its
|
149
|
900 source tree, you should run \`$progname' in the directory in which
|
120
|
901 you wish to build XEmacs, using the \`--srcdir' option to say where the
|
|
902 sources may be found."])
|
|
903 fi
|
0
|
904 ;;
|
|
905
|
149
|
906 dnl Otherwise, check if the directory they specified is okay.
|
0
|
907 * )
|
243
|
908 if test ! -f "$srcdir/src/lisp.h" -o \
|
149
|
909 ! -f "$srcdir/lisp/version.el" ; then
|
120
|
910 USAGE_ERROR(["The directory specified with the \`--srcdir' option,
|
149
|
911 \`$srcdir', doesn't seem to contain the XEmacs sources. You should
|
|
912 either run the \`$progname' script at the top of the XEmacs source
|
120
|
913 tree, or use the \`--srcdir' option to specify the XEmacs source directory."])
|
0
|
914 fi
|
|
915 ;;
|
|
916 esac
|
|
917
|
243
|
918 dnl ###########################################################################
|
|
919 if test -z "$configuration"; then
|
380
|
920 dnl Guess the configuration
|
|
921 configuration=`${CONFIG_SHELL-/bin/sh} $srcdir/config.guess`
|
|
922 if test -z "$configuration"; then
|
243
|
923 USAGE_ERROR(["XEmacs has not been ported to this host type.
|
|
924 Try explicitly specifying the CONFIGURATION when rerunning configure."])
|
|
925 fi
|
|
926 fi
|
|
927
|
149
|
928 AC_PROG_LN_S
|
|
929
|
|
930 dnl Make symlinks for etc, lisp, and info directories while the path
|
|
931 dnl is still relative. We do not symlink lock because someone may
|
|
932 dnl have stuck the source on a read-only partition. Instead we
|
|
933 dnl create it as an actual directory later on if it does not already
|
|
934 dnl exist.
|
438
|
935 for dir in lisp etc man info tests; do
|
149
|
936 if test ! -d "$dir" ; then
|
|
937 echo Making symbolic link to "$srcdir/$dir"
|
157
|
938 ${LN_S} "$srcdir/$dir" "$dir"
|
0
|
939 fi
|
|
940 done
|
104
|
941
|
392
|
942 dnl Do our best to deal with automounter brokenness
|
|
943 dnl CANONICALIZE_PATH(varname)
|
|
944 define([CANONICALIZE_PATH],
|
|
945 [if test -d "/net"; then
|
|
946 if test -d "/tmp_mnt/net"; then tdir="tmp_mnt/net"; else tdir="tmp_mnt"; fi
|
|
947 $1=`echo "[$]$1" | \
|
|
948 sed -e "s|^${tdir}/|/net/|" -e "s|^/a/|/net/|" -e "s|^/amd/|/net/|"`
|
|
949 fi])dnl
|
|
950
|
181
|
951 dnl Calculate canonical name for blddir (i.e. current directory).
|
|
952 dnl PWD may already be the preferable absolute name for ".",
|
|
953 dnl but we can't trust it - it is sometimes inaccurate.
|
|
954 absolute_pwd="`pwd`";
|
187
|
955 if test -n "$PWD" -a "`cd $PWD && pwd`" = "$absolute_pwd"
|
181
|
956 then blddir="$PWD"
|
392
|
957 else blddir="$absolute_pwd"; CANONICALIZE_PATH(blddir)
|
181
|
958 fi
|
|
959 AC_SUBST(blddir)
|
|
960
|
149
|
961 dnl Make srcdir absolute, if not already. It is important to
|
|
962 dnl avoid running the path through pwd unnecessary, since pwd can
|
|
963 dnl give you automounter prefixes, which can go away.
|
|
964 case "$srcdir" in
|
0
|
965 /* ) ;;
|
181
|
966 . ) srcdir="$blddir" ;;
|
392
|
967 * ) srcdir="`cd $srcdir && pwd`"; CANONICALIZE_PATH(srcdir) ;;
|
0
|
968 esac
|
|
969
|
149
|
970 dnl Check if the source directory already has a configured system in it.
|
|
971 if test `pwd` != `sh -c cd $srcdir && pwd` \
|
|
972 && test -f "$srcdir/src/config.h"; then
|
|
973 (echo "$progname: WARNING: The directory tree \`$srcdir' is being used"
|
0
|
974 echo " as a build directory right now; it has been configured in its own"
|
|
975 echo " right. To configure in another directory as well, you MUST"
|
|
976 echo " use GNU make. If you do not have GNU make, then you must"
|
149
|
977 echo " now do \`make distclean' in $srcdir,"
|
|
978 echo " and then run $progname again.") >&2
|
120
|
979 extrasub='/^VPATH[[ ]]*=/c\
|
0
|
980 vpath %.c $(srcdir)\
|
|
981 vpath %.h $(srcdir)\
|
|
982 vpath %.y $(srcdir)\
|
|
983 vpath %.l $(srcdir)\
|
|
984 vpath %.s $(srcdir)\
|
|
985 vpath %.in $(srcdir)'
|
|
986 fi
|
|
987
|
171
|
988 dnl ----------------------------------------
|
|
989 dnl Find out which version of XEmacs this is
|
|
990 dnl ----------------------------------------
|
|
991 . "$srcdir/version.sh" || exit 1;
|
173
|
992 dnl Must do the following first to determine verbosity for AC_DEFINE
|
414
|
993 if test -n "$emacs_is_beta"; then beta=yes; else beta=no; fi
|
173
|
994 : "${extra_verbose=$beta}"
|
171
|
995 version="${emacs_major_version}.${emacs_minor_version}"
|
|
996 AC_DEFINE_UNQUOTED(EMACS_MAJOR_VERSION, $emacs_major_version)
|
|
997 AC_DEFINE_UNQUOTED(EMACS_MINOR_VERSION, $emacs_minor_version)
|
414
|
998 if test -n "$emacs_beta_version" ; then
|
|
999 if test "$beta" = "yes"; then
|
|
1000 version="${version}-b${emacs_beta_version}"
|
|
1001 AC_DEFINE_UNQUOTED(EMACS_BETA_VERSION, $emacs_beta_version)
|
|
1002 else
|
|
1003 version="${version}.${emacs_beta_version}"
|
|
1004 AC_DEFINE_UNQUOTED(EMACS_PATCH_LEVEL, $emacs_beta_version)
|
|
1005 fi
|
171
|
1006 fi
|
|
1007 AC_DEFINE_UNQUOTED(XEMACS_CODENAME, "$xemacs_codename")
|
975
|
1008 if test "X$xemacs_extra_name" != "X"; then
|
|
1009 AC_DEFINE_UNQUOTED(XEMACS_EXTRA_NAME, "$xemacs_extra_name")
|
|
1010 fi
|
171
|
1011 AC_DEFINE_UNQUOTED(EMACS_VERSION, "$version")
|
|
1012
|
280
|
1013 if test "$with_infodock" = "yes"; then
|
420
|
1014 if test ! -f ../../ID-INSTALL; then
|
280
|
1015 echo "Cannot build InfoDock without InfoDock sources"
|
|
1016 with_infodock=no
|
|
1017 fi
|
|
1018 fi
|
|
1019
|
|
1020 if test "$with_infodock" = "yes"; then
|
|
1021 dnl InfoDock version numbers. XEmacs will use the same style of numbering
|
|
1022 dnl after the release of XEmacs 21.0.
|
|
1023 AC_DEFINE_UNQUOTED(INFODOCK_MAJOR_VERSION, $infodock_major_version)
|
|
1024 AC_DEFINE_UNQUOTED(INFODOCK_MINOR_VERSION, $infodock_minor_version)
|
|
1025 AC_DEFINE_UNQUOTED(INFODOCK_BUILD_VERSION, $infodock_build_version)
|
|
1026 version=${infodock_major_version}.${infodock_minor_version}.${infodock_build_version}
|
|
1027 PROGNAME=infodock
|
|
1028 CPPFLAGS="$CPPFLAGS -DINFODOCK"
|
|
1029 else
|
|
1030 PROGNAME=xemacs
|
|
1031 fi
|
278
|
1032
|
442
|
1033 AC_DEFINE_UNQUOTED(EMACS_PROGNAME, "$PROGNAME")
|
|
1034
|
171
|
1035 dnl ----------------------------------
|
|
1036 dnl Error checking and debugging flags
|
|
1037 dnl ----------------------------------
|
|
1038 dnl Error checking default to "yes" in beta versions, to "no" in releases.
|
|
1039 dnl Same goes for --debug and --extra-verbosity.
|
414
|
1040 if test -n "$emacs_is_beta"; then beta=yes; else beta=no; fi
|
800
|
1041 test "${error_check_extents=$beta}" = yes && AC_DEFINE(ERROR_CHECK_EXTENTS)
|
|
1042 test "${error_check_types=$beta}" = yes && AC_DEFINE(ERROR_CHECK_TYPES)
|
|
1043 test "${error_check_text=$beta}" = yes && AC_DEFINE(ERROR_CHECK_TEXT)
|
|
1044 test "${error_check_gc=$beta}" = yes && AC_DEFINE(ERROR_CHECK_GC)
|
|
1045 test "${error_check_malloc=$beta}" = yes && AC_DEFINE(ERROR_CHECK_MALLOC)
|
|
1046 test "${error_check_byte_code=$beta}" = yes && AC_DEFINE(ERROR_CHECK_BYTE_CODE)
|
|
1047 test "${error_check_glyphs=$beta}" = yes && AC_DEFINE(ERROR_CHECK_GLYPHS)
|
|
1048 test "${error_check_display=$beta}" = yes && AC_DEFINE(ERROR_CHECK_DISPLAY)
|
|
1049 test "${error_check_structures=$beta}" = yes && AC_DEFINE(ERROR_CHECK_STRUCTURES)
|
171
|
1050 dnl debug=yes must be set when error checking is present. This should be
|
|
1051 dnl fixed up.
|
|
1052 dnl debug implies other options
|
272
|
1053 if test "${debug:=$beta}" = "yes"; then
|
771
|
1054 use_assertions=yes
|
|
1055 memory_usage_stats=yes
|
171
|
1056 AC_DEFINE(DEBUG_XEMACS)
|
|
1057 fi
|
|
1058 test "$use_assertions" = "yes" && AC_DEFINE(USE_ASSERTIONS)
|
|
1059 test "$memory_usage_stats" = "yes" && AC_DEFINE(MEMORY_USAGE_STATS)
|
|
1060
|
149
|
1061 dnl ------------------------------
|
|
1062 dnl Determine the s&m files to use
|
|
1063 dnl ------------------------------
|
|
1064 dnl Given the configuration name, set machfile and opsysfile to the
|
|
1065 dnl names of the m/*.h and s/*.h files we should use.
|
|
1066
|
|
1067 dnl Canonicalize the configuration name.
|
380
|
1068 AC_MSG_CHECKING("host system type")
|
217
|
1069 dnl allow -workshop suffix on configuration name
|
|
1070 internal_configuration=`echo $configuration | sed 's/-\(workshop\)//'`
|
380
|
1071 canonical=`${CONFIG_SHELL-/bin/sh} $srcdir/config.sub "$internal_configuration"`
|
|
1072 XE_STRIP_4TH_COMPONENT(configuration)
|
|
1073 XE_STRIP_4TH_COMPONENT(canonical)
|
|
1074 AC_MSG_RESULT($configuration)
|
0
|
1075
|
149
|
1076 dnl If you add support for a new configuration, add code to this
|
|
1077 dnl switch statement to recognize your configuration name and select
|
|
1078 dnl the appropriate operating system and machine description files.
|
|
1079
|
|
1080 dnl You would hope that you could choose an m/*.h file pretty much
|
|
1081 dnl based on the machine portion of the configuration name, and an s-
|
|
1082 dnl file based on the operating system portion. However, it turns out
|
|
1083 dnl that each m/*.h file is pretty manufacturer-specific - for
|
|
1084 dnl example, apollo.h, hp9000s300.h, mega68k, news.h, and tad68k are
|
|
1085 dnl all 68000 machines; mips.h, pmax.h, and news-risc are all MIPS
|
|
1086 dnl machines. So we basically have to have a special case for each
|
|
1087 dnl configuration name.
|
|
1088
|
|
1089 dnl As far as handling version numbers on operating systems is
|
|
1090 dnl concerned, make sure things will fail in a fixable way. If
|
|
1091 dnl /etc/MACHINES says nothing about version numbers, be
|
|
1092 dnl prepared to handle anything reasonably. If version numbers
|
|
1093 dnl matter, be sure /etc/MACHINES says something about it.
|
|
1094
|
|
1095 dnl Eric Raymond says we should accept strings like "sysvr4" to mean
|
|
1096 dnl "System V Release 4"; he writes, "The old convention encouraged"
|
|
1097 dnl "confusion between `system' and `release' levels'."
|
|
1098
|
151
|
1099 machine='' opsys=''
|
149
|
1100
|
|
1101 dnl Straightforward machine determination
|
|
1102 case "$canonical" in
|
|
1103 sparc-*-* ) machine=sparc ;;
|
373
|
1104 alpha*-*-* ) machine=alpha ;;
|
149
|
1105 vax-*-* ) machine=vax ;;
|
|
1106 mips-dec-* ) machine=pmax ;;
|
440
|
1107 mips-sgi-irix6* ) machine=iris6d ;;
|
149
|
1108 mips-sgi-* ) machine=iris4d ;;
|
424
|
1109 mips*-linux ) machine=mips ;;
|
149
|
1110 romp-ibm-* ) machine=ibmrt ;;
|
|
1111 rs6000-ibm-aix* ) machine=ibmrs6000 ;;
|
|
1112 powerpc-ibm-aix* ) machine=ibmrs6000 ;;
|
163
|
1113 powerpc*-* ) machine=powerpc ;;
|
149
|
1114 hppa-*-* ) machine=hp800 ;;
|
|
1115 m88k-dg-* ) machine=aviion ;;
|
|
1116 m68*-sony-* ) machine=news ;;
|
|
1117 mips-sony-* ) machine=news-risc ;;
|
|
1118 clipper-* ) machine=clipper ;;
|
442
|
1119 arm* ) machine=arm ;;
|
380
|
1120 ns32k-* ) machine=ns32000 ;;
|
149
|
1121 esac
|
|
1122
|
|
1123 dnl Straightforward OS determination
|
|
1124 case "$canonical" in
|
|
1125 *-*-linux* ) opsys=linux ;;
|
|
1126 *-*-netbsd* ) opsys=netbsd ;;
|
286
|
1127 *-*-openbsd* ) opsys=openbsd ;;
|
149
|
1128 *-*-nextstep* ) opsys=nextstep ;;
|
|
1129 *-*-vms ) opsys=vms ;;
|
|
1130
|
|
1131 dnl DEC OSF
|
|
1132 *-dec-osf1.3 | *-dec-osf2* ) opsys=decosf1-3 ;;
|
|
1133 *-dec-osf1.2 | *-dec-osf1* ) opsys=decosf1-2 ;;
|
|
1134 *-dec-osf3.[[2-9]] ) opsys=decosf3-2 ;;
|
|
1135 *-dec-osf3* ) opsys=decosf3-1 ;;
|
444
|
1136 *-dec-osf[[4-9]]* ) opsys=decosf4-0 ;;
|
149
|
1137
|
|
1138 dnl DEC Ultrix
|
|
1139 *-*-ultrix[[0-3]].* | *-*-ultrix4.0* ) opsys=bsd4-2 ;;
|
|
1140 *-*-ultrix4.[[12]]* ) opsys=bsd4-3 ;;
|
|
1141 *-*-ultrix* ) opsys=ultrix4-3 ;;
|
|
1142
|
|
1143 dnl AIX
|
|
1144 *-*-aix3.1* ) opsys=aix3-1 ;;
|
|
1145 *-*-aix3.2.5 ) opsys=aix3-2-5 ;;
|
|
1146 *-*-aix3* ) opsys=aix3-2 ;;
|
373
|
1147 *-*-aix4.0* ) opsys=aix4 ;;
|
149
|
1148 *-*-aix4.1* ) opsys=aix4-1 ;;
|
373
|
1149 *-*-aix4* ) opsys=aix4-2 ;;
|
149
|
1150
|
|
1151 dnl Other generic OSes
|
|
1152 *-gnu* ) opsys=gnu ;;
|
|
1153 *-*-bsd4.[[01]] ) opsys=bsd4-1 ;;
|
|
1154 *-*-bsd4.2 ) opsys=bsd4-2 ;;
|
|
1155 *-*-bsd4.3 ) opsys=bsd4-3 ;;
|
|
1156 *-*-aos4.2 ) opsys=bsd4-2 ;;
|
|
1157 *-*-aos* ) opsys=bsd4-3 ;;
|
|
1158 *-*-sysv0 | *-*-sysvr0 ) opsys=usg5-0 ;;
|
|
1159 *-*-sysv2 | *-*-sysvr2 ) opsys=usg5-2 ;;
|
|
1160 *-*-sysv2.2 | *-*-sysvr2.2 ) opsys=usg5-2-2 ;;
|
|
1161 *-*-sysv3* | *-*-sysvr3* ) opsys=usg5-3 ;;
|
|
1162 *-*-sysv4.1* | *-*-sysvr4.1* )opsys=usg5-4 NON_GNU_CPP=/usr/lib/cpp ;;
|
|
1163 *-*-sysv4.[[2-9]]* | *-sysvr4.[[2-9]]* )
|
|
1164 if test -z "$NON_GNU_CPP" ; then
|
151
|
1165 for prog in "/usr/ccs/lib/cpp" "/lib/cpp"; do
|
|
1166 if test -f "$prog"; then NON_GNU_CPP="$prog"; break; fi
|
|
1167 done
|
149
|
1168 fi
|
|
1169 opsys=usg5-4-2 ;;
|
|
1170 *-sysv4* | *-sysvr4* ) opsys=usg5-4 ;;
|
|
1171 *-*-mach_bsd4.3* ) opsys=mach-bsd4-3 ;;
|
|
1172 esac
|
|
1173
|
|
1174 case "$canonical" in
|
|
1175
|
|
1176 dnl NetBSD ports
|
0
|
1177 *-*-netbsd* )
|
149
|
1178 case "$canonical" in
|
120
|
1179 i[[3-9]]86-*-netbsd*) machine=intel386 ;;
|
0
|
1180 hp300-*-netbsd* | amiga-*-netbsd* | sun3-*-netbsd* | mac68k-*-netbsd* | da30-*-netbsd* | m68k-*-netbsd* )
|
149
|
1181 dnl Yes, this is somewhat bogus.
|
0
|
1182 machine=hp9000s300 ;;
|
70
|
1183 pc532-*-netbsd* | ns32k-*-netbsd* ) machine=ns32000 ;;
|
|
1184 pmax-*-netbsd* | mips-*-netbsd* ) machine=pmax ;;
|
0
|
1185 esac
|
|
1186 ;;
|
|
1187
|
286
|
1188 dnl OpenBSD ports
|
|
1189 *-*-openbsd* )
|
|
1190 case "${canonical}" in
|
|
1191 i386-*-openbsd*) machine=intel386 ;;
|
|
1192 m68k-*-openbsd*) machine=hp9000s300 ;;
|
|
1193 mipsel-*-openbsd*) machine=pmax ;;
|
|
1194 esac
|
|
1195 ;;
|
|
1196
|
149
|
1197 dnl Acorn RISCiX:
|
70
|
1198 arm-acorn-riscix1.1* ) machine=acorn opsys=riscix1-1 ;;
|
|
1199 arm-acorn-riscix1.2* | arm-acorn-riscix ) machine=acorn opsys=riscix1-2 ;;
|
0
|
1200
|
149
|
1201 dnl Alliant machines
|
70
|
1202 fx80-alliant-* ) machine=alliant4 opsys=bsd4-2 ;;
|
|
1203 i860-alliant-* ) machine=alliant-2800 opsys=bsd4-3 ;;
|
0
|
1204
|
149
|
1205 dnl Altos 3068
|
70
|
1206 m68*-altos-sysv* ) machine=altos opsys=usg5-2 ;;
|
0
|
1207
|
149
|
1208 dnl Amdahl UTS
|
70
|
1209 580-amdahl-sysv* ) machine=amdahl opsys=usg5-2-2 ;;
|
0
|
1210
|
149
|
1211 dnl Apollo, Domain/OS
|
70
|
1212 m68*-apollo-* ) machine=apollo opsys=bsd4-3 ;;
|
149
|
1213
|
|
1214 dnl AT&T 3b2, 3b5, 3b15, 3b20
|
70
|
1215 we32k-att-sysv* ) machine=att3b opsys=usg5-2-2 ;;
|
0
|
1216
|
149
|
1217 dnl AT&T 3b1 - The Mighty Unix PC!
|
70
|
1218 m68*-att-sysv* ) machine=7300 opsys=usg5-2-2 ;;
|
0
|
1219
|
149
|
1220 dnl Bull machines
|
74
|
1221 rs6000-bull-bosx* ) machine=ibmrs6000 opsys=aix3-2 ;; # dpx20
|
|
1222 m68*-bull-sysv3* ) machine=dpx2 opsys=usg5-3 ;; # dpx2
|
|
1223 m68*-bull-sysv2* ) machine=sps7 opsys=usg5-2 ;; # sps7
|
0
|
1224
|
149
|
1225 dnl CCI 5/32, 6/32 -- see "Tahoe".
|
|
1226
|
|
1227 dnl Celerity
|
70
|
1228 celerity-celerity-bsd* ) machine=celerity opsys=bsd4-2 ;;
|
0
|
1229
|
149
|
1230 dnl Convex
|
0
|
1231 *-convex-bsd* | *-convex-convexos* )
|
|
1232 machine=convex opsys=bsd4-3
|
|
1233 NON_GNU_CPP="cc -E -P"
|
|
1234 ;;
|
|
1235
|
149
|
1236 dnl Cubix QBx/386
|
120
|
1237 i[[3-9]]86-cubix-sysv* ) machine=intel386 opsys=usg5-3 ;;
|
0
|
1238
|
864
|
1239 dnl Darwin, a.k.a. MacOS X (based on Mach and Freebsd)
|
|
1240 *-*-darwin*)
|
|
1241 opsys=darwin
|
|
1242 RANLIB="ranlib -c" dnl Avoids a link error with lwlib-config.c
|
|
1243 pdump=yes dnl No "native" working dumper available
|
|
1244 ;;
|
|
1245
|
149
|
1246 dnl Data General AViiON Machines
|
120
|
1247 i586-dg-dgux*R4* | i586-dg-dgux5.4.4* ) machine=aviion opsys=dgux5-4r4 ;;
|
149
|
1248 m88k-dg-dgux5.4R3* | m88k-dg-dgux5.4.3* ) opsys=dgux5-4r3 ;;
|
|
1249 m88k-dg-dgux5.4R2* | m88k-dg-dgux5.4.2* ) opsys=dgux5-4r2 ;;
|
|
1250 m88k-dg-dgux* ) opsys=dgux ;;
|
|
1251
|
|
1252 dnl Motorola Delta machines
|
|
1253 m68k-motorola-sysv* | m68000-motorola-sysv* ) machine=delta opsys=usg5-3 ;;
|
0
|
1254 m88k-motorola-sysv4* )
|
149
|
1255 dnl jbotte@bnr.ca says that UNIX_System_V <hostName> 4.0 R40V4.3 m88k mc88110
|
|
1256 dnl needs POSIX_SIGNALS and therefore needs usg5-4-2.
|
|
1257 dnl I hope there are not other 4.0 versions for this machine
|
|
1258 dnl which really need usg5-4 instead.
|
0
|
1259 machine=delta88k opsys=usg5-4-2
|
|
1260 ;;
|
70
|
1261 m88k-motorola-sysv* | m88k-motorola-m88kbcs* ) machine=delta88k opsys=usg5-3 ;;
|
0
|
1262
|
149
|
1263 dnl Dual machines
|
70
|
1264 m68*-dual-sysv* ) machine=dual opsys=usg5-2 ;;
|
|
1265 m68*-dual-uniplus* ) machine=dual opsys=unipl5-2 ;;
|
0
|
1266
|
149
|
1267 dnl Encore machines
|
70
|
1268 ns16k-encore-bsd* ) machine=ns16000 opsys=umax ;;
|
0
|
1269
|
149
|
1270 dnl Gould Power Node and NP1
|
70
|
1271 pn-gould-bsd4.2* ) machine=gould opsys=bsd4-2 ;;
|
|
1272 pn-gould-bsd4.3* ) machine=gould opsys=bsd4-3 ;;
|
|
1273 np1-gould-bsd* ) machine=gould-np1 opsys=bsd4-3 ;;
|
0
|
1274
|
149
|
1275 dnl Harris Night Hawk machines running CX/UX (a 5000 looks just like a 4000
|
|
1276 dnl as far as XEmacs is concerned).
|
0
|
1277 m88k-harris-cxux* )
|
149
|
1278 dnl Build needs to be different on 7.0 and later releases
|
0
|
1279 case "`uname -r`" in
|
120
|
1280 [[56]].[[0-9]] ) machine=nh4000 opsys=cxux ;;
|
|
1281 [[7]].[[0-9]] ) machine=nh4000 opsys=cxux7 ;;
|
0
|
1282 esac
|
|
1283 NON_GNU_CPP="/lib/cpp"
|
|
1284 ;;
|
149
|
1285 dnl Harris ecx or gcx running CX/UX (Series 1200, Series 3000)
|
70
|
1286 m68k-harris-cxux* ) machine=nh3000 opsys=cxux ;;
|
149
|
1287 dnl Harris power pc NightHawk running Power UNIX (Series 6000)
|
|
1288 powerpc-harris-powerunix ) machine=nh6000 opsys=powerunix NON_GNU_CPP="cc -Xo -E -P" ;;
|
|
1289
|
|
1290 dnl Honeywell XPS100
|
70
|
1291 xps*-honeywell-sysv* ) machine=xps100 opsys=usg5-2 ;;
|
0
|
1292
|
149
|
1293 dnl HP 9000 series 200 or 300
|
70
|
1294 m68*-hp-bsd* ) machine=hp9000s300 opsys=bsd4-3 ;;
|
|
1295
|
149
|
1296 dnl HP-UX
|
70
|
1297 *-hp-hpux* )
|
149
|
1298 dnl Figure out machine and opsys orthogonally
|
|
1299 case "$canonical" in
|
70
|
1300 m68* ) machine=hp9000s300 ;;
|
|
1301 hppa* ) machine=hp800 ;;
|
|
1302 esac
|
|
1303
|
149
|
1304 case "$canonical" in
|
|
1305 *-hp-hpux7* ) opsys=hpux ;;
|
|
1306 *-hp-hpux8* ) opsys=hpux8 ;;
|
|
1307 *-hp-hpux9* ) opsys=hpux9 ;;
|
|
1308 *-hp-hpux10* ) opsys=hpux10 ;;
|
269
|
1309 *-hp-hpux11* ) opsys=hpux11 ;;
|
151
|
1310 * ) opsys=hpux ;;
|
0
|
1311 esac
|
74
|
1312
|
149
|
1313 dnl HP has a broken "strcat"
|
151
|
1314 case "$opsys" in hpux9 | hpux10 ) XE_ADD_OBJS(strcat.o) ;; esac
|
149
|
1315
|
269
|
1316 if test "$opsys" = "hpux10" -o "$opsys" = "hpux11"; then \
|
|
1317 ansi_flag="-Ae"; else ansi_flag="-Aa"; fi
|
149
|
1318 NON_GNU_CC="cc $ansi_flag" NON_GNU_CPP="cc $ansi_flag -E"
|
|
1319
|
|
1320 case "$canonical" in *-hp-hpux*shr* ) opsys="${opsys}-shr" ;; esac
|
0
|
1321 ;;
|
|
1322
|
149
|
1323 dnl Orion machines
|
70
|
1324 orion-orion-bsd* ) machine=orion opsys=bsd4-2 ;;
|
|
1325 clipper-orion-bsd* ) machine=orion105 opsys=bsd4-2 ;;
|
0
|
1326
|
149
|
1327 dnl IBM machines
|
120
|
1328 i[[3-9]]86-ibm-aix1.1* ) machine=ibmps2-aix opsys=usg5-2-2 ;;
|
|
1329 i[[3-9]]86-ibm-aix1.[[23]]* | i[[3-9]]86-ibm-aix* ) machine=ibmps2-aix opsys=usg5-3 ;;
|
70
|
1330 i370-ibm-aix*) machine=ibm370aix opsys=usg5-3 ;;
|
149
|
1331 romp-ibm-aos* ) opsys=bsd4-3 ;;
|
|
1332 romp-ibm-bsd* ) opsys=bsd4-3 ;;
|
|
1333 romp-ibm-mach* ) opsys=mach-bsd4-3 ;;
|
|
1334
|
|
1335 dnl Integrated Solutions "Optimum V"
|
70
|
1336 m68*-isi-bsd4.2* ) machine=isi-ov opsys=bsd4-2 ;;
|
|
1337 m68*-isi-bsd4.3* ) machine=isi-ov opsys=bsd4-3 ;;
|
0
|
1338
|
149
|
1339 dnl Intel 386 machines where we do care about the manufacturer
|
120
|
1340 i[[3-9]]86-intsys-sysv* ) machine=is386 opsys=usg5-2-2 ;;
|
0
|
1341
|
149
|
1342 dnl Prime EXL
|
120
|
1343 i[[3-9]]86-prime-sysv* ) machine=i386 opsys=usg5-3 ;;
|
0
|
1344
|
149
|
1345 dnl Sequent Symmetry running Dynix
|
120
|
1346 i[[3-9]]86-sequent-bsd* ) machine=symmetry opsys=bsd4-3 ;;
|
0
|
1347
|
149
|
1348 dnl Sequent Symmetry running DYNIX/ptx
|
|
1349 i[[3-9]]86-sequent-ptx* ) machine=sequent-ptx opsys=ptx NON_GNU_CPP="/lib/cpp" ;;
|
|
1350
|
|
1351 dnl Unspecified sysv on an ncr machine defaults to svr4.2.
|
|
1352 dnl (Plain usg5-4 does not turn on POSIX signals, which we need.)
|
120
|
1353 i[[3-9]]86-ncr-sysv* ) machine=ncr386 opsys=usg5-4-2 ;;
|
0
|
1354
|
149
|
1355 dnl Intel Paragon OSF/1
|
70
|
1356 i860-intel-osf1* ) machine=paragon opsys=osf1 NON_GNU_CPP=/usr/mach/lib/cpp ;;
|
0
|
1357
|
149
|
1358 dnl Intel 860
|
|
1359 i860-*-sysv4* ) machine=i860 opsys=usg5-4 NON_GNU_CC="/bin/cc" NON_GNU_CPP="/usr/ccs/lib/cpp" ;;
|
|
1360
|
|
1361 dnl Masscomp machines
|
70
|
1362 m68*-masscomp-rtu* ) machine=masscomp opsys=rtu ;;
|
0
|
1363
|
149
|
1364 dnl Megatest machines
|
70
|
1365 m68*-megatest-bsd* ) machine=mega68 opsys=bsd4-2 ;;
|
0
|
1366
|
149
|
1367 dnl Workstations sold by MIPS
|
|
1368 dnl This is not necessarily all workstations using the MIPS processor -
|
|
1369 dnl Irises are produced by SGI, and DECstations by DEC.
|
|
1370 mips-mips-usg* ) machine=mips4 ;;
|
70
|
1371 mips-mips-riscos4 )
|
|
1372 machine=mips4
|
0
|
1373 NON_GNU_CC="cc -systype bsd43"
|
|
1374 NON_GNU_CPP="cc -systype bsd43 -E"
|
149
|
1375 case "$canonical" in
|
70
|
1376 mips-mips-riscos4* ) opsys=bsd4-3 ;;
|
|
1377 mips-mips-riscos5* ) opsys=riscos5 ;;
|
|
1378 esac
|
0
|
1379 ;;
|
70
|
1380 mips-mips-bsd* ) machine=mips opsys=bsd4-3 ;;
|
|
1381 mips-mips-* ) machine=mips opsys=usg5-2-2 ;;
|
0
|
1382
|
149
|
1383 dnl NeXT
|
70
|
1384 m68*-next-* | m68k-*-nextstep* ) machine=m68k opsys=nextstep ;;
|
0
|
1385
|
149
|
1386 dnl The complete machine from National Semiconductor
|
70
|
1387 ns32k-ns-genix* ) machine=ns32000 opsys=usg5-2 ;;
|
0
|
1388
|
149
|
1389 dnl NCR machines
|
70
|
1390 m68*-ncr-sysv2* | m68*-ncr-sysvr2* ) machine=tower32 opsys=usg5-2-2 ;;
|
|
1391 m68*-ncr-sysv3* | m68*-ncr-sysvr3* ) machine=tower32v3 opsys=usg5-3 ;;
|
0
|
1392
|
149
|
1393 dnl Nixdorf Targon 31
|
70
|
1394 m68*-nixdorf-sysv* ) machine=targon31 opsys=usg5-2-2 ;;
|
0
|
1395
|
149
|
1396 dnl Nu (TI or LMI)
|
70
|
1397 m68*-nu-sysv* ) machine=nu opsys=usg5-2 ;;
|
0
|
1398
|
149
|
1399 dnl Plexus
|
70
|
1400 m68*-plexus-sysv* ) machine=plexus opsys=usg5-2 ;;
|
0
|
1401
|
149
|
1402 dnl Pyramid machines
|
70
|
1403 pyramid-pyramid-bsd* ) machine=pyramid opsys=bsd4-2 ;;
|
0
|
1404
|
149
|
1405 dnl Sequent Balance
|
70
|
1406 ns32k-sequent-bsd4.2* ) machine=sequent opsys=bsd4-2 ;;
|
|
1407 ns32k-sequent-bsd4.3* ) machine=sequent opsys=bsd4-3 ;;
|
0
|
1408
|
149
|
1409 dnl Siemens Nixdorf
|
0
|
1410 mips-siemens-sysv* | mips-sni-sysv*)
|
|
1411 machine=mips-siemens opsys=usg5-4
|
|
1412 NON_GNU_CC=/usr/ccs/bin/cc
|
|
1413 NON_GNU_CPP=/usr/ccs/lib/cpp
|
|
1414 ;;
|
|
1415
|
377
|
1416 dnl NEC
|
|
1417 mips-nec-sysv*)
|
|
1418 machine=mips-nec
|
|
1419 NON_GNU_CC=/usr/ccs/bin/cc
|
|
1420 NON_GNU_CPP=/usr/ccs/lib/cpp
|
|
1421 ;;
|
|
1422
|
149
|
1423 dnl Silicon Graphics machines
|
|
1424 dnl Iris 2500 and Iris 2500 Turbo (aka the Iris 3030)
|
70
|
1425 m68*-sgi-iris3.5* ) machine=irist opsys=iris3-5 ;;
|
|
1426 m68*-sgi-iris3.6* | m68*-sgi-iris*) machine=irist opsys=iris3-6 ;;
|
149
|
1427 dnl Iris 4D
|
|
1428 mips-sgi-irix3.* ) opsys=irix3-3 ;;
|
|
1429 mips-sgi-irix4.* ) opsys=irix4-0 ;;
|
207
|
1430 mips-sgi-irix6* ) opsys=irix6-0 ;;
|
149
|
1431 mips-sgi-irix5.1* ) opsys=irix5-1 ;;
|
|
1432 mips-sgi-irix5.2* ) opsys=irix5-2 ;;
|
|
1433 mips-sgi-irix5.* ) opsys=irix5-3 ;;
|
|
1434 mips-sgi-irix* ) opsys=irix5-0 ;;
|
|
1435
|
|
1436 dnl SONY machines
|
|
1437 *-sony-newsos[[34]]* | *-sony-news[[34]]* ) opsys=bsd4-3 ;;
|
|
1438 *-sony-news* ) opsys=newsos5 ;;
|
|
1439
|
|
1440 dnl Stride
|
70
|
1441 m68*-stride-sysv* ) machine=stride opsys=usg5-2 ;;
|
0
|
1442
|
149
|
1443 dnl Suns
|
0
|
1444 *-*-solaris* | *-*-sunos* | *-sun-mach* | *-sun-bsd* )
|
149
|
1445 dnl Hardware type
|
|
1446 case "$canonical" in
|
0
|
1447 m68*-sunos1* ) machine=sun1 ;;
|
|
1448 m68*-sunos2* ) machine=sun2 ;;
|
|
1449 m68* ) machine=sun3 ;;
|
163
|
1450 i*86*-sun-sunos[[34]]* ) machine=sun386 ;;
|
|
1451 i*86-*-* ) machine=intel386 ;;
|
0
|
1452 rs6000* ) machine=rs6000 ;;
|
149
|
1453 esac
|
|
1454
|
|
1455 dnl Make $canonical even more so.
|
|
1456 case "$canonical" in *-sunos5*)
|
163
|
1457 canonical=`echo $canonical | sed -e s/sunos5/solaris2/`;;
|
0
|
1458 esac
|
149
|
1459
|
157
|
1460 dnl On SunOS 4, use /usr/lib/cpp, sans dynodump, /bin/ranlib
|
|
1461 dnl On SunOS 5, use cc -E, need dynodump, RANLIB not needed
|
149
|
1462 dnl But, SunOS 5.6 no longer needs dynodump because it has a similar
|
|
1463 dnl function integrated.
|
|
1464 case "$canonical" in
|
0
|
1465 *-sunos4* )
|
157
|
1466 #test -f /usr/lib/cpp && NON_GNU_CPP=/usr/lib/cpp ;;
|
|
1467 : ;;
|
70
|
1468 *-solaris2* )
|
157
|
1469 #test -f /usr/ccs/lib/cpp && NON_GNU_CPP=/usr/ccs/lib/cpp
|
|
1470 RANLIB=':' ;;
|
151
|
1471 esac
|
149
|
1472
|
|
1473 case "$canonical" in
|
163
|
1474 *-solaris* )
|
|
1475 opsys=sol2
|
|
1476 os_release=`uname -r | sed -e 's/^\([[0-9]]\)\.\([[0-9]]\).*/\1\2/'`
|
|
1477 AC_DEFINE_UNQUOTED(OS_RELEASE, $os_release) ;;
|
|
1478
|
149
|
1479 dnl The last Sun386 ran 4.0.
|
163
|
1480 i*86-*-sunos4* ) opsys=sunos4-0 ;;
|
74
|
1481 *-sunos4.0* ) opsys=sunos4-0 ;;
|
|
1482 *-sunos4.1.2* ) opsys=sunos4-1-2 ;;
|
110
|
1483 *-sunos4.1.3* ) opsys=sunos4-1-3 ;;
|
120
|
1484 *-sunos4.1.[[4-9]]* ) opsys=sunos4-1-4 ;;
|
74
|
1485 *-sunos4* | *-sunos ) opsys=sunos4-1 ;;
|
|
1486 *-mach* ) opsys=mach-bsd4-3 ;;
|
|
1487 * ) opsys=bsd4-2 ;;
|
0
|
1488 esac
|
70
|
1489
|
149
|
1490 case "$canonical" in *-sunos4*shr* ) opsys="${opsys}-shr" ;; esac
|
|
1491
|
|
1492 dnl Watch out for a compiler guaranteed not to work.
|
163
|
1493 test "$opsys $CC" = "sol2 /usr/ucb/cc" && CC=""
|
0
|
1494 ;;
|
70
|
1495
|
149
|
1496 dnl Tadpole 68k
|
70
|
1497 m68*-tadpole-sysv* ) machine=tad68k opsys=usg5-3 ;;
|
0
|
1498
|
149
|
1499 dnl Tahoe machines
|
70
|
1500 tahoe-tahoe-bsd4.2* ) machine=tahoe opsys=bsd4-2 ;;
|
|
1501 tahoe-tahoe-bsd4.3* ) machine=tahoe opsys=bsd4-3 ;;
|
0
|
1502
|
149
|
1503 dnl Tandem Integrity S2
|
70
|
1504 mips-tandem-sysv* ) machine=tandem-s2 opsys=usg5-3 ;;
|
0
|
1505
|
149
|
1506 dnl Tektronix XD88
|
70
|
1507 m88k-tektronix-sysv3* ) machine=tekxd88 opsys=usg5-3 ;;
|
0
|
1508
|
149
|
1509 dnl Tektronix 16000 box (6130?)
|
70
|
1510 ns16k-tektronix-bsd* ) machine=ns16000 opsys=bsd4-2 ;;
|
149
|
1511 dnl Tektronix 4300
|
|
1512 dnl src/m/tek4300.h hints that this is a m68k machine.
|
70
|
1513 m68*-tektronix-bsd* ) machine=tek4300 opsys=bsd4-3 ;;
|
0
|
1514
|
149
|
1515 dnl Titan P2 or P3
|
70
|
1516 titan-titan-sysv* ) machine=titan opsys=usg5-3 ;;
|
0
|
1517
|
149
|
1518 dnl Ustation E30 (SS5E)
|
70
|
1519 m68*-unisys-uniplus* ) machine=ustation opsystem=unipl5-2 ;;
|
0
|
1520
|
149
|
1521 dnl Vaxen.
|
0
|
1522 vax-dec-* )
|
149
|
1523 case "$canonical" in
|
|
1524 *-sysv[[01]]* | *-sysvr[[01]]* ) opsys=usg5-0 ;;
|
|
1525 *-sysv2* | *-sysvr2* ) opsys=usg5-2 ;;
|
|
1526 *-mach* ) opsys=mach-bsd4-3 ;;
|
0
|
1527 esac
|
|
1528 ;;
|
|
1529
|
149
|
1530 dnl Whitechapel MG1
|
70
|
1531 ns16k-whitechapel-* ) machine=mg1 ;;
|
0
|
1532
|
149
|
1533 dnl Wicat
|
70
|
1534 m68*-wicat-sysv* ) machine=wicat opsys=usg5-2 ;;
|
0
|
1535
|
149
|
1536 dnl Intel 386 machines where we do not care about the manufacturer
|
120
|
1537 i[[3-9]]86-*-* )
|
0
|
1538 machine=intel386
|
149
|
1539 case "$canonical" in
|
120
|
1540 *-isc1.* | *-isc2.[[01]]* ) opsys=386-ix ;;
|
0
|
1541 *-isc2.2* ) opsys=isc2-2 ;;
|
|
1542 *-isc4.0* ) opsys=isc4-0 ;;
|
|
1543 *-isc4.* ) opsys=isc4-1
|
|
1544 GCC_TEST_OPTIONS=-posix
|
|
1545 NON_GCC_TEST_OPTIONS=-Xp
|
|
1546 ;;
|
|
1547 *-isc* ) opsys=isc3-0 ;;
|
149
|
1548 *-esix5* ) opsys=esix5r4 NON_GNU_CPP=/usr/lib/cpp ;;
|
0
|
1549 *-esix* ) opsys=esix ;;
|
|
1550 *-mach* ) opsys=mach-bsd4-3 ;;
|
|
1551 *-xenix* ) opsys=xenix ;;
|
149
|
1552 *-sco3.2v4* ) opsys=sco4 NON_GNU_CPP=/lib/cpp ;;
|
0
|
1553 *-bsd386* | *-bsdi1* ) opsys=bsd386 ;;
|
392
|
1554 *-bsdi4* ) opsys=bsdos4 ;;
|
110
|
1555 *-bsdi3* ) opsys=bsdos3 ;;
|
0
|
1556 *-bsdi2.1* ) opsys=bsdos2-1 ;;
|
|
1557 *-bsdi2* ) opsys=bsdos2 ;;
|
460
|
1558 *-sco3.2v5* ) opsys=sco5 ;;
|
422
|
1559 *-sysv5* ) opsys=sco7 ;;
|
70
|
1560 *-386bsd* ) opsys=386bsd ;;
|
|
1561 *-freebsd* ) opsys=freebsd ;;
|
0
|
1562 *-nextstep* ) opsys=nextstep ;;
|
398
|
1563 *-pc-cygwin* ) opsys=cygwin32 ;;
|
|
1564 *-pc-mingw* ) opsys=mingw32 ;
|
|
1565 test -z "$with_tty" && with_tty="no";;
|
149
|
1566 dnl Otherwise, we fall through to the generic opsys code at the bottom.
|
0
|
1567 esac
|
|
1568 ;;
|
|
1569
|
149
|
1570 dnl Linux/68k
|
70
|
1571 m68k-*-linux* ) machine=m68k opsys=linux ;;
|
|
1572
|
0
|
1573 esac
|
|
1574
|
505
|
1575 dnl Initialize machine from $canonical if not in our database above.
|
442
|
1576 test -z "$machine" && machine=`echo $canonical | sed 's/-.*$//'`
|
505
|
1577
|
|
1578 dnl Initialize opsys from `uname -s` if not in our database above.
|
|
1579 test -z "$opsys" && opsys=`uname -s | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
|
442
|
1580
|
|
1581 dnl Use configure-time autodetection if s&m not available
|
|
1582 if test -r "${srcdir}/src/m/${machine}.h"; then
|
|
1583 machfile="m/${machine}.h"
|
|
1584 AC_DEFINE_UNQUOTED(config_machfile, "$machfile")
|
|
1585 else
|
|
1586 echo "XEmacs has no builtin knowledge of \`$machine' machines."
|
|
1587 echo "Using configure-time autodetection only."
|
0
|
1588 fi
|
|
1589
|
442
|
1590 if test -r "${srcdir}/src/s/${opsys}.h"; then
|
|
1591 opsysfile="s/${opsys}.h"
|
|
1592 AC_DEFINE_UNQUOTED(config_opsysfile, "$opsysfile")
|
|
1593 else
|
|
1594 echo "XEmacs has no builtin knowledge of \`$opsys' operating systems."
|
|
1595 echo "Using configure-time autodetection only."
|
|
1596 fi
|
|
1597
|
|
1598
|
173
|
1599 if test -z "$dynamic"; then
|
|
1600 case "$opsys" in
|
388
|
1601 hpux* | sunos4* ) dynamic=no ;;
|
173
|
1602 *) dynamic=yes ;;
|
|
1603 esac
|
|
1604 fi
|
|
1605 if test "$dynamic" = "yes"; then
|
149
|
1606 case "$opsys" in
|
74
|
1607 hpux* | sunos4* | sco5 ) opsys="${opsys}-shr" ;;
|
173
|
1608 decosf* ) ld_call_shared="-call_shared" ;;
|
0
|
1609 esac
|
173
|
1610 else dnl "$dynamic" = "no"
|
149
|
1611 case "$opsys" in
|
187
|
1612 sol2 )
|
173
|
1613 echo "Static linking is not supported on Solaris 2."
|
|
1614 echo "Rerun configure without specifying --dynamic=no."
|
|
1615 exit 1 ;;
|
|
1616 linux ) ld_call_shared="-Bstatic" ;;
|
|
1617 decosf* ) ld_call_shared="-non_shared" ;;
|
0
|
1618 esac
|
|
1619 fi
|
|
1620
|
207
|
1621 dnl Use xlc by default on AIX
|
|
1622 case "$opsys" in aix*) NON_GNU_CC=xlc ;; esac
|
|
1623
|
280
|
1624 stack_trace_eye_catcher=`echo ${PROGNAME}_${version}_${canonical} | sed 'y/.-/__/'`
|
177
|
1625 AC_DEFINE_UNQUOTED(STACK_TRACE_EYE_CATCHER, $stack_trace_eye_catcher)
|
173
|
1626
|
149
|
1627 dnl --------------------------------------------------
|
|
1628 dnl Determine the compiler, set up for feature testing
|
|
1629 dnl --------------------------------------------------
|
|
1630
|
151
|
1631 dnl Sun Development environment support
|
|
1632 test "$with_sparcworks" = "yes" && with_workshop=yes # compatibility alias
|
284
|
1633 XE_CHECK_FEATURE_DEPENDENCY(workshop, tooltalk)
|
151
|
1634 if test "$with_workshop" = "yes"; then
|
|
1635 AC_DEFINE(SUNPRO)
|
|
1636 fi
|
|
1637
|
442
|
1638 if test "$with_clash_detection" != "no"; then
|
175
|
1639 AC_DEFINE(CLASH_DETECTION)
|
|
1640 fi
|
|
1641
|
169
|
1642 dnl Choose a compiler from (in order)
|
|
1643 dnl --compiler, env var CC, with_gcc=no && ${NON_GNU_CC:-cc}, AC_PROG_CC
|
|
1644 test -n "$compiler" && CC="$compiler"
|
|
1645 if test "$with_gcc" = "no"; then dnl Try to find a non-gcc compiler
|
|
1646 case "$CC" in "" | *gcc* ) CC="${NON_GNU_CC-cc}" ;; esac
|
|
1647 fi
|
149
|
1648
|
157
|
1649 dnl If we don't set CFLAGS here, AC_PROG_CC will set it.
|
|
1650 dnl But we know better what's good for us, so we do our own
|
|
1651 dnl computation of real CFLAGS later.
|
272
|
1652 dnl --cflags overrides environment variable CFLAGS
|
|
1653 test "${cflags-unset}" != unset && CFLAGS="$cflags"
|
|
1654 if test "${CFLAGS-unset}" != unset
|
|
1655 then cflags_specified=yes;
|
|
1656 else cflags_specified=no;
|
|
1657 fi
|
|
1658
|
1111
|
1659 if test "${cflags_warning-unset}" != unset
|
|
1660 then cflags_warning_specified=yes;
|
|
1661 else cflags_warning_specified=no;
|
|
1662 fi
|
|
1663
|
157
|
1664 xe_save_CFLAGS="$CFLAGS"
|
|
1665
|
169
|
1666 AC_PROG_CC dnl Autoconf has its own magic for compiler autodetection
|
|
1667
|
|
1668 dnl Retry using random guesswork if AC_PROG_CC got it wrong...
|
|
1669 if test "$with_gcc" = "no" -a "$GCC" = "yes"; then
|
149
|
1670 CC=${NON_GNU_CC-cc}
|
|
1671 AC_PROG_CC
|
169
|
1672 elif test "$with_gcc" = "yes" -a "$GCC" != "yes" ; then
|
149
|
1673 CC=gcc
|
|
1674 AC_PROG_CC
|
0
|
1675 fi
|
157
|
1676 CFLAGS="$xe_save_CFLAGS"
|
149
|
1677
|
171
|
1678 dnl Figure out what C preprocessor to use.
|
|
1679
|
|
1680 dnl On Sun systems, people sometimes set up the variable CPP
|
|
1681 dnl with a value that is a directory, not an executable at all.
|
|
1682 dnl Detect that case, and ignore that value.
|
|
1683 test -n "$CPP" -a -d "$CPP" && CPP=
|
|
1684
|
169
|
1685 test -n "$NON_GNU_CPP" -a "$GCC" != "yes" -a -z "$CPP" && CPP="$NON_GNU_CPP"
|
149
|
1686
|
|
1687 AC_PROG_CPP
|
|
1688
|
442
|
1689 dnl --------------------------------------------------------------------
|
|
1690 dnl Compiler feature macros
|
|
1691 dnl --------------------------------------------------------------------
|
|
1692
|
|
1693 AC_AIX dnl Defines _ALL_SOURCE on AIX.
|
|
1694
|
|
1695 dnl We want feature macros defined here *and* in config.h.in, so that
|
|
1696 dnl the compilation environment at configure time and compile time agree.
|
398
|
1697
|
243
|
1698 AC_MSG_CHECKING(for GNU libc)
|
|
1699 AC_TRY_COMPILE([#include <features.h>],[
|
|
1700 #if ! (defined __GLIBC__ || defined __GNU_LIBRARY__)
|
|
1701 #error Not a GNU libc system :-(
|
|
1702 ******* ======= ******** &&&&&&&&
|
|
1703 #endif
|
|
1704 ], have_glibc=yes, have_glibc=no)
|
|
1705 AC_MSG_RESULT($have_glibc)
|
265
|
1706 dnl I'm tired of pop being broken with GLIBC -slb
|
272
|
1707 dnl Well. then why not fix fucking pop?
|
|
1708 test "$have_glibc" = "yes" && AC_DEFINE(_GNU_SOURCE)
|
243
|
1709
|
442
|
1710 dnl We'd like to use vendor extensions, where available.
|
|
1711 dnl We'd like to use functions from the latest Unix98 standards.
|
|
1712 dnl See http://www.opengroup.org/onlinepubs/007908799/xsh/compilation.html
|
|
1713 case "$opsys" in
|
|
1714 sol2)
|
|
1715 AC_DEFINE(__EXTENSIONS__)
|
|
1716 dnl Solaris 2 before 2.5 had some bugs with feature test macro interaction.
|
|
1717 if test "$os_release" -ge 55; then
|
|
1718 AC_DEFINE(_XOPEN_SOURCE,500)
|
|
1719 AC_DEFINE(_XOPEN_SOURCE_EXTENDED)
|
|
1720 fi ;;
|
|
1721 linux)
|
|
1722 AC_DEFINE(_POSIX_C_SOURCE,199506L)
|
|
1723 AC_DEFINE(_XOPEN_SOURCE,500)
|
|
1724 AC_DEFINE(_XOPEN_SOURCE_EXTENDED)
|
|
1725 ;;
|
|
1726 esac
|
373
|
1727
|
|
1728 dnl Identify compilers to enable compiler-specific hacks.
|
|
1729 dnl Add support for other compilers HERE!
|
|
1730 dnl GCC is already identified elsewhere.
|
|
1731 AC_TRY_RUN([int main () {
|
|
1732 #if defined __SUNPRO_C
|
|
1733 return 11;
|
|
1734 #elif defined __DECC
|
|
1735 return 12;
|
442
|
1736 #elif defined __USLC__ && defined __SCO_VERSION__
|
|
1737 return 13;
|
373
|
1738 #else
|
|
1739 return 0;
|
157
|
1740 #endif
|
373
|
1741 }], [],
|
|
1742 [case "$conftest_rc" in
|
|
1743 11) echo "You appear to be using the SunPro C compiler."; __SUNPRO_C=yes ;;
|
|
1744 12) echo "You appear to be using the DEC C compiler." ; __DECC=yes ;;
|
442
|
1745 13) echo "You appear to be using the SCO C compiler." ; __USLC__=yes ;;
|
373
|
1746 esac])
|
|
1747
|
157
|
1748
|
|
1749 dnl case "$canonical" in
|
|
1750 dnl *-sun-sunos* ) test "$CPP" = "acc -E" && CPP="acc -E -Xs" ;;
|
|
1751 dnl esac
|
149
|
1752
|
|
1753 dnl --------------------------------------------------------------------
|
|
1754 dnl Extract some information from the operating system and machine files
|
|
1755 dnl --------------------------------------------------------------------
|
|
1756
|
|
1757 echo "Extracting information from the machine- and system-dependent headers..."
|
|
1758
|
|
1759 dnl It is not important that this name contain the PID; you cannot run
|
|
1760 dnl two configures in the same directory and have anything work
|
|
1761 dnl anyway.
|
|
1762 tempcname="conftest.c"
|
|
1763
|
|
1764 dnl CPP_to_sh(CPP_SYMBOL, SH_VAR, DEFAULT_VALUE)
|
|
1765 define([CPP_to_sh],
|
|
1766 [[#]ifndef [$1]
|
157
|
1767 [#]define [$1]ifelse([$3],,, [ "$3"])
|
149
|
1768 [#]endif
|
|
1769 configure___ [$2]=[$1]
|
284
|
1770 ])dnl CPP_to_sh
|
149
|
1771
|
|
1772 dnl CPP_boolean_to_sh(CPP_SYMBOL, SH_VAR)
|
|
1773 define([CPP_boolean_to_sh],
|
|
1774 [[#]ifdef [$1]
|
|
1775 configure___ [$2]=yes
|
|
1776 [#]else
|
|
1777 configure___ [$2]=no
|
|
1778 [#]endif
|
284
|
1779 ])dnl CPP_boolean_to_sh
|
|
1780
|
442
|
1781 cat > $tempcname < confdefs.h
|
|
1782 cat >> $tempcname <<EOF
|
149
|
1783 #define NOT_C_CODE
|
|
1784 #define C_SWITCH_SITE
|
|
1785 #define C_SWITCH_X_SITE
|
|
1786 #define LD_SWITCH_SITE
|
|
1787 #define LD_SWITCH_X_SITE
|
|
1788 #define LD_SWITCH_X_SITE_AUX
|
284
|
1789 #define OS_RELEASE $os_release
|
442
|
1790
|
|
1791 #ifdef config_opsysfile
|
284
|
1792 #include "$srcdir/src/$opsysfile"
|
442
|
1793 #endif
|
|
1794
|
|
1795 #ifdef config_machfile
|
284
|
1796 #include "$srcdir/src/$machfile"
|
442
|
1797 #endif
|
149
|
1798
|
|
1799 CPP_to_sh(LIBS_MACHINE, libs_machine)
|
|
1800 CPP_to_sh(LIBS_SYSTEM, libs_system)
|
|
1801 CPP_to_sh(LIBS_TERMCAP, libs_termcap)
|
|
1802 CPP_to_sh(LIB_STANDARD, libs_standard)
|
157
|
1803
|
163
|
1804 CPP_to_sh(OBJECTS_MACHINE, objects_machine)
|
|
1805 CPP_to_sh(OBJECTS_SYSTEM, objects_system)
|
|
1806
|
149
|
1807 CPP_to_sh(C_SWITCH_MACHINE, c_switch_machine)
|
157
|
1808 CPP_to_sh(C_SWITCH_SYSTEM, c_switch_system)
|
|
1809
|
|
1810 CPP_to_sh(LD_SWITCH_MACHINE, ld_switch_machine)
|
|
1811 CPP_to_sh(LD_SWITCH_SYSTEM, ld_switch_system)
|
|
1812
|
557
|
1813 CPP_to_sh(UNEXEC, unexec)
|
|
1814
|
|
1815 CPP_to_sh(SYSTEM_TYPE, system_type)
|
149
|
1816
|
163
|
1817 CPP_to_sh(LD_SWITCH_SHARED, ld_switch_shared, -c)
|
|
1818
|
442
|
1819 #define ORDINARY_LD "\$(CC) \$(CFLAGS)"
|
|
1820 configure___ ordinary_ld=ORDINARY_LD
|
|
1821
|
163
|
1822 #ifdef ORDINARY_LINK
|
442
|
1823 #define LD ORDINARY_LD
|
163
|
1824 #else /* no ORDINARY LINK */
|
|
1825 #ifdef COFF_ENCAPSULATE
|
284
|
1826 #define LD "\$(CC) -nostdlib"
|
163
|
1827 #else /* not COFF_ENCAPSULATE */
|
|
1828 #ifdef LINKER
|
|
1829 #define LD LINKER
|
|
1830 #else /* ! defined (LINKER) */
|
|
1831 #define LD "ld"
|
|
1832 #endif /* ! defined (LINKER) */
|
|
1833 #endif /* ! defined (COFF_ENCAPSULATE) */
|
|
1834 #endif /* not ORDINARY_LINK */
|
|
1835 configure___ ld=LD
|
|
1836
|
|
1837 CPP_to_sh(LIB_GCC, lib_gcc)
|
|
1838 CPP_to_sh(LD_TEXT_START_ADDR, ld_text_start_addr)
|
|
1839
|
|
1840 #if ! defined (ORDINARY_LINK) && !defined (START_FILES)
|
|
1841 #ifdef NO_REMAP
|
|
1842 #ifdef COFF_ENCAPSULATE
|
|
1843 #define START_FILES "pre-crt0.o /usr/local/lib/gcc-crt0.o"
|
|
1844 #else /* ! defined (COFF_ENCAPSULATE) */
|
|
1845 #define START_FILES "pre-crt0.o /lib/crt0.o"
|
|
1846 #endif /* ! defined (COFF_ENCAPSULATE) */
|
|
1847 #else /* ! defined (NO_REMAP) */
|
|
1848 #define START_FILES "ecrt0.o"
|
|
1849 #endif /* ! defined (NO_REMAP) */
|
|
1850 #endif /* no ORDINARY_LINK */
|
|
1851 #ifndef START_FILES
|
|
1852 #define START_FILES
|
|
1853 #endif
|
|
1854 configure___ start_files=START_FILES
|
|
1855
|
153
|
1856 CPP_boolean_to_sh(ORDINARY_LINK, ordinary_link)
|
149
|
1857 CPP_boolean_to_sh(SYSTEM_MALLOC, system_malloc)
|
|
1858 CPP_boolean_to_sh(TERMINFO, have_terminfo)
|
438
|
1859 dnl The MAIL_USE_xxx variables come from the s&m headers
|
149
|
1860 CPP_boolean_to_sh(MAIL_USE_FLOCK, mail_use_flock)
|
|
1861 CPP_boolean_to_sh(MAIL_USE_LOCKF, mail_use_lockf)
|
438
|
1862 CPP_boolean_to_sh(MAIL_USE_LOCKING, mail_use_locking)
|
398
|
1863 CPP_boolean_to_sh(HAVE_WIN32_PROCESSES, win32_processes)
|
284
|
1864 EOF
|
|
1865
|
149
|
1866 dnl The value of CPP is a quoted variable reference, so we need to do this
|
|
1867 dnl to get its actual value...
|
380
|
1868 CPP=`eval "echo $CPP $CPPFLAGS"`
|
165
|
1869 define(TAB, [ ])dnl
|
|
1870 changequote(, )dnl
|
149
|
1871 eval `$CPP -Isrc $tempcname \
|
165
|
1872 | sed -n -e "s/[ TAB]*=[ TAB\"]*/='/" -e "s/[ TAB\"]*\$/'/" -e "s/^configure___//p"`
|
|
1873 changequote([, ])dnl
|
153
|
1874
|
149
|
1875 rm $tempcname
|
|
1876
|
557
|
1877 dnl s&m files shouldn't be required to define anything, or even to exist.
|
|
1878 dnl So we default SYSTEM_TYPE to the obvious documented standard, `uname -s`,
|
|
1879 dnl appropriately emacsulated.
|
|
1880 test -z "$system_type" && \
|
|
1881 AC_DEFINE_UNQUOTED(SYSTEM_TYPE,"`uname -s | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`")
|
|
1882
|
|
1883 dnl If the s&m files don't define a system-specific dumper, simply use pdump.
|
|
1884 dnl Sometime in the future, we'll remove all definitions of UNEXEC
|
|
1885 dnl from all the s&m files.
|
|
1886 test -z "$unexec" && pdump=yes
|
|
1887
|
442
|
1888 if test "$pdump" = "yes"; then
|
|
1889 ordinary_link="yes"
|
|
1890 ld="${ordinary_ld}"
|
|
1891 start_files=
|
|
1892 libs_standard=
|
|
1893 unexec=
|
|
1894 lib_gcc=
|
|
1895 fi
|
|
1896
|
163
|
1897 dnl For debugging...
|
|
1898 test "$extra_verbose" = "yes" && \
|
|
1899 PRINT_VAR(libs_machine libs_system libs_termcap libs_standard
|
|
1900 objects_machine objects_system c_switch_machine c_switch_system
|
201
|
1901 ld_switch_machine ld_switch_system unexec ld_switch_shared
|
163
|
1902 ld lib_gcc ld_text_start_addr start_files ordinary_link
|
|
1903 have_terminfo mail_use_flock mail_use_lockf) && echo ""
|
|
1904
|
462
|
1905 dnl Pick up mingw include path
|
|
1906 dnl We only cope with headers in mingw, not mingw32: no previous version of
|
|
1907 dnl XEmacs supported mingw and cygnus have made this incompatible change
|
|
1908 dnl so we just go with the flow.
|
458
|
1909 case "$opsys" in mingw* | cygwin*)
|
452
|
1910 cygwin_include=`eval "gcc -print-file-name=libc.a"` ;
|
|
1911 cygwin_include=`eval "dirname $cygwin_include"` ;
|
|
1912 cygwin_include="-I$cygwin_include/../include" ;
|
462
|
1913 extra_includes="$cygwin_include/mingw $cygwin_include" ;
|
458
|
1914 case "$opsys" in mingw*)
|
452
|
1915 XE_APPEND($extra_includes, c_switch_system) ;;
|
|
1916 esac
|
458
|
1917 ;;
|
438
|
1918 esac
|
|
1919
|
153
|
1920 dnl Non-ordinary link usually requires -lc
|
|
1921 test "$ordinary_link" = "no" -a -z "$libs_standard" && libs_standard="-lc"
|
|
1922
|
442
|
1923 dnl -----------------------
|
373
|
1924 dnl Compiler-specific hacks
|
442
|
1925 dnl -----------------------
|
|
1926
|
|
1927 dnl DEC C `-std1' means ANSI C mode
|
|
1928 test "$__DECC" = "yes" && XE_APPEND(-std1, c_switch_site)
|
|
1929
|
|
1930 dnl Some versions of SCO native compiler need -Kalloca
|
|
1931 if test "$__USLC__" = yes; then
|
|
1932 AC_MSG_CHECKING(for whether the -Kalloca compiler flag is needed)
|
|
1933 need_kalloca=no
|
|
1934 AC_TRY_LINK([], [void *x = alloca(4);], [:], [
|
|
1935 xe_save_c_switch_system="$c_switch_system"
|
|
1936 c_switch_system="$c_switch_system -Kalloca"
|
|
1937 AC_TRY_LINK([], [void *x = alloca(4);], [ need_kalloca=yes ])
|
|
1938 c_switch_system="$xe_save_c_switch_system"])
|
|
1939 AC_MSG_RESULT($need_kalloca)
|
|
1940 test "$need_kalloca" = "yes" && XE_APPEND(-Kalloca,c_switch_system)
|
|
1941 fi
|
373
|
1942
|
464
|
1943 dnl Calculate value of CFLAGS:
|
157
|
1944 dnl Use either command line flag, environment var, or autodetection
|
272
|
1945 if test "$cflags_specified" = "no"; then
|
157
|
1946 dnl Following values of CFLAGS are known to work well.
|
|
1947 dnl Should we take debugging options into consideration?
|
|
1948 if test "$GCC" = "yes"; then
|
1111
|
1949 CFLAGS="-g -O3"
|
|
1950 dnl I'm not convinced this is a good idea any more. -sb
|
|
1951 dnl test "$opsys $machine" = "linux intel386" && \
|
|
1952 dnl CFLAGS="$CFLAGS -fno-strength-reduce -malign-loops=2 -malign-jumps=2 -malign-functions=2"
|
|
1953 elif test "$__SUNPRO_C" = "yes"; then
|
|
1954 case "$opsys" in
|
|
1955 sol2 ) CFLAGS="-xO4" ;;
|
|
1956 sunos4* ) CFLAGS="-xO2" ;;
|
|
1957 esac
|
|
1958 elif test "$__DECC" = "yes"; then
|
|
1959 CFLAGS="-O3"
|
|
1960 elif test "$CC" = "xlc"; then
|
|
1961 CFLAGS="-g -O3 -qstrict -qnoansialias -qlibansi -qro -qmaxmem=20000"
|
|
1962 dnl ### Add optimal CFLAGS support for other compilers HERE!
|
|
1963 else
|
|
1964 CFLAGS="-O" ;dnl The only POSIX-approved flag
|
|
1965 fi
|
|
1966 fi
|
|
1967
|
|
1968 dnl Calculate warning flags. We now separate the flags for warnings from
|
|
1969 dnl the other flags because we really really want the warnings to be seen
|
|
1970 dnl by everyone.
|
|
1971
|
|
1972 if test "$cflags_warning_specified" = "no"; then
|
|
1973 dnl Following warning flags are known to work well.
|
|
1974 if test "$GCC" = "yes"; then
|
|
1975 cflags_warning="-Wall -Wno-switch -Winline -Wmissing-prototypes"
|
464
|
1976 dnl Yuck, bad compares have been worth at least 3 crashes!
|
1111
|
1977 cflags_warning="$cflags_warning -Wsign-compare"
|
|
1978 dnl NOTE: The following three, as well as -Wmissing-declarations and
|
|
1979 dnl -Weffc++ below, have been recently added. If you are getting
|
|
1980 dnl grief from them, please notify ben@xemacs.org!
|
|
1981 cflags_warning="$cflags_warning -Wundef -Wstrict-prototypes -Wpacked"
|
771
|
1982 dnl With g++, -Wshadow produces five zillion utterly random warnings --
|
|
1983 dnl a local var named `buffer' conflicts with `struct buffer' for
|
|
1984 dnl example. Even with gcc, -Wshadow is questionable because of its
|
|
1985 dnl complaints about parameters with the same names as global functions.
|
664
|
1986 if test "$xemacs_compiler" != "g++"; then
|
1111
|
1987 dnl no -Wmissing-declarations under g++.
|
|
1988 cflags_warning="$cflags_warning -Wshadow -Wmissing-declarations"
|
|
1989 else
|
|
1990 cflags_warning="$cflags_warning -Weffc++"
|
664
|
1991 fi
|
458
|
1992 dnl glibc is intentionally not `-Wpointer-arith'-clean.
|
|
1993 dnl Ulrich Drepper has rejected patches to fix the glibc header files.
|
1111
|
1994 test "$have_glibc" != "yes" && \
|
|
1995 cflags_warning="$cflags_warning -Wpointer-arith"
|
373
|
1996 elif test "$__SUNPRO_C" = "yes"; then
|
157
|
1997 case "$opsys" in
|
1111
|
1998 sol2 ) cflags_warning="-v" ;;
|
157
|
1999 esac
|
207
|
2000 elif test "$CC" = "xlc"; then
|
1111
|
2001 cflags_warning="-qinfo"
|
|
2002 dnl ### Add optimal cflags_warning support for other compilers HERE!
|
157
|
2003 fi
|
|
2004 fi
|
151
|
2005
|
1111
|
2006 dnl Now combine all C flags. Put the warning flags first so that
|
|
2007 dnl user-specified flags will override.
|
|
2008 CFLAGS="$cflags_warning $CFLAGS"
|
|
2009
|
442
|
2010 dnl Search for GCC specific build problems we know about
|
|
2011 if test "$GCC" = "yes"; then
|
|
2012 AC_MSG_CHECKING(for buggy gcc versions)
|
|
2013 GCC_VERSION=`$CC --version`
|
|
2014 case `uname -s`:`uname -m`:$GCC_VERSION in
|
|
2015 dnl egcs 2.90.21 (egcs-1.00 release)
|
|
2016 dnl egcs 2.90.29 (egcs-1.0.3 release)
|
|
2017 *:sun4*:2.8.1|*:sun4*:egcs-2.90.*)
|
|
2018 dnl Don't use -O2 with gcc 2.8.1 and egcs 1.0 under SPARC architectures
|
|
2019 dnl without also using `-fno-schedule-insns'.
|
|
2020 case "$CFLAGS" in
|
|
2021 *-O2*|*-O3*)
|
|
2022 case "$CFLAGS" in
|
|
2023 *-fno-schedule-insns*) ;;
|
|
2024 *)
|
|
2025 AC_MSG_RESULT(yes)
|
559
|
2026 AC_MSG_WARN([Don't use -O2 with gcc 2.8.1 and egcs 1.0 under SPARC architectures])
|
|
2027 AC_MSG_WARN([without also using -fno-schedule-insns.])
|
|
2028 AC_MSG_ERROR([Aborting due to known problem])
|
442
|
2029 ;;
|
|
2030 esac
|
|
2031 ;;
|
|
2032 esac
|
|
2033 ;;
|
|
2034 dnl egcs-2.91.57 (egcs-1.1 release)
|
|
2035 dnl egcs-2.91.66 (egcs-1.1.2 release)
|
|
2036 Linux:alpha:egcs-2.91.*)
|
|
2037 AC_MSG_RESULT(yes)
|
559
|
2038 AC_MSG_WARN([There have been reports of egcs-1.1 not compiling XEmacs correctly on])
|
|
2039 AC_MSG_WARN([Alpha Linux. There have also been reports that egcs-1.0.3a is O.K.])
|
|
2040 AC_MSG_ERROR([Aborting due to known problem])
|
442
|
2041 ;;
|
|
2042 *:i*86*:2.7.2*)
|
448
|
2043 case "$CFLAGS" in
|
|
2044 *-O2*|*-O3*)
|
|
2045 case "$GCC_VERSION" in
|
|
2046 2.7.2)
|
442
|
2047 case "$CFLAGS" in
|
|
2048 *-fno-strength-reduce*) ;;
|
|
2049 *)
|
|
2050 AC_MSG_RESULT(yes)
|
559
|
2051 AC_MSG_WARN([Don't use -O2 with gcc 2.7.2 under Intel/XXX without also using])
|
|
2052 AC_MSG_WARN([-fno-strength-reduce.])
|
|
2053 AC_MSG_ERROR([Aborting due to known problem])
|
442
|
2054 ;;
|
|
2055 esac
|
|
2056 ;;
|
|
2057 esac
|
448
|
2058 case "$CFLAGS" in
|
|
2059 *-fno-caller-saves*) ;;
|
|
2060 *)
|
|
2061 AC_MSG_RESULT(yes)
|
559
|
2062 AC_MSG_WARN([Don't use -O2 with gcc 2.7.2 under Intel/XXX without also using])
|
|
2063 AC_MSG_WARN([-fno-caller-saves.])
|
|
2064 AC_MSG_ERROR([Aborting due to known problem])
|
448
|
2065 ;;
|
|
2066 esac
|
442
|
2067 ;;
|
|
2068 esac
|
|
2069 ;;
|
|
2070 esac
|
|
2071 AC_MSG_RESULT(no)
|
|
2072 fi
|
|
2073
|
846
|
2074 dnl GNU ld now defaults to combreloc, which screws up unexec, but not pdump.
|
|
2075 dnl Note that it's OK if the GNU style long option causes non-GNU ld to barf
|
|
2076 dnl a usage message, that's often good enough. Please report it, though.
|
|
2077 dnl #### Should make this Solaris-friendly.
|
|
2078 dnl Link with -z nocombreloc for now.
|
|
2079 if test "$pdump" != "yes"; then
|
|
2080 AC_MSG_CHECKING(for \"-z nocombreloc\" linker flag)
|
|
2081 case "`ld --help 2>&1`" in
|
|
2082 *-z\ nocombreloc* ) AC_MSG_RESULT(yes)
|
|
2083 XE_PREPEND(-z nocombreloc, ld_switch_site) ;;
|
|
2084 *) AC_MSG_RESULT(no) ;;
|
|
2085 esac
|
|
2086 fi
|
|
2087
|
|
2088
|
272
|
2089 dnl Inform compiler that certain flags are meant for the linker
|
|
2090 dnl XE_PROTECT_LINKER_FLAGS(shell_var)
|
|
2091 define([XE_PROTECT_LINKER_FLAGS], [
|
163
|
2092 if test "$GCC" = "yes"; then
|
272
|
2093 set x $[$1]; shift; [$1]=""
|
|
2094 while test -n "[$]1"; do
|
|
2095 case [$]1 in
|
380
|
2096 -L | -l | -u ) [$1]="$[$1] [$]1 [$]2"; shift ;;
|
|
2097 -L* | -l* | -u* | -Wl* | -pg ) [$1]="$[$1] [$]1" ;;
|
163
|
2098 -Xlinker* ) ;;
|
272
|
2099 * ) [$1]="$[$1] -Xlinker [$]1" ;;
|
163
|
2100 esac
|
272
|
2101 shift
|
|
2102 done
|
|
2103 fi])dnl
|
|
2104 XE_PROTECT_LINKER_FLAGS(ld_switch_system)
|
|
2105 XE_PROTECT_LINKER_FLAGS(ld_switch_machine)
|
846
|
2106 XE_PROTECT_LINKER_FLAGS(ld_switch_site)
|
272
|
2107 XE_PROTECT_LINKER_FLAGS(LDFLAGS)
|
|
2108 XE_PROTECT_LINKER_FLAGS(ld_call_shared)
|
163
|
2109
|
|
2110 dnl Add s&m-determined objects (including unexec) to link line
|
|
2111 test -n "$objects_machine" && XE_ADD_OBJS($objects_machine)
|
|
2112 test -n "$objects_system" && XE_ADD_OBJS($objects_system)
|
442
|
2113 test -n "$unexec" && test ! "$pdump" = "yes" && XE_ADD_OBJS($unexec)
|
|
2114 test "$pdump" = "yes" && XE_ADD_OBJS(dumper.o)
|
163
|
2115
|
|
2116 dnl Dynodump (Solaris 2.x, x<6)
|
|
2117 AC_MSG_CHECKING(for dynodump)
|
|
2118 if test "$unexec" != "unexsol2.o"; then
|
|
2119 AC_MSG_RESULT(no)
|
|
2120 else
|
|
2121 AC_MSG_RESULT(yes)
|
|
2122 AC_DEFINE(DYNODUMP)
|
|
2123 XE_APPEND(dynodump, MAKE_SUBDIR)
|
175
|
2124 XE_APPEND(dynodump, SRC_SUBDIR_DEPS)
|
163
|
2125 case "$machine" in
|
|
2126 sparc ) dynodump_arch=sparc ;;
|
|
2127 *86* ) dynodump_arch=i386 ;;
|
|
2128 powerpc ) dynodump_arch=ppc ;;
|
|
2129 esac
|
|
2130 dnl Dynodump requires the system linker
|
|
2131 test "$GCC" = "yes" && XE_APPEND(-fno-gnu-linker, ld_switch_site)
|
|
2132 fi
|
|
2133
|
|
2134 dnl Feed s&m crud to src/Makefile
|
207
|
2135
|
272
|
2136 dnl Linux/powerpc needs the following magic for some reason
|
274
|
2137 test "$machine$opsys" = "powerpclinux" && start_flags="-T $srcdir/src/ppc.ldscript"
|
272
|
2138
|
207
|
2139 if test "$unexec" = "unexaix.o"; then
|
|
2140 dnl AIX needs various hacks to make static linking work.
|
219
|
2141 if test "$dynamic" = "no"; then
|
207
|
2142 start_flags="-Wl,-bnso,-bnodelcsect"
|
209
|
2143 test "$GCC" = "yes" && start_flags="-B/bin/ ${start_flags}"
|
272
|
2144 for f in "/lib/syscalls.exp" "/lib/threads.exp"; do
|
207
|
2145 if test -r "$f"; then start_flags="${start_flags},-bI:${f}"; fi
|
|
2146 done
|
|
2147 for f in "/usr/lpp/X11/bin/smt.exp" "/usr/bin/X11/smt.exp"; do
|
|
2148 if test -r "$f"; then start_flags="${start_flags},-bI:${f}"; break; fi
|
|
2149 done
|
294
|
2150 AC_CHECK_LIB(C, terminateAndUnload, XE_APPEND(-lC, libs_system))
|
219
|
2151 fi
|
207
|
2152 elif test -n "$ld_text_start_addr"; then
|
|
2153 start_flags="-T $ld_text_start_addr -e __start"
|
|
2154 fi
|
|
2155 AC_SUBST(start_flags)
|
|
2156
|
163
|
2157 AC_SUBST(ld_switch_shared)
|
|
2158 AC_SUBST(start_files)
|
|
2159 if test "$ordinary_link" = "no" -a "$GCC" = "yes"; then
|
|
2160 test -z "$linker" && linker='$(CC) -nostdlib'
|
175
|
2161 test -z "$lib_gcc" && lib_gcc='`$(CC) -print-libgcc-file-name`'
|
163
|
2162 fi
|
|
2163 test "$GCC" != "yes" && lib_gcc=
|
|
2164 AC_SUBST(ld)
|
|
2165 AC_SUBST(lib_gcc)
|
151
|
2166
|
|
2167 dnl ---------------------------------------------------------------
|
|
2168 dnl Add site and system specific flags to compile and link commands
|
|
2169 dnl ---------------------------------------------------------------
|
|
2170
|
380
|
2171 dnl Allow use of either ":" or spaces for lists of directories
|
|
2172 define(COLON_TO_SPACE,
|
|
2173 [case "$[$1]" in *:* [)] [$1]="`echo '' $[$1] | sed -e 's/^ //' -e 's/:/ /g'`";; esac])dnl
|
209
|
2174
|
151
|
2175 dnl --site-libraries (multiple dirs)
|
380
|
2176 COLON_TO_SPACE(site_libraries)
|
151
|
2177 if test -n "$site_libraries"; then
|
|
2178 for arg in $site_libraries; do
|
380
|
2179 case "$arg" in
|
|
2180 -* ) ;;
|
|
2181 * ) test -d "$arg" || \
|
|
2182 XE_DIE("Invalid site library \`$arg': no such directory")
|
|
2183 arg="-L${arg}" ;;
|
|
2184 esac
|
151
|
2185 XE_APPEND($arg, ld_switch_site)
|
|
2186 done
|
|
2187 fi
|
|
2188
|
|
2189 dnl --site-includes (multiple dirs)
|
380
|
2190 COLON_TO_SPACE(site_includes)
|
272
|
2191 if test -n "$site_includes"; then
|
151
|
2192 for arg in $site_includes; do
|
380
|
2193 case "$arg" in
|
|
2194 -* ) ;;
|
|
2195 * ) test -d "$arg" || \
|
|
2196 XE_DIE("Invalid site include \`$arg': no such directory")
|
|
2197 arg="-I${arg}" ;;
|
|
2198 esac
|
151
|
2199 XE_APPEND($arg, c_switch_site)
|
|
2200 done
|
|
2201 fi
|
|
2202
|
380
|
2203 dnl --site-prefixes (multiple dirs)
|
|
2204 dnl --site-prefixes=dir1:dir2 is a convenient shorthand for
|
|
2205 dnl --site-libraries=dir1/lib:dir2/lib --site-includes=dir1/include:dir2/include
|
|
2206 dnl Site prefixes take precedence over the standard places, but not over
|
|
2207 dnl site-includes and site-libraries.
|
|
2208 COLON_TO_SPACE(site_prefixes)
|
|
2209 if test -n "$site_prefixes"; then
|
|
2210 for dir in $site_prefixes; do
|
398
|
2211 lib_dir="${dir}/lib"
|
416
|
2212 inc_dir="${dir}/include"
|
380
|
2213 if test ! -d "$dir"; then
|
|
2214 XE_DIE("Invalid site prefix \`$dir': no such directory")
|
|
2215 elif test ! -d "$lib_dir"; then
|
|
2216 XE_DIE("Invalid site prefix \`$dir': no such directory \`$lib_dir'")
|
|
2217 else
|
414
|
2218 if test -d "$inc_dir"; then
|
|
2219 XE_APPEND("-I$inc_dir", c_switch_site)
|
|
2220 fi
|
380
|
2221 XE_APPEND("-L$lib_dir", ld_switch_site)
|
|
2222 fi
|
|
2223 done
|
|
2224 fi
|
|
2225
|
157
|
2226 dnl GNU software installs by default into /usr/local/{include,lib}
|
163
|
2227 dnl if test -d "/usr/local/include" -a -d "/usr/local/lib"; then
|
|
2228 dnl XE_APPEND("-L/usr/local/lib", ld_switch_site)
|
|
2229 dnl XE_APPEND("-I/usr/local/include", c_switch_site)
|
|
2230 dnl fi
|
157
|
2231
|
151
|
2232 dnl Extra system-specific library directories - please add to list
|
|
2233 for dir in "/usr/ccs/lib"; do
|
440
|
2234 test -d "$dir" && XE_APPEND(-L${dir}, ld_switch_system)
|
151
|
2235 done
|
|
2236
|
|
2237 dnl --site-runtime-libraries (multiple dirs)
|
380
|
2238 COLON_TO_SPACE(site_runtime_libraries)
|
272
|
2239 if test -n "$site_runtime_libraries"; then
|
165
|
2240 LD_RUN_PATH="`echo $site_runtime_libraries | sed -e 's/ */:/g'`"
|
151
|
2241 export LD_RUN_PATH
|
|
2242 fi
|
|
2243
|
440
|
2244 dnl Linux systems have dynamic runtime library directories listed in
|
|
2245 dnl /etc/ld.so.conf. Since those are used at run time, it seems pretty
|
|
2246 dnl safe to use them at link time, and less controversial than forcing
|
|
2247 dnl the run-time to use the link-time libraries. This also helps avoid
|
|
2248 dnl mismatches between the link-time and run-time libraries.
|
|
2249
|
442
|
2250 dnl #### Unfortunately, there are horrible libc4 and libc5 libraries
|
|
2251 dnl listed in /etc/ld.so.conf on some systems, and including them on
|
|
2252 dnl the link path leads to linking in utterly broken libc's.
|
|
2253 dnl There are many clever ways of approaching this problem,
|
708
|
2254 dnl but finding one that actually works...
|
440
|
2255
|
|
2256 dnl if test -z "$LD_RUN_PATH" -a -r "/etc/ld.so.conf"; then
|
|
2257 dnl for dir in `cat /etc/ld.so.conf`; do
|
|
2258 dnl test -d "$dir" && XE_APPEND(-L${dir}, ld_switch_system)
|
|
2259 dnl done
|
|
2260 dnl add_runtime_path=no
|
|
2261 dnl fi
|
|
2262
|
151
|
2263 dnl -------------------------------------
|
|
2264 dnl Compute runtime library path
|
|
2265 dnl -------------------------------------
|
|
2266
|
440
|
2267 if test -n "$add_runtime_path"; then :;
|
|
2268 elif test "$dynamic" = "no"; then add_runtime_path=no
|
151
|
2269 elif test -n "$LD_RUN_PATH"; then add_runtime_path=yes
|
163
|
2270 else case "$opsys" in
|
373
|
2271 sol2 | irix* | *bsd* | decosf* ) add_runtime_path=yes ;;
|
151
|
2272 * ) add_runtime_path=no ;;
|
|
2273 esac
|
0
|
2274 fi
|
|
2275
|
151
|
2276 if test "$add_runtime_path" = "yes"; then
|
|
2277 dnl Try to autodetect runtime library flag (usually -R),
|
|
2278 dnl and whether it works (or at least does no harm)
|
|
2279 AC_MSG_CHECKING("for runtime libraries flag")
|
373
|
2280 case "$opsys" in
|
377
|
2281 sol2 ) dash_r="-R" ;;
|
392
|
2282 decosf* | linux* | irix*) dash_r="-rpath " ;;
|
373
|
2283 *)
|
|
2284 dash_r=""
|
|
2285 for try_dash_r in "-R" "-R " "-rpath "; do
|
|
2286 xe_check_libs="${try_dash_r}/no/such/file-or-directory"
|
|
2287 XE_PROTECT_LINKER_FLAGS(xe_check_libs)
|
|
2288 AC_TRY_LINK(, , dash_r="$try_dash_r")
|
|
2289 xe_check_libs=""
|
|
2290 test -n "$dash_r" && break
|
|
2291 done ;;
|
|
2292 esac
|
151
|
2293 if test -n "$dash_r";
|
|
2294 then AC_MSG_RESULT("\"${dash_r}\"")
|
|
2295 else AC_MSG_RESULT(NONE)
|
|
2296 fi
|
|
2297 fi
|
|
2298
|
163
|
2299 xe_add_unique_runpath_dir='
|
|
2300 xe_add_p=yes
|
|
2301 for xe_dir in $runpath_dirs; do dnl Uniquify
|
|
2302 test "$xe_dir" = "$xe_runpath_dir" && xe_add_p=no
|
|
2303 done
|
|
2304 if test "$xe_add_p" = "yes"; then
|
|
2305 test -n "$runpath" && runpath="${runpath}:"
|
|
2306 runpath="${runpath}${xe_runpath_dir}"
|
|
2307 runpath_dirs="$runpath_dirs $xe_runpath_dir"
|
|
2308 fi'
|
|
2309
|
|
2310
|
155
|
2311 dnl XE_ADD_RUNPATH_DIR(directory)
|
163
|
2312 define([XE_ADD_RUNPATH_DIR],[{
|
155
|
2313 xe_runpath_dir=$1
|
163
|
2314 dnl PRINT_VAR(ld_switch_site ld_switch_x_site runpath xe_runpath_dir LD_RUN_PATH xe_ldflags)
|
|
2315 test "$xe_runpath_dir" != "/lib" -a \
|
155
|
2316 "$xe_runpath_dir" != "/usr/lib" -a \
|
371
|
2317 -n "`ls ${xe_runpath_dir}/*.s[[ol]] 2>/dev/null`" && \
|
163
|
2318 eval "$xe_add_unique_runpath_dir"
|
|
2319 }])dnl
|
155
|
2320
|
|
2321 dnl XE_COMPUTE_RUNPATH()
|
151
|
2322 define([XE_COMPUTE_RUNPATH],[
|
|
2323 if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then
|
|
2324 dnl Remove runtime paths from current ld switches
|
165
|
2325 ld_switch_site=`echo '' $ld_switch_site | sed -e 's:^ ::' -e "s/$dash_r[[^ ]]*//g"`
|
|
2326 ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[[^ ]]*//g"`
|
163
|
2327 dnl PRINT_VAR(ld_switch_site ld_switch_x_site)
|
151
|
2328
|
|
2329 dnl Fix up Runtime path
|
|
2330 dnl If LD_RUN_PATH is set in environment, use that.
|
|
2331 dnl In this case, assume user has set the right value.
|
163
|
2332 runpath="" runpath_dirs=""
|
151
|
2333 if test -n "$LD_RUN_PATH"; then
|
|
2334 runpath="$LD_RUN_PATH"
|
155
|
2335 elif test "$GCC" = "yes"; then
|
|
2336 dnl Compute runpath from gcc's -v output
|
163
|
2337 ld_switch_run_save="$ld_switch_run"; ld_switch_run=""
|
155
|
2338 echo "int main(int argc, char *argv[[]]) {return 0;}" > conftest.c
|
|
2339 xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null'
|
|
2340 for arg in `eval "$xe_runpath_link" | grep ' -L'`; do
|
|
2341 case "$arg" in P,* | -L* | -R* )
|
159
|
2342 for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do
|
155
|
2343 XE_ADD_RUNPATH_DIR("$dir")
|
|
2344 done ;;
|
|
2345 esac
|
|
2346 done
|
163
|
2347 ld_switch_run="$ld_switch_run_save"
|
155
|
2348 rm -f conftest*
|
151
|
2349 else
|
|
2350 dnl Add all directories with .so files to runpath
|
|
2351 for arg in $ld_switch_site $ld_switch_x_site; do
|
159
|
2352 case "$arg" in -L*) XE_ADD_RUNPATH_DIR(`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`);; esac
|
151
|
2353 done
|
|
2354 dnl Sometimes /opt/SUNWdt/lib is the only installed Motif available
|
163
|
2355 if test "$opsys $need_motif" = "sol2 yes"; then
|
|
2356 xe_runpath_dir="/opt/SUNWdt/lib";
|
|
2357 eval "$xe_add_unique_runpath_dir";
|
|
2358 fi
|
155
|
2359 fi dnl Compute $runpath
|
151
|
2360
|
|
2361 if test -n "$runpath"; then
|
|
2362 ld_switch_run="${dash_r}${runpath}"
|
272
|
2363 XE_PROTECT_LINKER_FLAGS(ld_switch_run)
|
151
|
2364 test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath"
|
|
2365 fi
|
|
2366 fi
|
|
2367 ])dnl
|
|
2368 XE_COMPUTE_RUNPATH()
|
|
2369
|
|
2370 dnl -----------------------------------
|
|
2371 dnl Do some misc autoconf-special tests
|
|
2372 dnl -----------------------------------
|
149
|
2373
|
|
2374 dnl Do the opsystem or machine files prohibit the use of the GNU malloc?
|
|
2375 dnl Assume not, until told otherwise.
|
|
2376 GNU_MALLOC=yes
|
261
|
2377 if test "$with_dlmalloc" != "no"; then
|
|
2378 doug_lea_malloc=yes
|
|
2379 else
|
|
2380 doug_lea_malloc=no
|
|
2381 fi
|
259
|
2382 after_morecore_hook_exists=yes
|
255
|
2383 AC_CHECK_FUNC(malloc_set_state, ,doug_lea_malloc=no)
|
|
2384 AC_MSG_CHECKING(whether __after_morecore_hook exists)
|
|
2385 AC_TRY_LINK([extern void (* __after_morecore_hook)();],[__after_morecore_hook = 0],
|
|
2386 [AC_MSG_RESULT(yes)],
|
|
2387 [AC_MSG_RESULT(no)
|
259
|
2388 after_morecore_hook_exists=no])
|
149
|
2389 if test "$system_malloc" = "yes" ; then
|
|
2390 GNU_MALLOC=no
|
|
2391 GNU_MALLOC_reason="
|
442
|
2392 - The GNU allocators don't work with this system configuration."
|
181
|
2393 elif test "$with_system_malloc" = "yes" ; then
|
149
|
2394 GNU_MALLOC=no
|
|
2395 GNU_MALLOC_reason="
|
442
|
2396 - User chose not to use GNU allocators."
|
181
|
2397 elif test "$with_debug_malloc" = "yes" ; then
|
177
|
2398 GNU_MALLOC=no
|
|
2399 GNU_MALLOC_reason="
|
442
|
2400 - User chose to use Debugging Malloc."
|
149
|
2401 fi
|
|
2402
|
442
|
2403 if test "$doug_lea_malloc" = "yes" -a "$GNU_MALLOC" = "yes" ; then
|
|
2404 GNU_MALLOC_reason="
|
|
2405 - Using Doug Lea's new malloc from the GNU C Library."
|
255
|
2406 AC_DEFINE(DOUG_LEA_MALLOC)
|
259
|
2407 if test "$after_morecore_hook_exists" = "no" ; then
|
|
2408 GNU_MALLOC_reason="
|
442
|
2409 - Using Doug Lea's new malloc from the Linux C Library."
|
259
|
2410 AC_DEFINE(_NO_MALLOC_WARNING_)
|
|
2411 fi
|
255
|
2412 fi
|
|
2413
|
267
|
2414 dnl #### mcheck is broken in all versions of Linux libc and glibc.
|
|
2415 dnl Try this again when 2.1 hits the streets.
|
|
2416 dnl Avoid using free-hook.c if support exists for malloc debugging in libc
|
|
2417 dnl have_libmcheck=no
|
|
2418 dnl if test "$error_check_malloc" = "yes" -a \
|
|
2419 dnl "$have_glibc" = "yes" -a \
|
|
2420 dnl "$doug_lea_malloc" = "yes"; then
|
|
2421 dnl AC_CHECK_HEADERS(mcheck.h)
|
|
2422 dnl AC_CHECK_LIB(mcheck, mcheck, have_libmcheck=yes, have_libmcheck=no)
|
|
2423 dnl fi
|
|
2424
|
|
2425 dnl if test "$have_libmcheck" = "yes"; then
|
|
2426 dnl AC_DEFINE(HAVE_LIBMCHECK)
|
|
2427 dnl libmcheck=-lmcheck
|
|
2428 dnl AC_SUBST(libmcheck)
|
|
2429 dnl fi
|
|
2430
|
149
|
2431 dnl Some other nice autoconf tests. If you add a test here which
|
|
2432 dnl should make an entry in src/config.h, do not forget to add an
|
|
2433 dnl #undef clause to src/config.h.in for autoconf to modify.
|
120
|
2434
|
0
|
2435 AC_PROG_RANLIB
|
|
2436 AC_PROG_INSTALL
|
|
2437 AC_PROG_YACC
|
|
2438
|
|
2439 dnl checks for header files
|
442
|
2440 AC_CHECK_HEADERS(dnl
|
|
2441 a.out.h dnl
|
446
|
2442 elf.h dnl
|
442
|
2443 cygwin/version.h dnl
|
|
2444 fcntl.h dnl
|
|
2445 inttypes.h dnl
|
|
2446 libgen.h dnl
|
|
2447 locale.h dnl
|
911
|
2448 wchar.h dnl
|
442
|
2449 mach/mach.h dnl
|
|
2450 sys/param.h dnl
|
|
2451 sys/pstat.h dnl
|
|
2452 sys/time.h dnl
|
|
2453 sys/timeb.h dnl
|
777
|
2454 sys/times.h dnl
|
442
|
2455 sys/un.h dnl
|
|
2456 ulimit.h dnl
|
|
2457 unistd.h dnl
|
|
2458 )
|
155
|
2459 AC_HEADER_SYS_WAIT
|
149
|
2460 AC_HEADER_STDC
|
|
2461 AC_HEADER_TIME
|
|
2462 AC_DECL_SYS_SIGLIST
|
|
2463
|
460
|
2464
|
|
2465 dnl ----------------------------------------------------------------
|
|
2466 dnl Checking for utime() or utimes().
|
|
2467 dnl We prefer utime, since it is more standard.
|
|
2468 dnl Some systems have utime.h but do not declare the struct anyplace,
|
|
2469 dnl so we use a more sophisticated test for utime than AC_CHECK_FUNCS.
|
|
2470 dnl ----------------------------------------------------------------
|
|
2471 AC_MSG_CHECKING(for utime)
|
|
2472 AC_TRY_COMPILE([#include <sys/types.h>
|
|
2473 #include <utime.h>],
|
|
2474 [struct utimbuf x; x.actime = x.modtime = 0; utime ("/", &x);],
|
149
|
2475 [AC_MSG_RESULT(yes)
|
460
|
2476 AC_DEFINE(HAVE_UTIME)],
|
|
2477 [AC_MSG_RESULT(no)
|
|
2478 dnl We don't have utime(); how about utimes()?
|
|
2479 AC_CHECK_FUNCS(utimes)])
|
|
2480
|
0
|
2481
|
|
2482 dnl checks for typedefs
|
149
|
2483 AC_TYPE_SIGNAL
|
163
|
2484 AC_TYPE_SIZE_T
|
|
2485 AC_TYPE_PID_T
|
|
2486 AC_TYPE_UID_T
|
|
2487 AC_TYPE_MODE_T
|
|
2488 AC_TYPE_OFF_T
|
426
|
2489 AC_CHECK_TYPE(ssize_t, int)
|
410
|
2490
|
442
|
2491 dnl check for Unix98 socklen_t
|
|
2492 AC_MSG_CHECKING(for socklen_t)
|
|
2493 AC_TRY_COMPILE([#include <sys/socket.h>
|
|
2494 socklen_t x;
|
|
2495 ],[],[AC_MSG_RESULT(yes)],[
|
|
2496 AC_TRY_COMPILE([#include <sys/socket.h>
|
|
2497 int accept (int, struct sockaddr *, size_t *);
|
|
2498 ],[],[
|
|
2499 AC_MSG_RESULT(size_t)
|
|
2500 AC_DEFINE(socklen_t,size_t)], [
|
|
2501 AC_MSG_RESULT(int)
|
|
2502 AC_DEFINE(socklen_t,int)])])
|
|
2503
|
149
|
2504 AC_MSG_CHECKING(for struct timeval)
|
|
2505 AC_TRY_COMPILE([#ifdef TIME_WITH_SYS_TIME
|
0
|
2506 #include <sys/time.h>
|
|
2507 #include <time.h>
|
|
2508 #else
|
|
2509 #ifdef HAVE_SYS_TIME_H
|
|
2510 #include <sys/time.h>
|
|
2511 #else
|
|
2512 #include <time.h>
|
|
2513 #endif
|
149
|
2514 #endif], [static struct timeval x; x.tv_sec = x.tv_usec;],
|
|
2515 [AC_MSG_RESULT(yes)
|
0
|
2516 HAVE_TIMEVAL=yes
|
|
2517 AC_DEFINE(HAVE_TIMEVAL)],
|
149
|
2518 [AC_MSG_RESULT(no)
|
|
2519 HAVE_TIMEVAL=no])
|
0
|
2520
|
|
2521 dnl checks for structure members
|
|
2522 AC_STRUCT_TM
|
149
|
2523 AC_STRUCT_TIMEZONE
|
0
|
2524
|
|
2525 dnl checks for compiler characteristics
|
149
|
2526 AC_C_CONST
|
0
|
2527
|
|
2528 dnl check for Make feature
|
149
|
2529 AC_PROG_MAKE_SET
|
0
|
2530
|
|
2531 dnl check byte order
|
149
|
2532 AC_C_BIGENDIAN
|
0
|
2533
|
151
|
2534 dnl define SIZEOF_TYPE
|
|
2535 AC_CHECK_SIZEOF(short)
|
163
|
2536 if test "$ac_cv_sizeof_short" = 0; then
|
159
|
2537 echo ""
|
|
2538 echo "*** PANIC *** Configure tests are not working - compiler is broken."
|
|
2539 echo "*** PANIC *** Please examine config.log for compilation errors."
|
|
2540 exit 1
|
|
2541 fi
|
163
|
2542 AC_CHECK_SIZEOF(int)
|
|
2543 AC_CHECK_SIZEOF(long)
|
|
2544 AC_CHECK_SIZEOF(long long)
|
|
2545 AC_CHECK_SIZEOF(void *)
|
151
|
2546
|
0
|
2547 dnl check for long file names
|
149
|
2548 AC_SYS_LONG_FILE_NAMES
|
0
|
2549
|
159
|
2550 dnl -lm is required by LISP_FLOAT_TYPE, among other things
|
398
|
2551 AC_CHECK_FUNC(sin, ,AC_CHECK_LIB(m, sin))
|
149
|
2552
|
151
|
2553 dnl Floating operation support is now unconditional
|
|
2554 AC_DEFINE(LISP_FLOAT_TYPE)
|
|
2555
|
243
|
2556 AC_TRY_LINK([#include <math.h>],
|
|
2557 [return atanh(1.0) + asinh(1.0) + acosh(1.0); ],
|
|
2558 AC_DEFINE(HAVE_INVERSE_HYPERBOLIC))
|
|
2559
|
567
|
2560 dnl See if mkstemp is available
|
|
2561 AC_CHECK_FUNCS(mkstemp)
|
|
2562
|
149
|
2563 dnl Determine type of mail locking from configure args and s&m headers
|
|
2564 AC_CHECKING(type of mail spool file locking)
|
438
|
2565 AC_CHECK_FUNCS(lockf flock)
|
|
2566 dnl The mail_use_xxx variables are set according to the s&m headers.
|
149
|
2567 test -z "$mail_locking" -a "$mail_use_flock" = "yes" && mail_locking=flock
|
|
2568 test -z "$mail_locking" -a "$mail_use_lockf" = "yes" && mail_locking=lockf
|
438
|
2569 test -z "$mail_locking" -a "$mail_use_locking" = "yes" && mail_locking=locking
|
442
|
2570 if test -z "$mail_locking"; then
|
|
2571 case "$opsys" in cygwin* | mingw*)
|
|
2572 mail_locking=pop ;;
|
|
2573 esac
|
|
2574 fi
|
|
2575
|
438
|
2576 if test "$mail_locking" = "lockf"; then AC_DEFINE(MAIL_LOCK_LOCKF)
|
|
2577 elif test "$mail_locking" = "flock"; then AC_DEFINE(MAIL_LOCK_FLOCK)
|
|
2578 elif test "$mail_locking" = "locking"; then AC_DEFINE(MAIL_LOCK_LOCKING)
|
442
|
2579 elif test "$mail_locking" = "pop"; then
|
|
2580 with_pop=yes
|
|
2581 mail_locking=
|
438
|
2582 else mail_locking="dot-locking"; AC_DEFINE(MAIL_LOCK_DOT)
|
410
|
2583 fi
|
438
|
2584 test "$mail_locking" = "lockf" -a "$ac_cv_func_lockf" != "yes" && \
|
|
2585 XE_DIE("lockf mail locking requested but not available.")
|
|
2586 test "$mail_locking" = "flock" -a "$ac_cv_func_flock" != "yes" && \
|
|
2587 XE_DIE("flock mail locking requested but not available.")
|
|
2588 test "$mail_locking" = "locking" -a "$ac_cv_func_locking" != "yes" && \
|
|
2589 XE_DIE("locking mail locking requested but not available.")
|
410
|
2590
|
278
|
2591 case "$opsys" in decosf*)
|
|
2592 AC_CHECK_LIB(pthreads, cma_open)
|
|
2593 test "$ac_cv_lib_pthreads_cma_open" = "yes" && \
|
|
2594 c_switch_site="$c_switch_site -threads" ;;
|
|
2595 esac
|
151
|
2596
|
708
|
2597 dnl ----------------------------------------------------------------
|
|
2598 dnl Miscellaneous flags
|
|
2599 dnl ----------------------------------------------------------------
|
|
2600
|
151
|
2601 AC_MSG_CHECKING(whether the -xildoff compiler flag is required)
|
|
2602 if ${CC-cc} '-###' -xildon no_such_file.c 2>&1 | grep '^[^ ]*/ild ' > /dev/null ; then
|
|
2603 if ${CC-cc} '-###' -xildoff no_such_file.c 2>&1 | grep '^[^ ]*/ild ' > /dev/null ;
|
|
2604 then AC_MSG_RESULT(no);
|
|
2605 else AC_MSG_RESULT(yes); XE_APPEND(-xildoff, ld_switch_site)
|
|
2606 fi
|
|
2607 else AC_MSG_RESULT(no)
|
|
2608 fi
|
|
2609
|
155
|
2610 dnl Link with "-z ignore" on Solaris if supported
|
442
|
2611 if test "$opsys" = "sol2"; then
|
|
2612 if test "$os_release" -ge 56; then
|
|
2613 AC_MSG_CHECKING(for \"-z ignore\" linker flag)
|
|
2614 case "`ld -h 2>&1`" in
|
|
2615 *-z\ ignore\|record* ) AC_MSG_RESULT(yes)
|
|
2616 XE_PREPEND(-z ignore, ld_switch_site) ;;
|
|
2617 *) AC_MSG_RESULT(no) ;;
|
|
2618 esac
|
|
2619 fi
|
163
|
2620 fi
|
155
|
2621
|
149
|
2622 dnl ----------------------
|
|
2623 dnl Choose a window system
|
|
2624 dnl ----------------------
|
|
2625
|
|
2626 AC_CHECKING("for specified window system")
|
|
2627
|
462
|
2628 dnl Autodetection of Gdk libraries and includes
|
|
2629 dnl -------------------------------------------
|
|
2630 dnl On some systems (FreeBSD springs to mind), they use
|
|
2631 dnl versions on the utility routines, so instead of gtk-config
|
|
2632 dnl you must use gtk12-config, etc, etc.
|
|
2633
|
|
2634 GNOME_CONFIG=no
|
|
2635 GTK_CONFIG=no
|
|
2636
|
|
2637 if test "$with_gnome" != "no"; then
|
|
2638 AC_MSG_CHECKING(for GNOME configuration script)
|
|
2639 for possible in gnome-config
|
|
2640 do
|
|
2641 possible_version=`${possible} --version 2> /dev/null`
|
|
2642 if test "x${possible_version}" != "x"; then
|
|
2643 GNOME_CONFIG="${possible}"
|
|
2644 with_gnome=yes
|
|
2645 with_gtk=yes
|
|
2646 break
|
|
2647 fi
|
|
2648 done
|
|
2649 AC_MSG_RESULT([${GNOME_CONFIG}])
|
|
2650 fi
|
|
2651
|
|
2652 if test "${GNOME_CONFIG}" != "no"; then
|
|
2653 GNOME_LIBS=`${GNOME_CONFIG} --libs gnomeui`
|
|
2654 GNOME_CFLAGS=`${GNOME_CONFIG} --cflags gnomeui`
|
|
2655 AC_DEFINE(HAVE_GNOME)
|
|
2656 XE_APPEND(${GNOME_LIBS}, libs_gtk)
|
|
2657 XE_APPEND(${GNOME_CFLAGS}, c_switch_gtk)
|
|
2658 fi
|
|
2659
|
|
2660 if test "$with_gtk" != "no";then
|
|
2661 AC_MSG_CHECKING(for GTK configuration script)
|
|
2662 for possible in gtk12-config gtk14-config gtk-config
|
|
2663 do
|
|
2664 possible_version=`${possible} --version 2> /dev/null`
|
|
2665 if test "x${possible_version}" != "x"; then
|
|
2666 GTK_CONFIG="${possible}"
|
527
|
2667 case "${possible_version}" in
|
|
2668 1.0.*) AC_MSG_WARN([GTK 1.2 is required, please upgrade your version of GTK.]); with_gtk=no;;
|
|
2669 1.3.*) AC_MSG_WARN([GTK 1.3 is not supported right now]); with_gtk=no;;
|
|
2670 1.2.*)
|
|
2671 with_gtk=yes
|
|
2672 break
|
|
2673 ;;
|
|
2674 *) AC_MSG_WARN([Found unsupported version of GTK: $possible_version]);;
|
|
2675 esac
|
462
|
2676 fi
|
|
2677 done
|
|
2678 AC_MSG_RESULT([${GTK_CONFIG}])
|
|
2679 fi
|
|
2680
|
|
2681 if test "${GTK_CONFIG}" != "no"; then
|
|
2682 AC_MSG_CHECKING(gtk version)
|
|
2683 GTK_VERSION=`${GTK_CONFIG} --version`
|
|
2684 AC_MSG_RESULT(${GTK_VERSION})
|
|
2685
|
|
2686 AC_MSG_CHECKING(gtk libs)
|
|
2687 GTK_LIBS=`${GTK_CONFIG} --libs`
|
|
2688 XE_APPEND(${GTK_LIBS}, libs_gtk)
|
|
2689 AC_MSG_RESULT(${GTK_LIBS})
|
|
2690
|
|
2691 AC_MSG_CHECKING(gtk cflags)
|
|
2692 GTK_CFLAGS=`${GTK_CONFIG} --cflags`
|
720
|
2693 if test "$GCC" = "yes"; then
|
|
2694 GTK_CFLAGS="${GTK_CFLAGS} -Wno-shadow"
|
|
2695 fi
|
462
|
2696 XE_APPEND(${GTK_CFLAGS}, c_switch_gtk)
|
|
2697 AC_MSG_RESULT(${GTK_CFLAGS})
|
|
2698
|
|
2699 AC_CHECK_LIB(gdk_imlib, main, XE_PREPEND(-lgdk_imlib, libs_gtk))
|
|
2700 AC_CHECK_LIB(Imlib, Imlib_init, XE_APPEND(-lImlib, libs_gtk))
|
|
2701 AC_CHECK_FUNCS(gdk_imlib_init)
|
|
2702
|
|
2703 AC_DEFINE(HAVE_XPM)
|
|
2704 AC_DEFINE(HAVE_GTK)
|
|
2705 AC_SUBST(GTK_CONFIG)
|
|
2706
|
|
2707 window_system=gtk
|
|
2708 with_gtk=yes
|
|
2709 with_x11=no
|
|
2710
|
|
2711 test "${with_scrollbars}" != "no" && with_scrollbars=gtk
|
|
2712 test "${with_toolbars}" != no && with_toolbars=gtk
|
|
2713 test "${with_menubars}" != "no" && with_menubars=gtk
|
|
2714 test "${with_dialogs}" != "no" && with_dialogs=gtk
|
|
2715 test "${with_widgets}" != "no" && with_widgets=gtk
|
|
2716
|
|
2717 dnl Check for libglade support (it rocks)
|
|
2718 OLD_CFLAGS="${CFLAGS}"
|
724
|
2719 OLD_CPPFLAGS="${CPPFLAGS}"
|
462
|
2720 OLD_LDFLAGS="${LDFLAGS}"
|
|
2721 CFLAGS="${GTK_CFLAGS} ${CFLAGS}"
|
724
|
2722 CPPFLAGS="${GTK_CFLAGS} ${CFLAGS}"
|
462
|
2723 LDFLAGS="${LDFLAGS} ${GTK_LIBS}"
|
|
2724 AC_CHECK_HEADERS(glade/glade.h glade.h)
|
|
2725 AC_CHECK_LIB(xml, main, XE_PREPEND(-lxml, libs_gtk))
|
|
2726 AC_CHECK_LIB(glade, main, XE_PREPEND(-lglade, libs_gtk))
|
|
2727 AC_CHECK_LIB(glade-gnome, main, XE_PREPEND(-lglade-gnome, libs_gtk))
|
|
2728 AC_EGREP_HEADER([char \*txtdomain;], [glade/glade-xml.h],
|
|
2729 [AC_MSG_RESULT(yes)
|
|
2730 AC_DEFINE(LIBGLADE_XML_TXTDOMAIN,1)],
|
|
2731 [AC_MSG_RESULT(no)])
|
|
2732 CFLAGS="${OLD_CFLAGS}"
|
724
|
2733 CPPFLAGS="${OLD_CPPFLAGS}"
|
462
|
2734 LDFLAGS="${OLD_LDFLAGS}"
|
|
2735 fi
|
|
2736
|
|
2737 dnl We may eventually prefer gtk/gdk over vanilla X11...
|
|
2738
|
187
|
2739 if test "$with_x11" != "no"; then
|
|
2740 dnl User-specified --x-includes or --x-libraries implies --with-x11.
|
|
2741 test "$x_includes $x_libraries" != "NONE NONE" && \
|
|
2742 window_system=x11 with_x11=yes
|
|
2743
|
272
|
2744 dnl Autodetection of X11 libraries and includes
|
|
2745 dnl -------------------------------------------
|
|
2746 dnl AC_PATH_XTRA thinks it can find our X headers and includes, but
|
|
2747 dnl it often gets it wrong, so we only use it as a last resort.
|
|
2748
|
187
|
2749 dnl $OPENWINHOME implies --x-includes and --x-libraries
|
|
2750 dnl Not (yet) handled by autoconf2
|
272
|
2751 if test "$x_includes $x_libraries" = "NONE NONE" \
|
|
2752 -a -n "$OPENWINHOME" \
|
|
2753 -a "$OPENWINHOME" != "/usr/openwin" \
|
|
2754 -a -d "$OPENWINHOME"; then
|
187
|
2755 test -d "$OPENWINHOME/lib" && x_libraries="$OPENWINHOME/lib"
|
|
2756 test -d "$OPENWINHOME/include" && x_includes="$OPENWINHOME/include"
|
|
2757 test -d "$OPENWINHOME/share/include" && x_includes="$OPENWINHOME/share/include"
|
272
|
2758 fi
|
|
2759
|
|
2760 if test "$x_includes" = "NONE"; then
|
|
2761 dnl AC_PATH_XTRA often guesses /usr/include, when some other
|
|
2762 dnl include directory is a MUCH better guess (Linux, HP-UX 10.20).
|
|
2763 dnl This is a workaround for idiot (esp. HP) system vendors, who
|
|
2764 dnl provide a /usr/include/X11, but DON'T FULLY POPULATE IT.
|
|
2765 for dir in "/usr/X11" "/usr/X11R6"; do
|
|
2766 if test -d "$dir/include/X11"; then x_includes="$dir/include"; break; fi
|
|
2767 done
|
|
2768 fi
|
|
2769
|
|
2770 if test "$x_libraries" = "NONE"; then
|
|
2771 for dir in "/usr/X11/lib" "/usr/X11R6/lib" "/usr/lib/X11R6"; do
|
|
2772 if test -r "$dir/libX11.a"; then x_libraries="$dir"; break; fi
|
|
2773 done
|
149
|
2774 fi
|
187
|
2775
|
149
|
2776 AC_PATH_XTRA # Autoconf claims to find X library and include dirs for us.
|
|
2777 if test "$no_x" = "yes"
|
|
2778 then with_x11=no window_system=none HAVE_X_WINDOWS=no
|
|
2779 else with_x11=yes window_system=x11 HAVE_X_WINDOWS=yes
|
|
2780 fi
|
|
2781 fi
|
|
2782
|
462
|
2783 dnl #### wmperry:: !x11 != NONE
|
|
2784 dnl case "$with_x11" in
|
|
2785 dnl yes ) window_system=x11 HAVE_X_WINDOWS=yes ;;
|
|
2786 dnl no ) window_system=none HAVE_X_WINDOWS=no ;;
|
|
2787 dnl esac
|
0
|
2788
|
149
|
2789 if test "$with_x11" = "yes"; then
|
|
2790 AC_DEFINE(HAVE_X_WINDOWS)
|
151
|
2791 XE_APPEND(lwlib, MAKE_SUBDIR)
|
175
|
2792 XE_APPEND(lwlib, SRC_SUBDIR_DEPS)
|
149
|
2793
|
|
2794 dnl Try to find Motif/CDE/Tooltalk dirs
|
|
2795 dnl These take precedence over other X libs/includes, so PRE-pend
|
278
|
2796 for lib_dir in "/usr/dt/lib" "/usr/lib/Motif2.1" "/usr/lib/Motif1.2" "/usr/lib/Motif1.1"; do
|
159
|
2797 inc_dir=`echo $lib_dir | sed -e 's/lib/include/'`
|
149
|
2798 if test -d "$lib_dir" -a -d "$inc_dir"; then
|
151
|
2799 case "$x_libraries" in *"$lib_dir"* ) ;; *)
|
|
2800 x_libraries="$lib_dir $x_libraries"
|
|
2801 XE_PREPEND(-L${lib_dir}, X_LIBS) ;;
|
149
|
2802 esac
|
151
|
2803 case "$x_includes" in "$inc_dir"* ) ;; *)
|
|
2804 x_includes="$inc_dir $x_includes"
|
|
2805 XE_PREPEND(-I${inc_dir}, X_CFLAGS) ;;
|
149
|
2806 esac
|
|
2807 break; dnl only need ONE Motif implementation!
|
0
|
2808 fi
|
149
|
2809 done
|
|
2810
|
|
2811 dnl Contrib X libs/includes do NOT take precedence, so AP-pend
|
|
2812 for rel in "X11R6" "X11R5" "X11R4"; do
|
|
2813 lib_dir="/usr/contrib/$rel/lib" inc_dir="/usr/contrib/$rel/include"
|
|
2814 if test -d "$lib_dir" -a -d "$inc_dir"; then
|
151
|
2815 case "$x_libraries" in *"$lib_dir"* ) ;; *)
|
|
2816 x_libraries="$x_libraries $lib_dir"
|
|
2817 XE_APPEND(-L${lib_dir}, X_LIBS)
|
149
|
2818 esac
|
151
|
2819 case "$x_includes" in "$inc_dir"* ) ;; *)
|
|
2820 x_includes="$x_includes $inc_dir"
|
|
2821 XE_APPEND(-I${inc_dir}, X_CFLAGS)
|
149
|
2822 esac
|
|
2823 break; dnl Only need ONE X11 implementation !
|
0
|
2824 fi
|
149
|
2825 done
|
|
2826
|
373
|
2827 dnl Avoid version mismatch for shared library libXm.so on osf4
|
442
|
2828 case "$opsys" in
|
|
2829 decosf*) if test "$GCC" = yes -a -d /usr/shlib; then XE_APPEND(-L/usr/shlib, X_LIBS); fi ;;
|
|
2830 esac
|
373
|
2831
|
149
|
2832 ld_switch_x_site="$X_LIBS"
|
|
2833
|
151
|
2834 XE_COMPUTE_RUNPATH()
|
|
2835
|
149
|
2836 if test "$extra_verbose" = "yes"; then
|
|
2837 echo; echo "X11 compilation variables:"
|
163
|
2838 PRINT_VAR(x_libraries x_includes X_CFLAGS X_LIBS X_PRE_LIBS X_EXTRA_LIBS)
|
149
|
2839 echo
|
|
2840 fi
|
|
2841
|
265
|
2842 dnl Set up bitmaps search path.
|
|
2843 dnl The original suggestion was to unconditionally to append X11/bitmaps
|
|
2844 dnl to each element of $x_includes, I'm pretty sure this is the wrong
|
|
2845 dnl thing to do. We test for bitmaps and X11/bitmaps directories on each
|
|
2846 dnl element and add them to BITMAPDIR if they exist.
|
|
2847 bitmapdirs=
|
|
2848 if test "$x_includes" != NONE; then
|
|
2849 for i in $x_includes; do
|
|
2850 if test -d "$i/bitmaps"; then
|
|
2851 bitmapdirs="$i/bitmaps:$bitmapdirs"
|
|
2852 fi
|
|
2853 if test -d "$i/X11/bitmaps"; then
|
|
2854 bitmapdirs="$i/X11/bitmaps:$bitmapdirs"
|
|
2855 fi
|
|
2856 done
|
|
2857 bitmapdirs=`echo "$bitmapdirs" | sed s/.$//`
|
|
2858 fi
|
|
2859 test ! -z "$bitmapdirs" && AC_DEFINE_UNQUOTED(BITMAPDIR, "$bitmapdirs")
|
|
2860
|
163
|
2861 dnl Autodetect defines extracted from X config by xmkmf, e.g. NARROWPROTO
|
|
2862 AC_CHECKING(for X defines extracted by xmkmf)
|
|
2863 rm -fr conftestdir
|
|
2864 if mkdir conftestdir; then
|
|
2865 cd conftestdir
|
|
2866 cat > Imakefile <<'EOF'
|
|
2867 xetest:
|
|
2868 @echo ${PROTO_DEFINES} ${STD_DEFINES}
|
|
2869 EOF
|
|
2870 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
|
|
2871 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
|
|
2872 xmkmf_defines=`${MAKE-make} xetest 2>/dev/null | grep -v make`
|
|
2873 fi
|
|
2874 cd ..
|
|
2875 rm -fr conftestdir
|
|
2876 for word in $xmkmf_defines; do
|
535
|
2877 case "$word" in
|
464
|
2878 -D__STDC__*) ;;
|
|
2879 -D* )
|
442
|
2880 sym=`echo '' $word | sed -e 's:^ *-D::' -e 's:=.*::'`
|
|
2881 case "$word" in
|
|
2882 -D*=* ) val=`echo '' $word | sed -e 's:^.*=::'` ;;
|
|
2883 * ) val=1 ;;
|
|
2884 esac
|
|
2885 dnl Avoid re-AC_DEFINE-ing xmkmf symbols we've already defined above.
|
|
2886 if grep "^#define $sym " confdefs.h >/dev/null; then :; else
|
|
2887 if test "$val" = "1"
|
|
2888 then AC_DEFINE_UNQUOTED($sym)
|
|
2889 else AC_DEFINE_UNQUOTED($sym,$val)
|
|
2890 fi
|
|
2891 fi ;;
|
163
|
2892 esac
|
|
2893 done
|
|
2894 fi
|
|
2895
|
149
|
2896 dnl make sure we can find Intrinsic.h
|
|
2897 AC_CHECK_HEADER(X11/Intrinsic.h, ,
|
559
|
2898 [AC_MSG_ERROR([Unable to find X11 header files.])])
|
149
|
2899
|
153
|
2900 dnl -lXt and -lX11 are required
|
149
|
2901 dnl Some broken systems require the magic "-b i486-linuxaout" flag
|
|
2902 AC_CHECK_LIB(X11, XOpenDisplay, have_lib_x11=yes)
|
|
2903 if test "$have_lib_x11" != "yes"; then
|
|
2904 AC_CHECK_LIB(X11, XGetFontProperty,
|
|
2905 ld_switch_x_site="-b i486-linuxaout $ld_switch_x_site",
|
559
|
2906 [AC_MSG_ERROR([Unable to find X11 libraries.])],
|
149
|
2907 -b i486-linuxaout)
|
|
2908 fi
|
|
2909 libs_x="-lX11"
|
151
|
2910 test "$extra_verbose" = "yes" && echo " Setting libs_x to \"-lX11\""
|
149
|
2911
|
153
|
2912 dnl Autodetect -lXext
|
|
2913 AC_CHECK_LIB(Xext, XShapeSelectInput, XE_PREPEND(-lXext, libs_x))
|
|
2914
|
|
2915 dnl Require -lXt
|
169
|
2916 AC_CHECK_LIB(Xt, XtOpenDisplay, XE_PREPEND(-lXt, libs_x),
|
559
|
2917 AC_MSG_ERROR([Unable to find X11 libraries.]))
|
149
|
2918
|
|
2919 AC_MSG_CHECKING(the version of X11 being used)
|
|
2920 AC_TRY_RUN([#include <X11/Intrinsic.h>
|
272
|
2921 int main(int c, char *v[]) { return c>1 ? XlibSpecificationRelease : 0; }],
|
151
|
2922 [./conftest foobar; x11_release=$?],[x11_release=4],[x11_release=4])
|
|
2923 AC_MSG_RESULT(R${x11_release})
|
|
2924 AC_DEFINE_UNQUOTED(THIS_IS_X11R${x11_release})
|
149
|
2925
|
442
|
2926 if test "${x11_release}" = "4"; then
|
|
2927 case "$with_widgets" in
|
|
2928 "" | "no") with_widgets=no ;;
|
|
2929 *) XE_DIE("Widget support requires X11R5 or greater") ;;
|
|
2930 esac
|
|
2931 fi
|
|
2932
|
|
2933 AC_CHECK_FUNCS(XConvertCase)
|
|
2934
|
149
|
2935 AC_CHECK_HEADERS(X11/Xlocale.h)
|
|
2936
|
444
|
2937 dnl XFree86 has a non-standard prototype for this X11R6 function
|
|
2938 AC_CHECK_FUNCS(XRegisterIMInstantiateCallback)
|
|
2939 AC_MSG_CHECKING(for standard XRegisterIMInstantiateCallback prototype)
|
|
2940 AC_TRY_COMPILE([
|
|
2941 #define NeedFunctionPrototypes 1
|
|
2942 #include <X11/Xlib.h>
|
|
2943 extern Bool XRegisterIMInstantiateCallback(
|
|
2944 Display*, struct _XrmHashBucketRec*, char*, char*, XIMProc, XPointer*);
|
535
|
2945 ], [],
|
444
|
2946 [AC_MSG_RESULT(yes)],
|
|
2947 [AC_MSG_RESULT(no)
|
|
2948 AC_DEFINE(XREGISTERIMINSTANTIATECALLBACK_NONSTANDARD_PROTOTYPE)])
|
149
|
2949
|
|
2950 dnl autodetect -lXmu
|
169
|
2951 test -z "$with_xmu" && { AC_CHECK_LIB(Xmu, XmuReadBitmapDataFromFile,
|
|
2952 with_xmu=yes, with_xmu=no) }
|
185
|
2953 if test "$with_xmu" = "no"; then
|
|
2954 XE_ADD_OBJS(xmu.o)
|
187
|
2955 else
|
185
|
2956 XE_PREPEND(-lXmu, libs_x)
|
|
2957 AC_DEFINE(HAVE_XMU)
|
169
|
2958 fi
|
149
|
2959
|
|
2960 dnl Autodetect -lXbsd
|
|
2961 dnl #### Someone, please add a better function than main
|
151
|
2962 AC_CHECK_LIB(Xbsd, main, XE_PREPEND(-lXbsd, libs_x))
|
149
|
2963
|
243
|
2964 dnl Problem with the MIT distribution of X on AIX
|
|
2965 if test "$unexec" = "unexaix.o" -a "$x11_release" = "6"; then
|
272
|
2966 dnl X11R6 requires thread-safe code on AIX for some reason
|
274
|
2967 if test "$GCC" = "yes"; then
|
|
2968 XE_PREPEND(-mthreads, X_CFLAGS)
|
|
2969 XE_PREPEND(-mthreads, libs_x)
|
|
2970 else
|
|
2971 case "$CC" in
|
|
2972 "xlc" ) CC="xlc_r" ;;
|
|
2973 "xlC" ) CC="xlC_r" ;;
|
|
2974 "cc" ) CC="cc_r" ;;
|
|
2975 esac
|
|
2976 fi
|
243
|
2977 fi
|
|
2978
|
149
|
2979 fi dnl $with_x11 = yes
|
|
2980
|
265
|
2981 if test "$with_msw" != "no"; then
|
|
2982 AC_CHECKING(for MS-Windows)
|
|
2983 AC_CHECK_LIB(gdi32,main,with_msw=yes)
|
|
2984 if test "$with_msw" = "yes"; then
|
|
2985 AC_DEFINE(HAVE_MS_WINDOWS)
|
448
|
2986
|
|
2987 dnl The net installer only works with MS-Windows currently
|
462
|
2988 if test "$with_netinstall" = "yes"; then
|
|
2989 XE_APPEND(netinstall, MAKE_SUBDIR)
|
|
2990 XE_APPEND(netinstall, SRC_SUBDIR_DEPS)
|
|
2991 XE_APPEND(netinstall, INSTALL_ARCH_DEP_SUBDIR)
|
|
2992 fi
|
458
|
2993
|
276
|
2994 install_pp="$blddir/lib-src/installexe.sh"
|
771
|
2995 XE_APPEND(-limm32 -lshell32 -lgdi32 -luser32 -lcomdlg32 -lcomctl32 -lole32 -luuid -lwinspool -lmpr, libs_system)
|
|
2996 if test "$with_dragndrop" != no; then
|
|
2997 XE_APPEND(msw, dragndrop_proto)
|
|
2998 with_dragndrop=yes
|
|
2999 fi
|
265
|
3000 if test "$window_system" != x11; then
|
771
|
3001 window_system=msw
|
|
3002 test "$with_scrollbars" != "no" && with_scrollbars=msw
|
|
3003 test "$with_menubars" != "no" && with_menubars=msw
|
|
3004 test "$with_toolbars" != "no" && with_toolbars=msw
|
|
3005 test "$with_dialogs" != "no" && with_dialogs=msw
|
|
3006 test "$with_widgets" != "no" && with_widgets=msw
|
265
|
3007 fi
|
380
|
3008 dnl check for our special version of select
|
278
|
3009 AC_TRY_RUN([#include <fcntl.h>
|
|
3010 int main() { return (open("/dev/windows", O_RDONLY, 0) > 0)? 0 : 1; }],
|
771
|
3011 [AC_DEFINE(HAVE_MSG_SELECT)])
|
265
|
3012 fi
|
|
3013 fi
|
|
3014
|
276
|
3015 AC_SUBST(install_pp)
|
|
3016
|
771
|
3017 test -z "$with_dragndrop" && with_dragndrop="$with_dragndrop_default"
|
149
|
3018 test -z "$window_system" && window_system="none"
|
|
3019
|
272
|
3020 dnl Test for features that require a window system - ANY window system
|
|
3021 if test "$window_system" = "none"; then
|
388
|
3022 for feature in menubars scrollbars toolbars dialogs dragndrop xface
|
272
|
3023 do
|
|
3024 if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
|
|
3025 AC_MSG_WARN([--with-$feature ignored: Not valid without window system support])
|
|
3026 fi
|
|
3027 eval "with_${feature}=no"
|
|
3028 done
|
|
3029 else
|
|
3030 test -z "$with_toolbars" && with_toolbars=yes
|
|
3031 fi
|
|
3032
|
|
3033 dnl ### Test for features that require mswindows support - currently none
|
|
3034 dnl ### MS-Windows folks: add code here..... (martin)
|
|
3035 if test "$with_msw" != "yes"; then
|
|
3036 for feature in MARTIN_IS_CLUELESS_ABOUT_MSW_FEATURES
|
|
3037 do
|
|
3038 if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
|
|
3039 AC_MSG_WARN([--with-$feature ignored: Not valid without MS-Windows support])
|
|
3040 fi
|
|
3041 eval "with_${feature}=no"
|
|
3042 done
|
|
3043 else
|
|
3044 :
|
|
3045 fi
|
|
3046
|
|
3047 dnl Test for features that require X11 support
|
|
3048 if test "$with_x11" != "yes"; then
|
|
3049 dnl It ought to be reasonable to have no output device at all, and only use
|
|
3050 dnl XEmacs in --batch mode.
|
|
3051 dnl if test "$with_tty" = "no" ; then
|
|
3052 dnl AC_MSG_ERROR([No window system support and no TTY support - Unable to proceed.])
|
|
3053 dnl fi
|
434
|
3054 for feature in tooltalk cde offix wmcommand xim xmu nas_sound
|
149
|
3055 do
|
|
3056 if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
|
|
3057 AC_MSG_WARN([--with-$feature ignored: Not valid without X support])
|
0
|
3058 fi
|
149
|
3059 eval "with_${feature}=no"
|
70
|
3060 done
|
0
|
3061 fi
|
120
|
3062
|
442
|
3063 dnl Balloon Help requires the Shape extension, not available everywhere,
|
|
3064 dnl for example not on AIX 4.3.
|
|
3065 if test "$with_x11" = "yes"; then
|
|
3066 AC_CHECK_HEADER(X11/extensions/shape.h, [
|
|
3067 AC_DEFINE(HAVE_BALLOON_HELP)
|
771
|
3068 ])
|
442
|
3069 fi
|
|
3070
|
149
|
3071 dnl FSF 19.29 has some bitmapdir stuff here.
|
0
|
3072 bitmapdir=
|
|
3073
|
149
|
3074 case "$window_system" in
|
70
|
3075 x11 ) HAVE_X_WINDOWS=yes; echo " Using X11." ;;
|
272
|
3076 msw ) HAVE_X_WINDOWS=no ; echo " Using MS-Windows." ;;
|
462
|
3077 gtk )
|
|
3078 HAVE_X_WINDOWS=no
|
|
3079 test "$with_gnome" = "yes" && echo " Using GNOME."
|
|
3080 test "$with_gnome" = "no" && echo " Using GTK."
|
|
3081 ;;
|
70
|
3082 none ) HAVE_X_WINDOWS=no ; echo " Using no window system." ;;
|
0
|
3083 esac
|
|
3084
|
149
|
3085 case "$x_libraries" in *X11R4* )
|
|
3086 test "$opsys" = "hpux9" && opsysfile="s/hpux9-x11r4.h"
|
|
3087 test "$opsys" = "hpux9-shr" && opsysfile="s/hpux9shxr4.h"
|
|
3088 esac
|
|
3089
|
414
|
3090 dnl Enable or disable proper handling of WM_COMMAND
|
|
3091 AC_CHECKING(for WM_COMMAND option);
|
|
3092 dnl if test "$with_wmcommand" = "yes"; then
|
|
3093 if test "$with_wmcommand" != "no"; then
|
|
3094 AC_DEFINE(HAVE_WMCOMMAND)
|
177
|
3095 fi
|
|
3096
|
149
|
3097 dnl Autodetect Xauth
|
159
|
3098 dnl -lXau is only used by gnuclient, so use a special variable for Xauth X libs
|
149
|
3099 test -z "$with_xauth" && test "$window_system" = "none" && with_xauth=no
|
|
3100 test -z "$with_xauth" && { AC_CHECK_HEADER(X11/Xauth.h, ,with_xauth=no) }
|
|
3101 test -z "$with_xauth" && { AC_CHECK_LIB(Xau, XauGetAuthByAddr,[:],with_xauth=no) }
|
|
3102 test -z "$with_xauth" && with_xauth=yes
|
|
3103 if test "$with_xauth" = "yes"; then
|
|
3104 AC_DEFINE(HAVE_XAUTH)
|
462
|
3105 XE_SPACE(libs_xauth, $GTK_LIBS $X_EXTRA_LIBS -lXau $libs_x $X_PRE_LIBS)
|
100
|
3106 fi
|
159
|
3107 AC_SUBST(libs_xauth)
|
100
|
3108
|
282
|
3109 dnl This one is for the static initializeds variables in
|
|
3110 dnl offix.c, so that the thing is dumped after lastfile.o
|
274
|
3111 AC_SUBST(dnd_objs)
|
|
3112
|
1111
|
3113 dnl Support for using a different compiler for xemacs itself.
|
|
3114 dnl Useful for building XEmacs with a C++ compiler.
|
|
3115 dnl For example, `configure --compiler=gcc --xemacs-compiler=g++
|
|
3116
|
|
3117 dnl The compiler used to build xemacs, as opposed to the compiler
|
|
3118 dnl used by configure and lib-src, is determined from the following
|
|
3119 dnl sources, in order of priority:
|
|
3120 dnl o --xemacs-compiler configure flag
|
|
3121 dnl o XEMACS_CC environment variable
|
|
3122 dnl o same as the regular compiler, (determined previously)
|
|
3123 test -n "$xemacs_compiler" && XEMACS_CC="$xemacs_compiler"
|
|
3124 : ${XEMACS_CC:="$CC"}
|
|
3125
|
997
|
3126 dnl Autodetect dll support
|
|
3127 dnl This must come before the detection code for anything that is in a module
|
|
3128 if test "$with_modules" != "no"; then
|
|
3129 AC_CHECKING(for module support)
|
|
3130
|
|
3131 dnl Check for MS-Windows
|
|
3132 if test "$with_msw" = "yes"; then
|
|
3133 have_dl=yes;
|
|
3134 else
|
|
3135 dnl Find headers and libraries
|
|
3136 AC_CHECK_HEADER(dlfcn.h, [
|
|
3137 AC_MSG_CHECKING([for dlopen in -lc])
|
|
3138 AC_TRY_LINK([#include <dlfcn.h>],dnl
|
|
3139 [dlopen ("", 0);], [ have_dl=yes ], [
|
|
3140 AC_MSG_CHECKING([for dlopen in -ldl])
|
|
3141 ac_save_LIBS="$LIBS"
|
|
3142 LIBS="-ldl $LIBS"
|
|
3143 AC_TRY_LINK([#include <dlfcn.h>],dnl
|
|
3144 [dlopen ("", 0);], [ have_dl=yes ],
|
|
3145 [LIBS="$ac_save_LIBS"])
|
|
3146 ac_save_LIBS=])])
|
|
3147 if test -n "$have_dl"; then
|
|
3148 AC_DEFINE(HAVE_DLOPEN)
|
|
3149 else
|
|
3150 AC_CHECK_LIB(dld, shl_load, [
|
|
3151 libdl=dld have_dl=yes;
|
|
3152 AC_DEFINE(HAVE_SHL_LOAD)], [
|
|
3153 AC_CHECK_LIB(dld, dld_init, [
|
|
3154 libdl=dld have_dl=yes;
|
|
3155 AC_DEFINE(HAVE_DLD_INIT)])])
|
|
3156 fi
|
|
3157 fi dnl end !MS-Windows
|
|
3158
|
|
3159 if test -n "$have_dl"; then
|
|
3160 dnl XE_SHLIB_STUFF (in aclocal.m4) defines $can_build_shared
|
|
3161 XE_SHLIB_STUFF
|
|
3162 fi
|
|
3163
|
|
3164 if test "$can_build_shared" = "yes"; then
|
|
3165 AC_DEFINE(HAVE_SHLIB)
|
|
3166 XE_APPEND(src, INSTALL_ARCH_DEP_SUBDIR)
|
|
3167 test -n "$libdl" && XE_PREPEND(-l${libdl}, LIBS)
|
|
3168 AC_CHECK_FUNCS(dlerror _dlerror)
|
|
3169 with_modules=yes
|
|
3170 MOD_CC="../../lib-src/ellcc"
|
|
3171 MODCFLAGS="\$(CFLAGS) --mode=compile --mod-output=\$@ -I../../src -I\$(srcdir)/../../src"
|
|
3172 INSTALLPATH="\$(moduledir)"
|
|
3173 MOD_INSTALL_PROGRAM=${INSTALL_PROGRAM}
|
|
3174 OBJECT_TO_BUILD="\$(MODNAME).ell"
|
|
3175 else
|
|
3176 if test "$with_modules" = "yes"; then
|
|
3177 XE_DIE("Required module support cannot be provided.")
|
|
3178 else
|
|
3179 echo " No module support."
|
|
3180 fi
|
|
3181 with_modules=no
|
1111
|
3182 MOD_CC="$XEMACS_CC"
|
997
|
3183 MODCFLAGS="\$(CFLAGS) -I../../src -I\$(srcdir)/../../src"
|
|
3184 INSTALLPATH=""
|
|
3185 MOD_INSTALL_PROGRAM="true"
|
|
3186 OBJECT_TO_BUILD="\$(MODNAME).o"
|
|
3187 fi
|
|
3188 fi
|
|
3189 MODARCHDIR=
|
|
3190 MAKE_DOCFILE="../../lib-src/make-docfile"
|
|
3191 AC_SUBST(with_modules)
|
|
3192 AC_SUBST(MOD_CC)
|
|
3193 AC_SUBST(MODARCHDIR)
|
|
3194 AC_SUBST(MAKE_DOCFILE)
|
|
3195 AC_SUBST(MODCFLAGS)
|
|
3196 AC_SUBST(INSTALLPATH)
|
|
3197 AC_SUBST(MOD_INSTALL_PROGRAM)
|
|
3198 AC_SUBST(OBJECT_TO_BUILD)
|
|
3199
|
149
|
3200 dnl Autodetect tooltalk
|
|
3201 if test "$with_tooltalk" != "no" ; then
|
|
3202 dnl autodetect the location of tt_c.h
|
|
3203 dnl tt_c.h might be in Tt or desktop include directories
|
|
3204 for dir in "" "Tt/" "desktop/" ; do
|
442
|
3205 AC_CHECK_HEADER(${dir}tt_c.h, tt_c_h_file="${dir}tt_c.h"; break)
|
149
|
3206 done
|
442
|
3207 if test -z "$tt_c_h_file"; then
|
284
|
3208 if test "$with_tooltalk" = "yes"; then
|
|
3209 USAGE_ERROR("Unable to find required tooltalk header files.")
|
|
3210 fi
|
|
3211 with_tooltalk=no
|
|
3212 fi
|
0
|
3213 fi
|
149
|
3214 if test "$with_tooltalk" != "no" ; then
|
|
3215 for extra_libs in "" "-lI18N -lce" "-lcxx"; do
|
|
3216 AC_CHECK_LIB(tt, tt_message_create,
|
284
|
3217 tt_libs="-ltt $extra_libs"; break, [:],$extra_libs)
|
0
|
3218 done
|
284
|
3219 if test -z "$tt_libs"; then
|
|
3220 if test "$with_tooltalk" = "yes"; then
|
|
3221 USAGE_ERROR("Unable to find required tooltalk libraries.")
|
|
3222 fi
|
|
3223 with_tooltalk=no
|
|
3224 fi
|
149
|
3225 fi
|
284
|
3226 test -z "$with_tooltalk" && with_tooltalk=yes
|
149
|
3227 if test "$with_tooltalk" = "yes"; then
|
|
3228 AC_DEFINE(TOOLTALK)
|
442
|
3229 AC_DEFINE_UNQUOTED(TT_C_H_FILE, "$tt_c_h_file")
|
151
|
3230 XE_PREPEND($tt_libs, libs_x)
|
0
|
3231 fi
|
|
3232
|
149
|
3233 dnl Autodetect CDE
|
|
3234 test -z "$with_cde" && { AC_CHECK_HEADER(Dt/Dt.h, , with_cde=no) }
|
|
3235 test -z "$with_cde" && { AC_CHECK_LIB(DtSvc, DtDndDragStart, [:], with_cde=no) }
|
581
|
3236 if test "$with_dragndrop" = "no" ; then
|
|
3237 if test "$with_cde" = "yes" ; then
|
|
3238 AC_MSG_WARN([--with-cde forced to \`no'; no generic Drag'n'Drop support])
|
|
3239 fi
|
282
|
3240 with_cde=no
|
|
3241 fi
|
581
|
3242 test -z "$with_cde" && with_cde=yes
|
149
|
3243 if test "$with_cde" = "yes" ; then
|
|
3244 AC_DEFINE(HAVE_CDE)
|
151
|
3245 XE_PREPEND(-lDtSvc, libs_x)
|
282
|
3246 XE_APPEND(CDE, dragndrop_proto)
|
149
|
3247 with_tooltalk=yes # CDE requires Tooltalk
|
167
|
3248 need_motif=yes # CDE requires Motif
|
149
|
3249 fi
|
|
3250
|
288
|
3251 dnl Always compile OffiX unless --without-offix is given, no
|
380
|
3252 dnl X11 support is compiled in, no standard Xmu is available,
|
288
|
3253 dnl or dragndrop support is disabled
|
300
|
3254 dnl Because OffiX support currently loses when more than one display
|
|
3255 dnl is in use, we now disable it by default -slb 07/10/1998.
|
288
|
3256 test "$window_system" != "x11" && with_offix=no
|
|
3257 if test "$with_xmu" != yes -a "$with_x11" = yes; then
|
581
|
3258 if test "$with_offix" = "yes" ; then
|
|
3259 AC_MSG_WARN([--with-offix forced to \`no'; no real Xmu support])
|
|
3260 fi
|
288
|
3261 with_offix=no
|
|
3262 fi
|
|
3263 if test "$with_dragndrop" = no; then
|
581
|
3264 if test "$with_offix" = "yes" ; then
|
|
3265 AC_MSG_WARN([--with-offix forced to \`no'; no generic Drag'n'Drop support])
|
|
3266 fi
|
288
|
3267 with_offix=no
|
|
3268 fi
|
|
3269 if test "$with_cde" = yes; then
|
581
|
3270 if test "$with_offix" = "yes" ; then
|
|
3271 AC_MSG_WARN([--with-offix forced to \`no'; CDE already found])
|
|
3272 fi
|
288
|
3273 with_offix=no
|
|
3274 fi
|
300
|
3275 test -z "$with_offix" && with_offix=no
|
288
|
3276 if test "$with_offix" = "yes"; then
|
|
3277 AC_DEFINE(HAVE_OFFIX_DND)
|
|
3278 XE_APPEND(offix.o, dnd_objs)
|
|
3279 XE_APPEND(OffiX, dragndrop_proto)
|
|
3280 fi
|
462
|
3281 if test "$with_gtk" = "yes"; then
|
|
3282 XE_APPEND(GTK, dragndrop_proto)
|
|
3283 fi
|
288
|
3284
|
282
|
3285 dnl Autodetect Drag'n'Drop support
|
|
3286 dnl always included if CDE, Offix, or MSWindows are defined
|
|
3287 if test "$with_dragndrop" != "no" ; then
|
446
|
3288 AC_MSG_CHECKING(if drag and drop API is needed)
|
282
|
3289 if test -n "$dragndrop_proto" ; then
|
|
3290 with_dragndrop=yes
|
|
3291 AC_MSG_RESULT([yes (${dragndrop_proto} )])
|
|
3292 AC_DEFINE(HAVE_DRAGNDROP)
|
|
3293 XE_APPEND(dragdrop.o, extra_objs)
|
|
3294 else
|
|
3295 with_dragndrop=no
|
|
3296 AC_MSG_RESULT(no)
|
|
3297 fi
|
|
3298 fi
|
|
3299
|
259
|
3300 dnl Autodetect LDAP
|
|
3301 AC_CHECKING(for LDAP)
|
997
|
3302 ldap_libs=
|
272
|
3303 test -z "$with_ldap" && { AC_CHECK_HEADER(ldap.h, ,with_ldap=no) }
|
|
3304 test -z "$with_ldap" && { AC_CHECK_HEADER(lber.h, ,with_ldap=no) }
|
|
3305 if test "$with_ldap" != "no"; then
|
418
|
3306 AC_CHECK_LIB(ldap, ldap_search, with_ldap_nolber=yes, with_ldap_nolber=no)
|
|
3307 test "$with_ldap_nolber" = "no" && { AC_CHECK_LIB(ldap, ldap_open, with_ldap_lber=yes, with_ldap_lber=no, -llber) }
|
422
|
3308 test "$with_ldap_nolber" = "no" -a "$with_ldap_lber" = "no" && { AC_CHECK_LIB(ldap, ldap_open, with_ldap_krb=yes, with_ldap_krb=no, -llber -lkrb) }
|
|
3309 test "$with_ldap_nolber" = "no" -a "$with_ldap_lber" = "no" -a "$with_ldap_krb" = "no" && { AC_CHECK_LIB(ldap, ldap_open, with_ldap_krbdes=yes, with_ldap_krbdes=no, -llber -lkrb -ldes) }
|
|
3310 test -z "$with_ldap" -a \( "$with_ldap_lber" = "yes" -o "$with_ldap_nolber" = "yes" -o "$with_ldap_krb" = "yes" -o "$with_ldap_krbdes" = "yes" \) && with_ldap=yes
|
272
|
3311 fi
|
|
3312 if test "$with_ldap" = "yes"; then
|
259
|
3313 AC_DEFINE(HAVE_LDAP)
|
418
|
3314 if test "$with_ldap_nolber" = "yes" ; then
|
997
|
3315 XE_PREPEND(-lldap, ldap_libs)
|
418
|
3316 else
|
422
|
3317 if test "$with_ldap_krb" = "yes" ; then
|
997
|
3318 XE_PREPEND(-lkrb, ldap_libs)
|
422
|
3319 fi
|
|
3320 if test "$with_ldap_krbdes" = "yes" ; then
|
997
|
3321 XE_PREPEND(-ldes, ldap_libs)
|
|
3322 XE_PREPEND(-lkrb, ldap_libs)
|
422
|
3323 fi
|
997
|
3324 XE_PREPEND(-llber, ldap_libs)
|
|
3325 XE_PREPEND(-lldap, ldap_libs)
|
410
|
3326 fi
|
997
|
3327 save_LIBS="$LIBS" LIBS="$LIBS $ldap_libs"
|
418
|
3328 AC_CHECK_FUNCS(ldap_set_option ldap_get_lderrno ldap_result2error ldap_parse_result)
|
997
|
3329 LIBS="$save_LIBS"
|
|
3330 XE_APPEND(modules/ldap, MAKE_SUBDIR)
|
1111
|
3331 need_modules_common=yes
|
997
|
3332 if test "$with_modules" = "yes"; then
|
|
3333 XE_APPEND(modules/ldap, INSTALL_ARCH_DEP_SUBDIR)
|
|
3334 fi
|
404
|
3335 fi
|
997
|
3336 AC_SUBST(ldap_libs)
|
404
|
3337
|
442
|
3338 dnl Autodetect PostgreSQL
|
|
3339 dnl On many Linux systems, PostgreSQL is packaged to be installed in /usr;
|
|
3340 dnl in this case, configure will easily detect it there.
|
|
3341 dnl
|
|
3342 dnl If PostgreSQL is installed into a different prefix,
|
|
3343 dnl (such as the default /usr/local/pgsql when building from source),
|
|
3344 dnl that prefix must be specified using the --site-prefixes flag.
|
997
|
3345 postgresql_libs=
|
442
|
3346 if test "$with_postgresql" != "no"; then
|
|
3347 AC_CHECKING(for PostgreSQL)
|
|
3348
|
|
3349 dnl Look for these standard header file locations, known to be used on Linux
|
|
3350 for header_dir in "" "pgsql/" "postgresql/"; do
|
|
3351 AC_CHECK_HEADER(${header_dir}libpq-fe.h,
|
|
3352 libpq_fe_h_file=${header_dir}libpq-fe.h; break)
|
|
3353 done
|
|
3354
|
|
3355 test -n "$libpq_fe_h_file" && { AC_CHECK_LIB(pq,PQconnectdb,have_libpq=yes) }
|
|
3356
|
|
3357 if test -n "$libpq_fe_h_file" -a "$have_libpq" = "yes"; then
|
|
3358 with_postgresql=yes
|
|
3359 AC_DEFINE(HAVE_POSTGRESQL)
|
|
3360 AC_CHECK_LIB(pq,PQconnectStart, [
|
|
3361 with_postgresqlv7=yes;
|
|
3362 AC_DEFINE(HAVE_POSTGRESQLV7)])
|
|
3363 AC_DEFINE_UNQUOTED(LIBPQ_FE_H_FILE, "$libpq_fe_h_file")
|
997
|
3364 XE_PREPEND(-lpq, postgresql_libs)
|
|
3365 XE_APPEND(modules/postgresql, MAKE_SUBDIR)
|
1111
|
3366 need_modules_common=yes
|
997
|
3367 if test "$with_modules" = "yes"; then
|
|
3368 XE_APPEND(modules/postgresql, INSTALL_ARCH_DEP_SUBDIR)
|
|
3369 fi
|
442
|
3370 elif test "$with_postgresql" = "yes"; then
|
|
3371 XE_DIE("Required PostgreSQL support cannot be provided. Check --site-prefixes.")
|
|
3372 fi
|
|
3373 fi
|
997
|
3374 AC_SUBST(postgresql_libs)
|
442
|
3375
|
193
|
3376 dnl ----------------------
|
278
|
3377 dnl Graphics libraries
|
193
|
3378 dnl ----------------------
|
|
3379
|
278
|
3380 if test "$window_system" != "none"; then
|
|
3381 AC_CHECKING(for graphics libraries)
|
272
|
3382
|
724
|
3383 dnl add special code to handle xpm-nox on Cygwin (csw)
|
|
3384 dnl -- should only happen if CYGWIN && WITH_XPM && WITH_MSW && !WITH_X
|
|
3385 libpath_xpm=
|
|
3386 incpath_xpm=
|
|
3387 case "$opsys" in
|
|
3388 cygwin*)
|
|
3389 cygwin_top=`eval "gcc -print-file-name=libc.a"` ;
|
|
3390 cygwin_top=`eval "dirname ${cygwin_top}"`;
|
|
3391 cygwin_top="${cygwin_top}/..";
|
|
3392 case "$window_system" in
|
|
3393 dnl use "standard" search pattern
|
|
3394 x11) ;;
|
|
3395 dnl hardcode "standard" non-X11 xpm lib/inc dirs
|
|
3396 msw) libpath_xpm="-L${cygwin_top}/lib/noX"
|
|
3397 incpath_xpm="-I${cygwin_top}/include/noX"
|
|
3398 ;;
|
|
3399 dnl not supported on cygwin (yet?)
|
|
3400 gtk) ;;
|
|
3401 dnl probably not reached...
|
|
3402 none) ;;
|
|
3403 dnl ditto
|
|
3404 *) ;;
|
|
3405 esac
|
|
3406 ;;
|
|
3407 dnl use "standard" search pattern for all other OS's
|
|
3408 *) ;;
|
|
3409 esac
|
193
|
3410 dnl Autodetect Xpm
|
373
|
3411 xpm_problem=""
|
272
|
3412 if test -z "$with_xpm"; then
|
724
|
3413 XE_PREPEND("$incpath_xpm", CFLAGS)
|
|
3414 XE_PREPEND("$libpath_xpm", LDFLAGS)
|
272
|
3415 AC_MSG_CHECKING(for Xpm - no older than 3.4f)
|
|
3416 xe_check_libs=-lXpm
|
442
|
3417 AC_TRY_RUN([#define XPM_NUMBERS
|
|
3418 #include <X11/xpm.h>
|
272
|
3419 int main(int c, char **v) {
|
|
3420 return c == 1 ? 0 :
|
|
3421 XpmIncludeVersion != XpmLibraryVersion() ? 1 :
|
|
3422 XpmIncludeVersion < 30406 ? 2 : 0 ;}],
|
|
3423 [./conftest dummy_arg; xpm_status=$?;
|
373
|
3424 if test "$xpm_status" = "0"; then
|
272
|
3425 with_xpm=yes;
|
|
3426 else
|
|
3427 with_xpm=no;
|
373
|
3428 if test "$xpm_status" = "1"; then
|
272
|
3429 xpm_problem="Xpm library version and header file version don't match!"
|
373
|
3430 elif test "$xpm_status" = "2"; then
|
272
|
3431 xpm_problem="Xpm library version is too old!"
|
|
3432 else
|
|
3433 xpm_problem="Internal xpm detection logic error!"
|
|
3434 fi
|
|
3435 echo "
|
373
|
3436 *** WARNING *** $xpm_problem
|
278
|
3437 I'm not touching that with a 10-foot pole!
|
|
3438 If you really want to use the installed version of Xpm, rerun
|
373
|
3439 configure and add '--with-xpm=yes', but don't blame me if XEmacs crashes!"
|
278
|
3440 fi],
|
272
|
3441 [with_xpm=no])
|
|
3442 xe_check_libs=
|
|
3443 AC_MSG_RESULT($with_xpm)
|
193
|
3444 fi
|
|
3445 if test "$with_xpm" = "yes"; then
|
460
|
3446 dnl #### This code assumes that if AC_CHECK_LIB fails,
|
|
3447 dnl #### then it will succeed if FOR_MSW is defined,
|
458
|
3448 dnl #### but doesn't actually verify this assumption.
|
193
|
3449 AC_DEFINE(HAVE_XPM)
|
724
|
3450 XE_PREPEND("$libpath_xpm", LDFLAGS)
|
193
|
3451 XE_PREPEND(-lXpm, libs_x)
|
724
|
3452 XE_PREPEND("$incpath_xpm", CFLAGS)
|
278
|
3453 AC_MSG_CHECKING(for \"FOR_MSW\" xpm)
|
|
3454 xe_check_libs=-lXpm
|
|
3455 AC_TRY_LINK(, [XpmCreatePixmapFromData()],
|
|
3456 [xpm_for_msw=no],
|
|
3457 [xpm_for_msw=yes])
|
|
3458 xe_check_libs=
|
|
3459 AC_MSG_RESULT($xpm_for_msw)
|
|
3460 if test "$xpm_for_msw" = "yes"; then
|
|
3461 AC_DEFINE(FOR_MSW)
|
|
3462 fi
|
193
|
3463 fi
|
|
3464
|
388
|
3465 dnl Autodetect XFACE
|
|
3466 test -z "$with_xface" && { AC_CHECK_HEADER(compface.h, ,with_xface=no) }
|
|
3467 test -z "$with_xface" && { AC_CHECK_LIB(compface, UnGenFace,[:] ,with_xface=no) }
|
|
3468 test -z "$with_xface" && with_xface=yes
|
|
3469 if test "$with_xface" = "yes"; then
|
|
3470 AC_DEFINE(HAVE_XFACE)
|
|
3471 XE_PREPEND(-lcompface, libs_x)
|
|
3472 fi
|
|
3473
|
373
|
3474 dnl For a brief period we had the GIF code split out into a separate library,
|
|
3475 dnl but patent problems, etc. sort of squashed that idea.
|
|
3476 dnl We default to building with builtin GIF decoding
|
|
3477 if test "$with_gif" != "no"; then
|
|
3478 with_gif="yes"
|
|
3479 AC_DEFINE(HAVE_GIF)
|
|
3480 fi
|
|
3481
|
278
|
3482 dnl Too many stupid linkers can't detect cascaded lib dependencies until runtime
|
|
3483 dnl So we always search for libz compression support.
|
|
3484 if test "$with_png $with_tiff" != "no no"; then
|
|
3485 AC_CHECK_LIB(c, inflate, [:], [
|
|
3486 AC_CHECK_LIB(z, inflate, [XE_PREPEND(-lz, libs_x)],[
|
|
3487 AC_CHECK_LIB(gz, inflate, [XE_PREPEND(-lgz, libs_x)])])])
|
193
|
3488 fi
|
|
3489
|
251
|
3490 dnl autodetect JPEG
|
|
3491 test -z "$with_jpeg" && { AC_CHECK_HEADER(jpeglib.h, ,with_jpeg=no) }
|
|
3492 test -z "$with_jpeg" && { AC_CHECK_LIB(jpeg, jpeg_destroy_decompress,[:],with_jpeg=no) }
|
|
3493 test -z "$with_jpeg" && with_jpeg=yes
|
|
3494 if test "$with_jpeg" = "yes"; then
|
|
3495 AC_DEFINE(HAVE_JPEG)
|
|
3496 XE_PREPEND(-ljpeg, libs_x)
|
193
|
3497 fi
|
|
3498
|
251
|
3499 dnl autodetect PNG
|
373
|
3500 png_problem=""
|
|
3501 test -z "$with_png" && { AC_CHECK_FUNC(pow, ,with_png=no) }
|
|
3502 test -z "$with_png" && { AC_CHECK_HEADER(png.h, ,with_png=no) }
|
|
3503 test -z "$with_png" && { AC_CHECK_LIB(png, png_read_image,[:],with_png=no) }
|
371
|
3504 if test -z "$with_png"; then
|
373
|
3505 AC_MSG_CHECKING(for workable png version information)
|
|
3506 xe_check_libs="-lpng -lz"
|
|
3507 AC_TRY_RUN([#include <png.h>
|
|
3508 int main(int c, char **v) {
|
|
3509 if (c == 1) return 0;
|
|
3510 if (strcmp(png_libpng_ver, PNG_LIBPNG_VER_STRING) != 0) return 1;
|
|
3511 return (PNG_LIBPNG_VER < 10002) ? 2 : 0 ;}],
|
|
3512 [./conftest dummy_arg; png_status=$?;
|
|
3513 if test "$png_status" = "0"; then
|
|
3514 with_png=yes;
|
|
3515 else
|
|
3516 with_png=no;
|
|
3517 if test "$png_status" = "1"; then
|
|
3518 png_problem="PNG library version and header file don't match!"
|
|
3519 elif test "$png_status" = "2"; then
|
|
3520 png_problem="PNG library version too old (pre 1.0.2)!"
|
|
3521 fi
|
|
3522 echo "
|
|
3523 *** WARNING *** $png_problem
|
|
3524 I'm not touching that with a 10-foot pole!
|
|
3525 If you really want to use the installed version of libPNG, rerun
|
|
3526 configure and add '--with-png=yes', but don't blame me if XEmacs crashes!"
|
|
3527 fi],
|
|
3528 [with_png=no])
|
|
3529 xe_check_libs=
|
|
3530 AC_MSG_RESULT($with_png)
|
371
|
3531 fi
|
251
|
3532 if test "$with_png" = "yes"; then
|
|
3533 AC_DEFINE(HAVE_PNG)
|
272
|
3534 XE_PREPEND(-lpng, libs_x)
|
251
|
3535 fi
|
|
3536
|
|
3537 dnl autodetect TIFF
|
286
|
3538 test -z "$with_tiff" && { AC_CHECK_HEADER(tiffio.h, ,with_tiff=no) }
|
|
3539 test -z "$with_tiff" && { AC_CHECK_LIB(tiff, TIFFClientOpen,[:],with_tiff=no) }
|
272
|
3540 test -z "$with_tiff" && with_tiff=yes
|
251
|
3541 if test "$with_tiff" = "yes"; then
|
|
3542 AC_DEFINE(HAVE_TIFF)
|
272
|
3543 XE_PREPEND(-ltiff, libs_x)
|
251
|
3544 fi
|
278
|
3545 fi
|
|
3546
|
|
3547 dnl ----------------------
|
462
|
3548 dnl GTK-Specific Graphics libraries
|
|
3549 dnl ----------------------
|
|
3550
|
|
3551 if test "$with_gtk" = "yes"; then
|
|
3552 dnl Autodetect XFACE
|
|
3553 test -z "$with_xface" && { AC_CHECK_HEADER(compface.h, ,with_xface=no) }
|
|
3554 test -z "$with_xface" && { AC_CHECK_LIB(compface, UnGenFace,[:] ,with_xface=no) }
|
|
3555 test -z "$with_xface" && with_xface=yes
|
|
3556 if test "$with_xface" = "yes"; then
|
|
3557 AC_DEFINE(HAVE_XFACE)
|
|
3558 XE_PREPEND(-lcompface, libs_gtk)
|
|
3559 fi
|
|
3560 fi
|
|
3561
|
|
3562
|
|
3563 dnl ----------------------
|
373
|
3564 dnl X-Specific Graphics libraries
|
278
|
3565 dnl ----------------------
|
|
3566
|
|
3567 if test "$with_x11" = "yes"; then
|
|
3568 AC_CHECKING(for X11 graphics libraries)
|
724
|
3569 fi
|
|
3570
|
726
|
3571 dnl We don't automatically trigger widgets if athena is present
|
|
3572 dnl because of stability concerns.
|
|
3573 dnl But if the user wants widgets, still offer him autodetections
|
|
3574 case "$with_widgets" in
|
|
3575 "yes" | "athena") detect_athena=yes ;;
|
|
3576 *) detect_athena=no ;;
|
|
3577 esac
|
|
3578
|
|
3579 if test "$with_x11" = "yes" -a "$detect_athena" = "yes" ; then
|
434
|
3580 AC_CHECKING(for the Athena widgets)
|
|
3581
|
|
3582 dnl What in heck did the user actually want?
|
|
3583 case "$with_athena" in
|
438
|
3584 dnl This is the default, old fashioned flat Athena.
|
434
|
3585 "xaw" | "") athena_variant=Xaw athena_3d=no ;;
|
|
3586 "3d") athena_variant=Xaw3d athena_3d=yes ;;
|
|
3587 "next") athena_variant=neXtaw athena_3d=yes ;;
|
|
3588 "95") athena_variant=Xaw95 athena_3d=yes ;;
|
|
3589 "xpm") athena_variant=XawXpm athena_3d=yes ;;
|
|
3590 *) XE_DIE("Unknown Athena widget set \`$with_athena'. This should not happen.") ;;
|
|
3591 esac
|
|
3592
|
|
3593 dnl Search for the Athena library...
|
|
3594 if test "$athena_3d" = "no"; then
|
438
|
3595 AC_CHECK_LIB($athena_variant, XawScrollbarSetThumb,
|
434
|
3596 [
|
|
3597 dnl Must not be a 3d library...
|
438
|
3598 AC_CHECK_LIB($athena_variant, threeDClassRec,
|
559
|
3599 AC_MSG_WARN([Could not find a non-3d Athena widget library.]),
|
434
|
3600 athena_lib=$athena_variant)
|
438
|
3601 ],
|
559
|
3602 AC_MSG_WARN([Could not find an Athena widget library.]))
|
434
|
3603 else
|
|
3604 dnl The real configuration, need 3d library
|
|
3605 AC_CHECK_LIB($athena_variant, threeDClassRec, athena_lib=$athena_variant,
|
|
3606 dnl OK, couldn't find it with a proper name, try the standard Athena lib
|
|
3607 dnl If that is 3d, presume the user asked for what they have installed.
|
438
|
3608 AC_CHECK_LIB(Xaw, threeDClassRec,
|
434
|
3609 [
|
438
|
3610 athena_lib=Xaw;
|
559
|
3611 AC_MSG_WARN([Assuming that libXaw is actually $athena_variant.]);
|
434
|
3612 ],
|
559
|
3613 AC_MSG_WARN([Could not find a 3d Athena widget library that looked like $athena_variant.])))
|
434
|
3614 fi
|
|
3615
|
|
3616 dnl Now we locate the Athena headers that we need.
|
|
3617 if test "$athena_3d" = "no"; then
|
|
3618 AC_CHECK_HEADER(X11/Xaw/ThreeD.h,
|
559
|
3619 AC_MSG_WARN([Could not find a non-3d Athena header set.]),
|
434
|
3620 AC_CHECK_HEADER(X11/Xaw/XawInit.h,
|
|
3621 athena_h_path=X11/Xaw,
|
559
|
3622 AC_MSG_WARN([Could not find a non-3d Athena header set.])))
|
434
|
3623 else
|
|
3624 dnl The three-d Athena headers are so much more slippery.
|
|
3625 dnl Curse this `Lets replace standard libraries' thing that they did. :/
|
|
3626 AC_CHECK_HEADER(X11/$athena_variant/XawInit.h,
|
|
3627 AC_CHECK_HEADER(X11/$athena_variant/ThreeD.h,
|
|
3628 athena_h_path=X11/$athena_variant,))
|
|
3629
|
440
|
3630 dnl Is the variant specific header directory directly under include?
|
|
3631 if test -z "$athena_h_path"; then
|
|
3632 AC_CHECK_HEADER($athena_variant/XawInit.h,
|
|
3633 AC_CHECK_HEADER($athena_variant/ThreeD.h,
|
|
3634 athena_h_path=$athena_variant,))
|
|
3635 fi
|
|
3636
|
434
|
3637 dnl If we couldn't find the specific variant, try the generic Athena 3d headers
|
|
3638 if test -z "$athena_h_path" -a "$athena_variant" != "Xaw3d"; then
|
|
3639 AC_CHECK_HEADER(X11/Xaw3d/XawInit.h,
|
|
3640 AC_CHECK_HEADER(X11/Xaw3d/ThreeD.h,
|
|
3641 [
|
559
|
3642 AC_MSG_WARN([Assuming that X11/Xaw3d headers are suitable for $athena_variant.])
|
434
|
3643 athena_h_path=X11/Xaw3d
|
|
3644 ],))
|
|
3645 fi
|
|
3646
|
440
|
3647 dnl Also generic 3d headers directly under include dir
|
|
3648 if test -z "$athena_h_path" -a "$athena_variant" != "Xaw3d"; then
|
|
3649 AC_CHECK_HEADER(Xaw3d/XawInit.h,
|
|
3650 AC_CHECK_HEADER(Xaw3d/ThreeD.h,
|
|
3651 [
|
559
|
3652 AC_MSG_WARN([Assuming that Xaw3d headers are suitable for $athena_variant.])
|
440
|
3653 athena_h_path=Xaw3d
|
|
3654 ],))
|
|
3655 fi
|
|
3656
|
434
|
3657 dnl If nothing yet found, see if Xaw is a 3d header set...
|
|
3658 dnl We AC_MSG_WARN if we fail because I am all out of ideas...
|
|
3659 if test -z "$athena_h_path"; then
|
|
3660 AC_CHECK_HEADER(X11/Xaw/ThreeD.h,
|
|
3661 [
|
559
|
3662 AC_MSG_WARN([Assuming that X11/Xaw headers are suitable for $athena_variant.])
|
434
|
3663 athena_h_path=X11/Xaw
|
|
3664 ],
|
559
|
3665 AC_MSG_WARN([Could not find a suitable 3d Athena header set.]))
|
434
|
3666 fi
|
|
3667 fi
|
|
3668
|
|
3669 dnl Do we actually have a usable Athena widget set? Please?
|
|
3670 if test -n "$athena_lib" -a -n "$athena_h_path"; then
|
|
3671 have_xaw=yes
|
|
3672 else
|
|
3673 have_xaw=no
|
|
3674 fi
|
424
|
3675
|
724
|
3676 else
|
|
3677 have_xaw=no
|
726
|
3678 fi dnl "$with_x11" = "yes" -a "detect_athena" = "yes"
|
724
|
3679
|
|
3680 if test "$with_x11" = "yes"; then
|
193
|
3681 dnl autodetect Motif - but only add to libs_x later (if necessary)
|
151
|
3682 AC_CHECK_HEADER(Xm/Xm.h,
|
|
3683 [AC_CHECK_LIB(Xm, XmStringFree, have_motif=yes, have_motif=no)],
|
|
3684 have_motif=no)
|
|
3685
|
272
|
3686 if test "$have_motif" = "yes"; then
|
|
3687 dnl autodetect lesstif
|
|
3688 AC_MSG_CHECKING(for Lesstif)
|
|
3689 AC_EGREP_CPP(yes,
|
|
3690 [#include <Xm/Xm.h>
|
|
3691 #ifdef LESSTIF_VERSION
|
|
3692 yes
|
|
3693 #endif
|
|
3694 ], have_lesstif=yes, have_lesstif=no)
|
|
3695 AC_MSG_RESULT($have_lesstif)
|
|
3696 fi
|
|
3697
|
193
|
3698 fi dnl "$with_x11" = "yes"
|
|
3699
|
149
|
3700 dnl Finish ensuring that we have values for the various toolkit items.
|
|
3701 dnl Not all toolkits support all widgets
|
|
3702 dnl if Motif is available we use it for the dialog boxes.
|
|
3703
|
434
|
3704 case "$with_menubars" in "" | "yes" | "athena" )
|
149
|
3705 with_menubars="lucid" ;;
|
|
3706 esac
|
243
|
3707 case "$with_dialogs" in "" | "yes" | "lucid" )
|
434
|
3708 if test "$have_motif" = "yes"; then with_dialogs="motif"
|
|
3709 elif test "$have_xaw" = "yes"; then with_dialogs="athena"
|
771
|
3710 elif test "$with_msw" = "yes"; then with_dialogs="msw"
|
149
|
3711 else with_dialogs=no
|
|
3712 fi ;;
|
|
3713 esac
|
|
3714 case "$with_scrollbars" in "" | "yes" )
|
|
3715 with_scrollbars="lucid" ;;
|
|
3716 esac
|
424
|
3717 case "$with_widgets" in "" | "yes" | "lucid")
|
420
|
3718 if test "$have_motif" = "yes"; then with_widgets="motif"
|
424
|
3719 elif test "$have_xaw" = "yes"; then with_widgets="athena"
|
771
|
3720 elif test "$with_msw" = "yes"; then with_widgets="msw"
|
420
|
3721 else with_widgets=no
|
|
3722 fi ;;
|
|
3723 esac
|
|
3724
|
|
3725 all_widgets="$with_menubars $with_scrollbars $with_dialogs $with_toolbars $with_widgets"
|
412
|
3726
|
424
|
3727 case "$all_widgets" in
|
434
|
3728 *athena* )
|
|
3729 if test "$have_xaw" != "yes"; then
|
|
3730 XE_DIE("Could not find a suitable Athena library to build with.")
|
|
3731 fi
|
|
3732
|
|
3733 dnl Add the Lucid widget Athena code
|
|
3734 XE_APPEND(lwlib-Xaw.o, lwlib_objs)
|
|
3735
|
|
3736 dnl Add the Athena widget library we located earlier
|
|
3737 XE_PREPEND(-l$athena_lib, libs_x)
|
|
3738
|
442
|
3739 dnl Tell lwlib where to find the Athena header files.
|
|
3740 dnl Many people have tried to create a `smart' way of doing this,
|
|
3741 dnl but all have failed. Before changing the following ugly definitions,
|
|
3742 dnl consult the veterans of many a battle.
|
|
3743 AC_DEFINE_UNQUOTED(ATHENA_Scrollbar_h_,"$athena_h_path/Scrollbar.h")
|
|
3744 AC_DEFINE_UNQUOTED(ATHENA_Dialog_h_,"$athena_h_path/Dialog.h")
|
|
3745 AC_DEFINE_UNQUOTED(ATHENA_Form_h_,"$athena_h_path/Form.h")
|
|
3746 AC_DEFINE_UNQUOTED(ATHENA_Command_h_,"$athena_h_path/Command.h")
|
|
3747 AC_DEFINE_UNQUOTED(ATHENA_Label_h_,"$athena_h_path/Label.h")
|
|
3748 AC_DEFINE_UNQUOTED(ATHENA_LabelP_h_,"$athena_h_path/LabelP.h")
|
|
3749 AC_DEFINE_UNQUOTED(ATHENA_Toggle_h_,"$athena_h_path/Toggle.h")
|
|
3750 AC_DEFINE_UNQUOTED(ATHENA_ToggleP_h_,"$athena_h_path/ToggleP.h")
|
|
3751 AC_DEFINE_UNQUOTED(ATHENA_AsciiText_h_,"$athena_h_path/AsciiText.h")
|
|
3752 AC_DEFINE_UNQUOTED(ATHENA_XawInit_h_,"$athena_h_path/XawInit.h")
|
434
|
3753
|
|
3754 AC_DEFINE(LWLIB_USES_ATHENA)
|
|
3755 AC_DEFINE(NEED_ATHENA)
|
442
|
3756 need_athena="yes"
|
434
|
3757
|
|
3758 if test "$athena_3d" = "yes"; then
|
|
3759 AC_DEFINE(HAVE_ATHENA_3D)
|
|
3760 fi
|
|
3761 ;;
|
70
|
3762 esac
|
|
3763
|
149
|
3764 case "$all_widgets" in *motif* )
|
|
3765 AC_DEFINE(LWLIB_USES_MOTIF)
|
157
|
3766 AC_DEFINE(NEED_MOTIF)
|
|
3767 XE_APPEND(lwlib-Xm.o, lwlib_objs)
|
149
|
3768 need_motif=yes ;;
|
|
3769 esac
|
|
3770
|
157
|
3771 test "$with_menubars" = "lucid" && XE_APPEND(xlwmenu.o, lwlib_objs)
|
219
|
3772 test "$with_menubars" = "motif" && XE_APPEND(xlwmenu.o, lwlib_objs)
|
157
|
3773 test "$with_scrollbars" = "lucid" && XE_APPEND(xlwscrollbar.o, lwlib_objs)
|
424
|
3774 test "$with_widgets" != "no" && test "$with_widgets" != "msw" && \
|
|
3775 XE_APPEND(xlwtabs.o xlwgcs.o, lwlib_objs)
|
|
3776 case "$with_widgets" in athena* )
|
|
3777 XE_APPEND(xlwradio.o xlwcheckbox.o xlwgauge.o, lwlib_objs);;
|
|
3778 esac
|
157
|
3779 case "$all_widgets" in *lucid* )
|
|
3780 AC_DEFINE(NEED_LUCID)
|
|
3781 XE_APPEND(lwlib-Xlw.o, lwlib_objs) ;;
|
|
3782 esac
|
|
3783
|
|
3784 AC_SUBST(lwlib_objs)
|
|
3785
|
434
|
3786 test "$with_scrollbars" = "athena" && AC_DEFINE(LWLIB_SCROLLBARS_ATHENA)
|
|
3787 test "$with_dialogs" = "athena" && AC_DEFINE(LWLIB_DIALOGS_ATHENA)
|
|
3788
|
|
3789 if test "$athena_3d" = "yes"; then
|
|
3790 test "$with_scrollbars" = "athena" && AC_DEFINE(LWLIB_SCROLLBARS_ATHENA3D)
|
|
3791 test "$with_dialogs" = "athena" && AC_DEFINE(LWLIB_DIALOGS_ATHENA3D)
|
|
3792 fi
|
|
3793
|
424
|
3794 case "$with_widgets" in athena* ) AC_DEFINE(LWLIB_WIDGETS_ATHENA);; esac
|
|
3795 test "$with_widgets" != "no" && test "$with_widgets" != "msw" && \
|
|
3796 AC_DEFINE(LWLIB_TABS_LUCID)
|
149
|
3797
|
|
3798 test "$with_menubars" != "no" && AC_DEFINE(HAVE_MENUBARS)
|
|
3799 test "$with_scrollbars" != "no" && AC_DEFINE(HAVE_SCROLLBARS)
|
|
3800 test "$with_dialogs" != "no" && AC_DEFINE(HAVE_DIALOGS)
|
|
3801 test "$with_toolbars" != "no" && AC_DEFINE(HAVE_TOOLBARS)
|
440
|
3802 test "$with_widgets" != "no" && AC_DEFINE(HAVE_WIDGETS)
|
149
|
3803
|
|
3804 test "$with_menubars" = "lucid" && AC_DEFINE(LWLIB_MENUBARS_LUCID)
|
|
3805 test "$with_scrollbars" = "lucid" && AC_DEFINE(LWLIB_SCROLLBARS_LUCID)
|
|
3806
|
|
3807 test "$with_menubars" = "motif" && AC_DEFINE(LWLIB_MENUBARS_MOTIF)
|
|
3808 test "$with_scrollbars" = "motif" && AC_DEFINE(LWLIB_SCROLLBARS_MOTIF)
|
|
3809 test "$with_dialogs" = "motif" && AC_DEFINE(LWLIB_DIALOGS_MOTIF)
|
424
|
3810 test "$with_widgets" = "motif" && AC_DEFINE(LWLIB_WIDGETS_MOTIF)
|
412
|
3811
|
151
|
3812 dnl ----------------------
|
|
3813 dnl Mule-dependent options
|
|
3814 dnl ----------------------
|
|
3815
|
272
|
3816 test -z "$with_mule" && with_mule=no
|
149
|
3817
|
227
|
3818 dnl if test "$with_mule" = "yes" && test ! -d "$srcdir/lisp/mule"; then
|
|
3819 dnl echo "Attempt to Build with Mule without Mule/Lisp"
|
|
3820 dnl echo "Please install the XEmacs/Mule tarball or"
|
|
3821 dnl echo "rerun configure with --with-mule=no"
|
|
3822 dnl exit 1
|
|
3823 dnl fi
|
207
|
3824
|
771
|
3825 if test "$with_default_eol_detection" = "yes"; then
|
|
3826 AC_DEFINE(HAVE_DEFAULT_EOL_DETECTION)
|
559
|
3827 fi
|
|
3828
|
70
|
3829 if test "$with_mule" = "yes" ; then
|
151
|
3830 AC_CHECKING(for Mule-related features)
|
149
|
3831 AC_DEFINE(MULE)
|
|
3832
|
|
3833 dnl Use -lintl to get internationalized strerror for Mule
|
155
|
3834 AC_CHECK_HEADERS(libintl.h)
|
149
|
3835 AC_CHECK_LIB(intl, strerror)
|
|
3836
|
|
3837 AC_CHECKING(for Mule input methods)
|
|
3838 dnl Do we have the XmIm* routines? And if so, do we want to use them?
|
151
|
3839 dnl XIM seems to be flaky except on Solaris...
|
272
|
3840 dnl test -z "$with_xim" -a "$opsys" != "sol2" && with_xim=no
|
149
|
3841 case "$with_xim" in "" | "yes" )
|
|
3842 AC_CHECKING(for XIM)
|
392
|
3843 AC_CHECK_LIB(X11, XOpenIM, with_xim=xlib, with_xim=no)
|
272
|
3844 dnl XIM + Lesstif is not (yet?) usable
|
392
|
3845 if test "$have_motif $have_lesstif" = "yes no"; then
|
|
3846 AC_CHECK_LIB(Xm, XmImMbLookupString, with_xim=motif)
|
|
3847 fi ;;
|
149
|
3848 esac
|
272
|
3849 if test "$with_xim" != "no"; then
|
70
|
3850 AC_DEFINE(HAVE_XIM)
|
149
|
3851 if test "$with_xim" = "xlib"; then
|
|
3852 AC_DEFINE(XIM_XLIB)
|
151
|
3853 XE_ADD_OBJS(input-method-xlib.o)
|
|
3854 fi
|
149
|
3855 if test "$with_xim" = "motif"; then
|
|
3856 AC_DEFINE(XIM_MOTIF)
|
|
3857 need_motif=yes
|
151
|
3858 XE_ADD_OBJS(input-method-motif.o)
|
70
|
3859 fi
|
215
|
3860 if test "$with_xim" = "motif"; then
|
177
|
3861 with_xfs=no
|
|
3862 fi
|
215
|
3863 fi
|
|
3864
|
392
|
3865 dnl "with_xfs" = "yes"
|
215
|
3866 if test "$with_xfs" = "yes" ; then
|
|
3867 AC_CHECKING(for XFontSet)
|
|
3868 AC_CHECK_LIB(X11, XmbDrawString, [:], with_xfs=no)
|
177
|
3869 if test "$with_xfs" = "yes" && test "$with_menubars" = "lucid"; then
|
|
3870 AC_DEFINE(USE_XFONTSET)
|
215
|
3871 if test "$with_xim" = "no" ; then
|
450
|
3872 XE_ADD_OBJS(input-method-xlib.o)
|
215
|
3873 fi
|
177
|
3874 fi
|
392
|
3875 fi dnl with_xfs
|
149
|
3876
|
|
3877 dnl Autodetect WNN
|
|
3878 test "$with_wnn6" = "yes" && with_wnn=yes # wnn6 implies wnn support
|
167
|
3879 test -z "$with_wnn" && { AC_CHECK_HEADER(wnn/jllib.h, ,with_wnn=no) }
|
458
|
3880 dnl gcc 2.97 fixincludes breaks inclusion of wnn/commonhd.h
|
|
3881 test -z "$with_wnn" && { AC_CHECK_HEADER(wnn/commonhd.h, ,with_wnn=no) }
|
167
|
3882 dnl Detour to find crypt
|
|
3883 if test "$with_wnn" != "no"; then
|
|
3884 AC_CHECK_FUNCS(crypt)
|
|
3885 test "$ac_cv_func_crypt" != "yes" && { AC_CHECK_LIB(crypt, crypt) }
|
|
3886 fi
|
|
3887 dnl Back to our regularly scheduled wnn hunting
|
377
|
3888 if test -z "$with_wnn" -o "$with_wnn" = "yes"; then
|
|
3889 AC_CHECK_LIB(wnn,jl_dic_list_e,libwnn=wnn,
|
|
3890 AC_CHECK_LIB(wnn4,jl_dic_list_e,libwnn=wnn4,
|
|
3891 AC_CHECK_LIB(wnn6,jl_dic_list_e,libwnn=wnn6,
|
|
3892 AC_CHECK_LIB(wnn6_fromsrc,dic_list_e,libwnn=wnn6_fromsrc,with_wnn=no))))
|
|
3893 fi
|
149
|
3894 test -z "$with_wnn" && with_wnn=yes
|
|
3895 if test "$with_wnn" = "yes"; then
|
|
3896 AC_DEFINE(HAVE_WNN)
|
377
|
3897 XE_PREPEND(-l$libwnn, libs_x)
|
284
|
3898 if test "$with_wnn6" != "no"; then
|
377
|
3899 AC_CHECK_LIB($libwnn, jl_fi_dic_list, with_wnn6=yes)
|
284
|
3900 test "$with_wnn6" = "yes" && AC_DEFINE(WNN6)
|
|
3901 fi
|
151
|
3902 fi
|
149
|
3903
|
|
3904 dnl Autodetect canna
|
267
|
3905 canna_includes_found=no
|
|
3906 if test "$with_canna" != "no"; then
|
|
3907 AC_CHECK_HEADER(canna/jrkanji.h,canna_includes_found=yes)
|
|
3908 fi
|
|
3909 if test "$canna_includes_found" = "no" -a "$with_canna" != "no" -a \
|
|
3910 -d "/usr/local/canna/include"; then
|
|
3911 save_c_switch_site="$c_switch_site"
|
|
3912 c_switch_site="$c_switch_site -I/usr/local/canna/include"
|
|
3913 AC_CHECK_HEADER(canna/jrkanji.h,canna_includes_found=yes)
|
|
3914 if test "$canna_includes_found" != "yes"; then
|
|
3915 c_switch_site="$save_c_switch_site"
|
|
3916 with_canna="no"
|
|
3917 fi
|
|
3918 fi
|
|
3919
|
149
|
3920 test -z "$with_canna" && { AC_CHECK_HEADER(canna/RK.h, , with_canna=no) }
|
|
3921 test -z "$with_canna" && { AC_CHECK_LIB(RKC, RkBgnBun, [:],with_canna=no) }
|
|
3922 test -z "$with_canna" && { AC_CHECK_LIB(canna,jrKanjiControl,[:],with_canna=no) }
|
|
3923 test -z "$with_canna" && with_canna=yes
|
|
3924 if test "$with_canna" = "yes"; then
|
|
3925 AC_DEFINE(HAVE_CANNA)
|
151
|
3926 XE_PREPEND(-lcanna -lRKC, libs_x)
|
|
3927 fi
|
155
|
3928
|
151
|
3929 else dnl "$with_mule" = "no"
|
149
|
3930 for feature in xim canna wnn; do
|
|
3931 if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
|
559
|
3932 AC_MSG_WARN([--with-${feature} ignored: Not valid without Mule support])
|
149
|
3933 fi
|
|
3934 eval "with_${feature}=no"
|
100
|
3935 done
|
151
|
3936 fi dnl with_mule
|
100
|
3937
|
149
|
3938
|
|
3939 dnl At this point, we know whether we need the motif lib or not.
|
151
|
3940 if test "$need_motif" = "yes" ; then
|
|
3941 XE_PREPEND(-lXm, libs_x)
|
207
|
3942 dnl AIX needs the following library for use with Motif
|
|
3943 AC_CHECK_LIB(i18n, layout_object_getvalue, [XE_PREPEND(-li18n, libs_x)])
|
151
|
3944 XE_COMPUTE_RUNPATH()
|
|
3945 fi
|
|
3946
|
1070
|
3947 dnl ----------------------------------------------------------------
|
|
3948 dnl Check for POSIX functions.
|
|
3949 dnl ----------------------------------------------------------------
|
|
3950
|
1111
|
3951 AC_CHECK_FUNCS(cbrt closedir dup2 eaccess fmod fpathconf frexp ftime getaddrinfo gethostname getnameinfo getpagesize gettimeofday getcwd getwd link logb lrand48 matherr mkdir mktime perror poll random readlink rename res_init rint rmdir select setitimer setpgid setlocale setsid sigblock sighold sigprocmask snprintf stpcpy strerror symlink tzset ulimit usleep waitpid vsnprintf fsync ftruncate umask wcslen wcscmp)
|
442
|
3952
|
1070
|
3953 dnl getaddrinfo() is borked under hpux11
|
|
3954 if test "$ac_cv_func_getaddrinfo" != "no" ; then
|
|
3955 case "$opsys" in
|
|
3956 hpux11 )
|
|
3957 AC_MSG_WARN([Use of getaddrinfo is disabled for HP-UX 11.XX.])
|
|
3958 ac_cv_func_getaddrinfo=no
|
|
3959 ;;
|
|
3960 esac
|
|
3961 fi
|
|
3962
|
458
|
3963 dnl ----------------------------------------------------------------
|
535
|
3964 dnl Check for Unixoid pty/process support.
|
458
|
3965 dnl ----------------------------------------------------------------
|
|
3966
|
|
3967 dnl There is no "standard" pty allocation method. Every system is different.
|
|
3968 dnl getpt() is the preferred pty allocation method on glibc systems.
|
|
3969 dnl _getpty() is the preferred pty allocation method on SGI systems.
|
|
3970 dnl grantpt(), unlockpt(), ptsname() are defined by Unix98.
|
444
|
3971 AC_CHECK_FUNCS(getpt _getpty grantpt unlockpt ptsname killpg tcgetpgrp)
|
442
|
3972
|
458
|
3973 dnl openpty() is the preferred pty allocation method on BSD and Tru64 systems.
|
|
3974 dnl openpty() might be declared in:
|
|
3975 dnl - pty.h (Tru64 or Linux)
|
|
3976 dnl - libutil.h (FreeBSD)
|
|
3977 dnl - util.h (NetBSD)
|
442
|
3978 AC_CHECK_FUNC(openpty, have_openpty=yes, [
|
|
3979 AC_CHECK_LIB(util, openpty, have_openpty=yes need_libutil=yes)])
|
|
3980 if test "$have_openpty" = "yes"; then
|
|
3981 AC_DEFINE(HAVE_OPENPTY)
|
535
|
3982 AC_CHECK_HEADERS(libutil.h util.h, break)
|
442
|
3983 test "$need_libutil" = "yes" && XE_APPEND(-lutil, libs_system)
|
|
3984 fi
|
|
3985
|
535
|
3986 dnl Check for system-specific pty header files
|
|
3987 dnl Often the TIOCSIG* symbols are hiding there.
|
|
3988 case "$opsys" in
|
|
3989 dnl HPUX pty.h #defines TRUE and FALSE, so just use ptyio.h there.
|
|
3990 hpux*) AC_CHECK_HEADERS(sys/ptyio.h) ;;
|
|
3991 *) AC_CHECK_HEADERS(pty.h)
|
|
3992 test "$ac_cv_header_pty_h" = "no" && AC_CHECK_HEADERS(sys/pty.h)
|
|
3993 ;;
|
|
3994 esac
|
|
3995
|
442
|
3996 dnl Check for STREAM support functions.
|
|
3997 dnl Confusingly, "str" means both "string" and "SysV Streams".
|
444
|
3998 AC_CHECK_HEADERS(stropts.h)
|
|
3999 if test "$ac_cv_header_stropts_h" = "yes"; then
|
442
|
4000 AC_CHECK_FUNCS(isastream)
|
444
|
4001 AC_CHECK_HEADERS(strtio.h) dnl TIOCSIGNAL
|
442
|
4002 fi
|
440
|
4003
|
442
|
4004 dnl Check whether the system provides getloadavg().
|
398
|
4005 AC_CHECK_FUNCS(getloadavg)
|
|
4006
|
442
|
4007 if test "$ac_cv_func_getloadavg" = "yes"; then
|
|
4008 dnl Solaris 8 declares getloadavg() in <sys/loadavg.h>.
|
|
4009 dnl glibc 2.2 declares getloadavg() in <stdlib.h>...
|
|
4010 dnl ...if we #define _GNU_SOURCE, which we do.
|
|
4011 AC_CHECK_HEADERS(sys/loadavg.h)
|
|
4012 else
|
|
4013 dnl We define our own getloadavg() using lower level functions.
|
398
|
4014 XE_ADD_OBJS(getloadavg.o)
|
|
4015
|
|
4016 dnl Used by getloadavg() - does not require root priveleges
|
|
4017 AC_CHECK_LIB(kstat, kstat_open)
|
442
|
4018 AC_CHECK_HEADERS(kstat.h)
|
398
|
4019
|
|
4020 dnl Another way to get the load average
|
|
4021 AC_CHECK_LIB(kvm, kvm_read)
|
|
4022 fi
|
151
|
4023
|
149
|
4024 dnl If netdb.h does not declare h_errno, we must declare it by hand.
|
|
4025 AC_MSG_CHECKING(whether netdb declares h_errno)
|
|
4026 AC_TRY_LINK([#include <netdb.h>],
|
|
4027 [return h_errno;],
|
|
4028 [AC_MSG_RESULT(yes)
|
|
4029 AC_DEFINE(HAVE_H_ERRNO)],
|
|
4030 [AC_MSG_RESULT(no)])
|
|
4031
|
|
4032 AC_MSG_CHECKING(for sigsetjmp)
|
|
4033 AC_TRY_COMPILE([#include <setjmp.h>],
|
70
|
4034 [sigjmp_buf bar; sigsetjmp (bar, 0);],
|
149
|
4035 [AC_MSG_RESULT(yes)
|
|
4036 AC_DEFINE(HAVE_SIGSETJMP)],
|
|
4037 [AC_MSG_RESULT(no)])
|
|
4038
|
|
4039 AC_MSG_CHECKING(whether localtime caches TZ)
|
|
4040 AC_CACHE_VAL(emacs_cv_localtime_cache,
|
|
4041 [if test "$ac_cv_func_tzset" = "yes"; then
|
|
4042 AC_TRY_RUN([#include <time.h>
|
|
4043 #if STDC_HEADERS
|
0
|
4044 # include <stdlib.h>
|
|
4045 #endif
|
|
4046 extern char **environ;
|
|
4047 unset_TZ ()
|
|
4048 {
|
|
4049 char **from, **to;
|
|
4050 for (to = from = environ; (*to = *from); from++)
|
|
4051 if (! (to[0][0] == 'T' && to[0][1] == 'Z' && to[0][2] == '='))
|
|
4052 to++;
|
|
4053 }
|
149
|
4054 char TZ_GMT0[] = "TZ=GMT0";
|
|
4055 char TZ_PST8[] = "TZ=PST8";
|
0
|
4056 main()
|
|
4057 {
|
|
4058 time_t now = time ((time_t *) 0);
|
|
4059 int hour_GMT0, hour_unset;
|
149
|
4060 if (putenv (TZ_GMT0) != 0)
|
0
|
4061 exit (1);
|
|
4062 hour_GMT0 = localtime (&now)->tm_hour;
|
|
4063 unset_TZ ();
|
|
4064 hour_unset = localtime (&now)->tm_hour;
|
149
|
4065 if (putenv (TZ_PST8) != 0)
|
0
|
4066 exit (1);
|
|
4067 if (localtime (&now)->tm_hour == hour_GMT0)
|
|
4068 exit (1);
|
|
4069 unset_TZ ();
|
|
4070 if (localtime (&now)->tm_hour != hour_unset)
|
|
4071 exit (1);
|
|
4072 exit (0);
|
|
4073 }], emacs_cv_localtime_cache=no, emacs_cv_localtime_cache=yes,
|
|
4074 [# If we have tzset, assume the worst when cross-compiling.
|
|
4075 emacs_cv_localtime_cache=yes])
|
149
|
4076 else
|
|
4077 # If we lack tzset, report that localtime does not cache TZ,
|
|
4078 # since we can't invalidate the cache if we don't have tzset.
|
|
4079 emacs_cv_localtime_cache=no
|
|
4080 fi],[:])dnl
|
|
4081 AC_MSG_RESULT($emacs_cv_localtime_cache)
|
|
4082 if test $emacs_cv_localtime_cache = yes; then
|
0
|
4083 AC_DEFINE(LOCALTIME_CACHE)
|
|
4084 fi
|
|
4085
|
149
|
4086 if test "$HAVE_TIMEVAL" = "yes"; then
|
272
|
4087 AC_MSG_CHECKING(whether gettimeofday accepts one or two arguments)
|
149
|
4088 AC_TRY_LINK([
|
0
|
4089 #ifdef TIME_WITH_SYS_TIME
|
|
4090 #include <sys/time.h>
|
|
4091 #include <time.h>
|
|
4092 #else
|
|
4093 #ifdef HAVE_SYS_TIME_H
|
|
4094 #include <sys/time.h>
|
|
4095 #else
|
|
4096 #include <time.h>
|
|
4097 #endif
|
|
4098 #endif
|
|
4099 ],
|
|
4100 [
|
|
4101 struct timeval time;
|
442
|
4102 gettimeofday (&time, 0);
|
0
|
4103 ],
|
272
|
4104 [AC_MSG_RESULT(two)],
|
|
4105 [AC_MSG_RESULT(one)
|
0
|
4106 AC_DEFINE(GETTIMEOFDAY_ONE_ARGUMENT)])
|
|
4107 fi
|
|
4108
|
149
|
4109
|
|
4110 AC_C_INLINE
|
442
|
4111 test "$ac_cv_c_inline" != "no" -a "$GCC" = "yes" && XE_ADD_OBJS(inline.o)
|
149
|
4112
|
175
|
4113 dnl HP-UX has a working alloca in libPW.
|
177
|
4114 dnl case "${GCC}${opsys}" in hpux* )
|
|
4115 dnl AC_CHECK_FUNC(alloca, [:], [AC_CHECK_LIB(PW, alloca)])
|
|
4116 dnl esac
|
149
|
4117
|
444
|
4118 dnl AC_FUNC_ALLOCA doesn't know about DEC C's #pragma intrinsic(alloca)
|
|
4119 if test "$__DECC" != "yes"; then
|
|
4120 AC_FUNC_ALLOCA
|
|
4121 test -n "$ALLOCA" && XE_ADD_OBJS($ALLOCA)
|
|
4122 fi
|
149
|
4123
|
|
4124 dnl Check whether strcoll exists and works correctly. (This does more
|
|
4125 dnl than just check for its existence.) If so, it defines HAVE_STRCOLL.
|
|
4126 AC_FUNC_STRCOLL
|
|
4127
|
163
|
4128 dnl If `getpgrp' takes no argument (the POSIX.1 version), define
|
|
4129 dnl `GETPGRP_VOID'. Otherwise, it is the BSD version, which takes a
|
|
4130 dnl process ID as an argument.
|
|
4131 AC_CHECK_FUNCS(getpgrp)
|
|
4132 AC_FUNC_GETPGRP
|
|
4133
|
153
|
4134 dnl We used to call AC_FUNC_MMAP here
|
|
4135 dnl Instead we now use following, suggested by Neal Becker
|
|
4136 AC_MSG_CHECKING(for working mmap)
|
155
|
4137 case "$opsys" in ultrix* ) have_mmap=no ;; *)
|
153
|
4138 AC_TRY_RUN([#include <stdio.h>
|
|
4139 #include <unistd.h>
|
|
4140 #include <fcntl.h>
|
|
4141 #include <sys/mman.h>
|
|
4142
|
|
4143 #ifndef MAP_VARIABLE
|
|
4144 #define MAP_VARIABLE 0
|
|
4145 #endif
|
|
4146
|
|
4147 #ifndef MAP_FAILED
|
|
4148 #define MAP_FAILED -1
|
|
4149 #endif
|
|
4150
|
|
4151 int main (int argc, char *argv[])
|
|
4152 {
|
|
4153 int fd = -1;
|
|
4154 caddr_t p;
|
|
4155 #ifndef MAP_ANONYMOUS
|
|
4156 fd = open ("/dev/zero", O_RDWR);
|
|
4157 if (fd < 0)
|
|
4158 return 1;
|
|
4159 #define MAP_ANONYMOUS 0
|
|
4160 #endif
|
|
4161 if (mmap(0, 1024, PROT_READ | PROT_WRITE,
|
|
4162 MAP_PRIVATE | MAP_VARIABLE | MAP_ANONYMOUS,
|
|
4163 fd, 0) != (void *) MAP_FAILED)
|
|
4164 return 0;
|
|
4165 perror ("conftest: mmap failed");
|
|
4166 return 1;
|
155
|
4167 }], have_mmap=yes, have_mmap=no) ;;
|
|
4168 esac
|
153
|
4169 AC_MSG_RESULT($have_mmap)
|
|
4170 test "$have_mmap" = "yes" && AC_DEFINE(HAVE_MMAP)
|
149
|
4171
|
462
|
4172 dnl By default we switch off rel-alloc on cygwin as it generally causes us grief
|
535
|
4173 case "$opsys" in cygwin*)
|
462
|
4174 test "$rel_alloc" = "default" && rel_alloc=no ;;
|
|
4175 esac
|
149
|
4176 dnl rel_alloc requires either GNU malloc or system malloc with mmap
|
|
4177 dnl We only turn rel_alloc on by default if mmap is available.
|
442
|
4178 test "$GNU_MALLOC" != "yes" -a "$have_mmap" != "yes" && rel_alloc=no
|
|
4179 if test "$rel_alloc $have_mmap" = "default yes"; then
|
|
4180 if test "$doug_lea_malloc" = "yes"; then
|
|
4181 dnl Check if malloc() calls mmap(), making rel_alloc pointless.
|
|
4182 AC_MSG_CHECKING(for M_MMAP_THRESHOLD)
|
|
4183 AC_TRY_COMPILE([#include <malloc.h>],[
|
|
4184 #ifndef M_MMAP_THRESHOLD
|
|
4185 #error No M_MMAP_THRESHOLD :-(
|
|
4186 !@+$%^&*_)(_ - unlikely to compile...
|
|
4187 #endif
|
|
4188 ], [rel_alloc=no; AC_MSG_RESULT(yes);], [rel_alloc=yes; AC_MSG_RESULT(no);])
|
|
4189 else
|
|
4190 rel_alloc=yes
|
|
4191 fi
|
|
4192 fi
|
149
|
4193 test "$rel_alloc" = "yes" && AC_DEFINE(REL_ALLOC)
|
|
4194
|
175
|
4195 dnl Check for terminal I/O variants
|
|
4196 dnl TERMIOS systems may have termio.h, but not vice-versa, I think.
|
187
|
4197 AC_CHECK_HEADER(termios.h,
|
175
|
4198 AC_DEFINE(HAVE_TERMIOS)
|
|
4199 AC_DEFINE(SIGNALS_VIA_CHARACTERS)
|
|
4200 AC_DEFINE(NO_TERMIO),
|
|
4201 [AC_CHECK_HEADER(termio.h, [AC_DEFINE(HAVE_TERMIO)])])
|
|
4202
|
|
4203
|
149
|
4204 dnl Check for Internet sockets.
|
|
4205 AC_CHECK_FUNC(socket,
|
|
4206 [AC_CHECK_HEADER(netinet/in.h,
|
|
4207 [AC_CHECK_HEADER(arpa/inet.h, [
|
0
|
4208 AC_DEFINE(HAVE_SOCKETS)
|
149
|
4209 AC_MSG_CHECKING("for sun_len member in struct sockaddr_un")
|
|
4210 AC_TRY_LINK([
|
|
4211 #include <sys/types.h>
|
|
4212 #include <sys/socket.h>
|
|
4213 #include <sys/un.h>
|
|
4214 ],
|
|
4215 [static struct sockaddr_un x; x.sun_len = 1;],
|
|
4216 [AC_MSG_RESULT(yes); AC_DEFINE(HAVE_SOCKADDR_SUN_LEN)],
|
259
|
4217 [AC_MSG_RESULT(no)])
|
|
4218 AC_MSG_CHECKING("for ip_mreq struct in netinet/in.h")
|
|
4219 AC_TRY_LINK([
|
284
|
4220 #include <sys/types.h>
|
259
|
4221 #include <netinet/in.h>
|
|
4222 ],
|
|
4223 [static struct ip_mreq x;],
|
|
4224 [AC_MSG_RESULT(yes); AC_DEFINE(HAVE_MULTICAST)],
|
149
|
4225 [AC_MSG_RESULT(no)])])])])
|
|
4226
|
|
4227 dnl Check for SYS V IPC. (Inferior to sockets.)
|
|
4228 AC_CHECK_FUNC(msgget,
|
|
4229 [AC_CHECK_HEADER(sys/ipc.h,
|
|
4230 [AC_CHECK_HEADER(sys/msg.h,
|
|
4231 [AC_DEFINE(HAVE_SYSVIPC)])])])
|
|
4232
|
|
4233 dnl Check for directory variants
|
|
4234 AC_CHECK_HEADER(dirent.h, [AC_DEFINE(SYSV_SYSTEM_DIR)],
|
|
4235 [AC_CHECK_HEADER(sys/dir.h, , [AC_DEFINE(NONSYSTEM_DIR_LIBRARY)])])
|
|
4236
|
|
4237 dnl Check for nlist.h
|
|
4238 AC_CHECK_HEADER(nlist.h, AC_DEFINE(NLIST_STRUCT), )
|
|
4239
|
|
4240 dnl Check for sound of various sorts.
|
|
4241
|
|
4242 dnl Autodetect native sound
|
|
4243 AC_CHECKING("for sound support")
|
155
|
4244 test -z "$with_native_sound" -a -n "$native_sound_lib" && with_native_sound=yes
|
|
4245
|
149
|
4246 if test "$with_native_sound" != "no"; then
|
155
|
4247 dnl Maybe sound is already on include path...
|
|
4248 if test -n "$native_sound_lib"; then
|
|
4249 AC_CHECK_HEADER(multimedia/audio_device.h,
|
|
4250 [sound_found=yes sound_cflags=""
|
|
4251 XE_ADD_OBJS(sunplay.o)])
|
|
4252 fi
|
|
4253
|
149
|
4254 dnl Autodetect Sun native sound from SUNWaudmo package
|
155
|
4255 if test -z "$sound_found" -a -d "/usr/demo/SOUND"; then
|
|
4256 sound_found=yes
|
151
|
4257 XE_ADD_OBJS(sunplay.o)
|
149
|
4258 if test -d "/usr/demo/SOUND/include"
|
|
4259 then sound_cflags="-I/usr/demo/SOUND/include"
|
|
4260 else sound_cflags="-I/usr/demo/SOUND"
|
|
4261 fi
|
|
4262 if test -z "$native_sound_lib" ; then
|
|
4263 if test -r "/usr/demo/SOUND/lib/libaudio.a"
|
|
4264 then native_sound_lib="/usr/demo/SOUND/lib/libaudio.a"
|
|
4265 else native_sound_lib="/usr/demo/SOUND/libaudio.a"
|
|
4266 fi
|
|
4267 fi
|
155
|
4268 fi
|
|
4269
|
|
4270 dnl Check for SGI and HP native sound libs
|
|
4271 if test -z "$sound_found"; then
|
|
4272 case "$canonical" in
|
149
|
4273 *-sgi-* )
|
155
|
4274 if test -z "$native_sound_lib"; then
|
|
4275 AC_CHECK_LIB(audio, ALopenport, native_sound_lib="-laudio")
|
|
4276 fi
|
|
4277 if test -n "$native_sound_lib"; then
|
|
4278 sound_found=yes sound_cflags=""
|
151
|
4279 XE_ADD_OBJS(sgiplay.o)
|
149
|
4280 fi ;;
|
|
4281 hppa*-hp-hpux* )
|
155
|
4282 if test -z "$native_sound_lib"; then
|
|
4283 AC_CHECK_LIB(Alib, AOpenAudio, native_sound_lib="-lAlib")
|
|
4284 fi
|
|
4285 if test -n "$native_sound_lib"; then
|
|
4286 sound_found=yes
|
151
|
4287 XE_ADD_OBJS(hpplay.o)
|
169
|
4288 if test "$GCC" = "yes" # Kludge city
|
149
|
4289 then sound_cflags="-Dconst= -Dvolatile= -I/usr/audio/examples"
|
|
4290 else sound_cflags="+e -I/usr/audio/examples"
|
|
4291 fi
|
|
4292 fi ;;
|
0
|
4293 esac
|
|
4294 fi
|
149
|
4295
|
553
|
4296 dnl Win32 Native uses native sound
|
|
4297 if test -z "$sound_found"; then
|
|
4298 if test "$with_msw" = "yes"; then
|
594
|
4299 sound_found=yes
|
|
4300 native_sound_lib=
|
|
4301 XE_ADD_OBJS(ntplay.o)
|
553
|
4302 fi
|
|
4303 fi
|
|
4304
|
594
|
4305 dnl Check for Linux/BSD native sound (also on recent Cygwins)
|
149
|
4306 if test -z "$sound_found"; then
|
|
4307 for dir in "machine" "sys" "linux"; do
|
|
4308 AC_CHECK_HEADER(${dir}/soundcard.h,
|
|
4309 sound_found=yes
|
426
|
4310 need_miscplay=yes
|
151
|
4311 XE_ADD_OBJS(linuxplay.o)
|
442
|
4312 [AC_DEFINE_UNQUOTED(SOUNDCARD_H_FILE, "${dir}/soundcard.h")]
|
149
|
4313 break)
|
|
4314 done
|
|
4315 fi
|
|
4316
|
412
|
4317 test "$sound_found" = "yes" && with_native_sound=yes
|
|
4318 fi
|
|
4319
|
149
|
4320 if test "$with_native_sound" = "yes"; then
|
|
4321 AC_DEFINE(HAVE_NATIVE_SOUND)
|
151
|
4322 test -n "$native_sound_lib" && XE_PREPEND($native_sound_lib, LIBS)
|
0
|
4323 fi
|
|
4324
|
432
|
4325 dnl NAS Sound support
|
|
4326 if test "$with_nas_sound" != "no"; then
|
|
4327 AC_CHECK_HEADER(audio/audiolib.h, [
|
|
4328 AC_CHECK_LIB(audio, AuOpenServer, have_nas_sound=yes)])
|
|
4329 if test "$have_nas_sound" = "yes"; then
|
|
4330 with_nas_sound=yes
|
|
4331 AC_DEFINE(HAVE_NAS_SOUND)
|
|
4332 XE_ADD_OBJS(nas.o)
|
|
4333 XE_PREPEND(-laudio, libs_x)
|
|
4334 dnl If the nas library does not contain the error jump point,
|
|
4335 dnl then we force safer behavior.
|
|
4336 AC_EGREP_HEADER(AuXtErrorJump,audio/Xtutil.h,,[old_nas=yes; AC_DEFINE(NAS_NO_ERROR_JUMP)])
|
|
4337 else
|
|
4338 test "$with_nas_sound" = "yes" && \
|
|
4339 XE_DIE("Required NAS sound support cannot be provided.")
|
|
4340 with_nas_sound=no
|
|
4341 fi
|
426
|
4342 fi
|
|
4343
|
432
|
4344 dnl ESD Sound support
|
|
4345 if test "$with_esd_sound" != "no"; then
|
|
4346 AC_CHECK_PROG(have_esd_config, esd-config, yes, no)
|
|
4347 if test "$have_esd_config" = "yes"; then
|
|
4348 save_c_switch_site="$c_switch_site" save_LIBS="$LIBS"
|
|
4349 XE_APPEND(`esd-config --cflags`, c_switch_site)
|
|
4350 XE_PREPEND(`esd-config --libs`, LIBS)
|
|
4351 AC_CHECK_FUNC(esd_play_stream,
|
|
4352 have_esd_sound=yes,
|
|
4353 c_switch_site="$save_c_switch_site" LIBS="$save_LIBS")
|
|
4354 fi
|
|
4355
|
|
4356 if test "$have_esd_sound" = "yes"; then
|
|
4357 with_esd_sound=yes
|
426
|
4358 need_miscplay=yes
|
|
4359 XE_ADD_OBJS(esd.o)
|
432
|
4360 AC_DEFINE(HAVE_ESD_SOUND)
|
|
4361 else
|
|
4362 test "$with_esd_sound" = "yes" && \
|
|
4363 XE_DIE("Required ESD sound support cannot be provided.")
|
|
4364 with_esd_sound=no
|
426
|
4365 fi
|
|
4366 fi
|
|
4367
|
432
|
4368 test "$need_miscplay" = "yes" && XE_ADD_OBJS(miscplay.o)
|
149
|
4369
|
151
|
4370 dnl ---------------------
|
149
|
4371 dnl TTY-dependent options
|
151
|
4372 dnl ---------------------
|
149
|
4373
|
|
4374 test -z "$with_tty" && with_tty=yes
|
|
4375
|
|
4376 if test "$with_tty" = "yes" ; then
|
151
|
4377 AC_CHECKING(for TTY-related features)
|
149
|
4378 AC_DEFINE(HAVE_TTY)
|
|
4379
|
|
4380 dnl Autodetect ncurses.
|
|
4381 if test -z "$with_ncurses"; then
|
151
|
4382 AC_CHECK_LIB(ncurses, tgetent, with_ncurses=yes, with_ncurses=no)
|
149
|
4383 fi
|
|
4384 if test "$with_ncurses" = "yes"; then
|
70
|
4385 AC_DEFINE(HAVE_NCURSES)
|
442
|
4386 AC_CHECK_HEADER(ncurses/curses.h, curses_h_file=ncurses/curses.h)
|
|
4387 AC_CHECK_HEADER(ncurses/term.h, term_h_file=ncurses/term.h)
|
151
|
4388 XE_ADD_OBJS(terminfo.o)
|
|
4389 XE_PREPEND(-lncurses, LIBS)
|
149
|
4390
|
153
|
4391 if test "$ac_cv_header_ncurses_curses_h" != "yes" ; then
|
70
|
4392 dnl Try again, and check for the bogus ncurses/ include bug.
|
|
4393 dnl (i.e. ncurses/curses.h bogusly includes <unctrl.h> instead of
|
|
4394 dnl <ncurses/unctrl.h>)
|
149
|
4395 save_c_switch_site="$c_switch_site"
|
|
4396 c_switch_site="$c_switch_site -I/usr/include/ncurses"
|
442
|
4397 AC_CHECK_HEADER(ncurses/curses.h, curses_h_file=ncurses/curses.h)
|
153
|
4398 if test "$ac_cv_header_ncurses_curses_h" = "yes"
|
559
|
4399 then AC_MSG_WARN([Your system has the bogus ncurses include bug.])
|
149
|
4400 else c_switch_site="$save_c_switch_site"
|
0
|
4401 fi
|
|
4402 fi
|
149
|
4403 else dnl "$with_ncurses" = "no"
|
151
|
4404 dnl Autodetect terminfo/-lcurses/-ltermlib/-ltermcap
|
149
|
4405 if test "$have_terminfo" = "yes"; then
|
151
|
4406 XE_ADD_OBJS(terminfo.o)
|
|
4407 if test -n "$libs_termcap"; then
|
|
4408 XE_PREPEND($libs_termcap, LIBS)
|
|
4409 else
|
|
4410 for lib in curses termlib termcap; do
|
153
|
4411 AC_CHECK_LIB($lib, tgetent, XE_PREPEND(-l${lib}, LIBS); break)
|
151
|
4412 done
|
|
4413 fi
|
149
|
4414 else dnl "$have_terminfo" = "no" && "with_ncurses" = "no"
|
151
|
4415 XE_ADD_OBJS(tparam.o)
|
|
4416 dnl The HP-UX curses library seems to have a badly broken version of select(2)
|
|
4417 dnl that makes "poll: interrupted system call" messages to appear and
|
561
|
4418 dnl Emacs subprocesses to hang (e.g. TeX compilation w/ AUCTeX) */
|
151
|
4419 case "$opsys" in *-hp-hpux* ) libs_termcap="-ltermcap" ;; esac
|
|
4420 if test -n "$libs_termcap"; then
|
|
4421 XE_PREPEND($libs_termcap, LIBS)
|
|
4422 else
|
153
|
4423 AC_CHECK_LIB(curses, tgetent, XE_PREPEND(-lcurses, LIBS),
|
|
4424 AC_CHECK_LIB(termcap, tgetent, XE_PREPEND(-ltermcap, LIBS),
|
|
4425 XE_ADD_OBJS(termcap.o)))
|
149
|
4426 fi
|
|
4427 fi
|
0
|
4428 fi
|
442
|
4429 AC_DEFINE_UNQUOTED(CURSES_H_FILE, "${curses_h_file-curses.h}")
|
|
4430 AC_DEFINE_UNQUOTED(TERM_H_FILE, "${term_h_file-term.h}")
|
155
|
4431
|
|
4432 dnl Autodetect gpm
|
|
4433 test -z "$with_gpm" && { AC_CHECK_HEADER(gpm.h, , with_gpm=no) }
|
|
4434 test -z "$with_gpm" && { AC_CHECK_LIB(gpm, Gpm_Open, with_gpm=yes, with_gpm=no) }
|
|
4435 if test "$with_gpm" = "yes"; then
|
|
4436 AC_DEFINE(HAVE_GPM)
|
|
4437 XE_PREPEND(-lgpm, LIBS)
|
|
4438 fi
|
|
4439
|
151
|
4440 else dnl "$with_tty" = "no"
|
149
|
4441 for feature in ncurses gpm; do
|
|
4442 if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
|
559
|
4443 AC_MSG_WARN([--with-${feature} ignored: Not valid without TTY support])
|
149
|
4444 fi
|
|
4445 eval "with_${feature}=no"
|
|
4446 done
|
151
|
4447 fi dnl with_tty
|
0
|
4448
|
149
|
4449 dnl Database support
|
|
4450 dnl We do not necessarily have to have libdb/lib(g)dbm for DB/(G)DBM support.
|
0
|
4451 dnl On FreeBSD, both DB and DBM are part of libc.
|
384
|
4452 dnl By default, we check for DBM support in libgdbm, then libc, then libdbm.
|
|
4453
|
426
|
4454 test "$with_database_gdbm $with_database_dbm $with_database_berkdb" \
|
384
|
4455 != "no no no" && AC_CHECKING(for database support)
|
|
4456
|
|
4457 dnl Check for ndbm.h, required for either kind of DBM support.
|
426
|
4458 if test "$with_database_gdbm $with_database_dbm" != "no no"; then
|
384
|
4459 AC_CHECK_HEADER(ndbm.h, [:], [
|
426
|
4460 test "$with_database_gdbm" = "yes" -o \
|
|
4461 "$with_database_dbm" = "yes" && \
|
384
|
4462 XE_DIE("Required DBM support cannot be provided.")
|
426
|
4463 with_database_gdbm=no with_database_dbm=no])
|
384
|
4464 fi
|
|
4465
|
|
4466 dnl Check for DBM support in libgdbm.
|
426
|
4467 if test "$with_database_gdbm" != "no"; then
|
384
|
4468 AC_CHECK_LIB(gdbm, dbm_open, [
|
426
|
4469 with_database_gdbm=yes with_database_dbm=no libdbm=-lgdbm], [
|
|
4470 if test "$with_database_gdbm" = "yes"; then
|
384
|
4471 XE_DIE("Required GNU DBM support cannot be provided.")
|
|
4472 fi
|
426
|
4473 with_database_gdbm=no])
|
149
|
4474 fi
|
|
4475
|
384
|
4476 dnl Check for DBM support in libc and libdbm.
|
151
|
4477 if test "$with_database_dbm" != "no"; then
|
384
|
4478 AC_CHECK_FUNC(dbm_open, [with_database_dbm=yes libdbm=], [
|
|
4479 AC_CHECK_LIB(dbm, dbm_open, [with_database_dbm=yes libdbm=-ldbm], [
|
|
4480 test "$with_database_dbm" = "yes" && \
|
|
4481 XE_DIE("Required DBM support cannot be provided.")
|
|
4482 with_database_dbm=no])])
|
149
|
4483 fi
|
|
4484
|
384
|
4485 dnl Tell make about the DBM support we detected.
|
|
4486 test -n "$libdbm" && XE_PREPEND("$libdbm", LIBS)
|
426
|
4487 test "$with_database_gdbm" = "yes" -o \
|
|
4488 "$with_database_dbm" = "yes" && \
|
384
|
4489 AC_DEFINE(HAVE_DBM)
|
|
4490
|
|
4491 dnl Check for Berkeley DB.
|
149
|
4492 if test "$with_database_berkdb" != "no"; then
|
298
|
4493 AC_MSG_CHECKING(for Berkeley db.h)
|
442
|
4494 for header in "db/db.h" "db.h"; do
|
|
4495 AC_TRY_COMPILE([
|
|
4496 #include <stdlib.h>
|
|
4497 #if !(defined __GLIBC__ && __GLIBC_MINOR__ >= 1)
|
|
4498 #ifdef HAVE_INTTYPES_H
|
149
|
4499 #define __BIT_TYPES_DEFINED__
|
|
4500 #include <inttypes.h>
|
|
4501 typedef uint8_t u_int8_t;
|
|
4502 typedef uint16_t u_int16_t;
|
|
4503 typedef uint32_t u_int32_t;
|
|
4504 #ifdef WE_DONT_NEED_QUADS
|
|
4505 typedef uint64_t u_int64_t;
|
|
4506 #endif
|
|
4507 #endif
|
442
|
4508 #endif
|
|
4509 #include <$header>
|
|
4510 ],[], db_h_file="$header"; break)
|
298
|
4511 done
|
442
|
4512 if test -z "$db_h_file"
|
298
|
4513 then AC_MSG_RESULT(no); with_database_berkdb=no
|
442
|
4514 else AC_MSG_RESULT($db_h_file)
|
149
|
4515 fi
|
298
|
4516
|
|
4517 if test "$with_database_berkdb" != "no"; then
|
|
4518 AC_MSG_CHECKING(for Berkeley DB version)
|
|
4519 AC_EGREP_CPP(yes,
|
442
|
4520 [#include <$db_h_file>
|
298
|
4521 #if DB_VERSION_MAJOR > 1
|
|
4522 yes
|
|
4523 #endif
|
448
|
4524 ], [AC_EGREP_CPP(yes,
|
|
4525 [#include <$db_h_file>
|
|
4526 #if DB_VERSION_MAJOR > 2
|
|
4527 yes
|
|
4528 #endif
|
|
4529 ], [AC_MSG_RESULT(3); dbfunc=db_create],[
|
|
4530 AC_MSG_RESULT(2); dbfunc=db_open])],[
|
|
4531 AC_MSG_RESULT(1); dbfunc=dbopen])
|
298
|
4532 AC_CHECK_FUNC($dbfunc, with_database_berkdb=yes need_libdb=no, [
|
|
4533 AC_CHECK_LIB(db, $dbfunc, with_database_berkdb=yes need_libdb=yes)])
|
|
4534 fi
|
|
4535
|
149
|
4536 if test "$with_database_berkdb" = "yes"; then
|
442
|
4537 AC_DEFINE_UNQUOTED(DB_H_FILE, "$db_h_file")
|
149
|
4538 AC_DEFINE(HAVE_BERKELEY_DB)
|
151
|
4539 test "$need_libdb" = "yes" && XE_PREPEND(-ldb, LIBS)
|
149
|
4540 else with_database_berkdb=no
|
0
|
4541 fi
|
|
4542 fi
|
149
|
4543
|
426
|
4544 if test "$with_database_gdbm $with_database_dbm $with_database_berkdb" \
|
272
|
4545 != "no no no"; then
|
149
|
4546 AC_DEFINE(HAVE_DATABASE)
|
|
4547 fi
|
|
4548
|
|
4549 dnl Socks support
|
|
4550 if test "$with_socks" = "yes"; then
|
|
4551 AC_CHECK_LIB(socks, SOCKSinit)
|
|
4552 test -n "$ac_cv_lib_socks_SOCKSinit" && AC_DEFINE(HAVE_SOCKS)
|
|
4553 fi
|
|
4554
|
|
4555 dnl Usage tracking (undocumented and likely unused option)
|
|
4556 if test "$usage_tracking" = "yes"; then
|
|
4557 AC_DEFINE(USAGE_TRACKING)
|
151
|
4558 XE_PREPEND(-Bstatic -lut -Bdynamic, LIBS)
|
149
|
4559 fi
|
|
4560
|
272
|
4561 dnl Unfortunately, just because we can link doesn't mean we can run.
|
|
4562 dnl One of the above link tests may have succeeded but caused resulting
|
|
4563 dnl executables to fail to run. Also any tests using AC_TRY_RUN will
|
|
4564 dnl have reported incorrect results.
|
|
4565 AC_TRY_RUN([int main(int c,char *v[]){return 0;}],[:],[
|
|
4566 echo ""
|
|
4567 echo "*** PANIC *** The C compiler can no longer build working executables."
|
|
4568 echo "*** PANIC *** Please examine the tail of config.log for runtime errors."
|
|
4569 echo "*** PANIC *** The most likely reason for this problem is that configure"
|
|
4570 echo "*** PANIC *** links with shared libraries, but those libraries cannot be"
|
|
4571 echo "*** PANIC *** found at run time."
|
|
4572 echo "*** PANIC ***"
|
|
4573 echo "*** PANIC *** On a Linux system, edit /etc/ld.so.conf and re-run ldconfig."
|
|
4574 echo "*** PANIC *** On other systems, try telling configure where to find the"
|
|
4575 echo "*** PANIC *** shared libraries using the --site-runtime-libraries option"
|
|
4576 echo "*** PANIC ***"
|
|
4577 echo "*** PANIC *** Another way to shoot yourself in the foot is to specify"
|
|
4578 echo "*** PANIC *** --with-FEATURE when FEATURE is not actually installed"
|
|
4579 echo "*** PANIC *** on your system. Don't do that."
|
|
4580 exit 1])
|
|
4581
|
398
|
4582 dnl Process support
|
771
|
4583 if test "$win32_processes" != "yes"; then
|
398
|
4584 AC_DEFINE(HAVE_UNIX_PROCESSES)
|
|
4585 fi
|
261
|
4586
|
149
|
4587 dnl --------------------------------
|
|
4588 dnl Compute SUBST-itutable variables
|
|
4589 dnl --------------------------------
|
155
|
4590
|
149
|
4591 dnl We ignore (C|LD)_SWITCH_X_(MACHINE|SYSTEM)
|
155
|
4592 dnl Use XE_SPACE instead of plain assignment statements to remove extraneous blanks
|
997
|
4593 if test "$with_modules" = "yes"; then
|
|
4594 ld_libs_module=
|
|
4595 else
|
|
4596 XE_SPACE(ld_libs_module, $ldap_libs $postgresql_libs)
|
|
4597 fi
|
|
4598
|
175
|
4599 XE_SPACE(CFLAGS, $CFLAGS)
|
155
|
4600 XE_SPACE(extra_objs, $extra_objs)
|
|
4601 XE_SPACE(c_switch_general, -DHAVE_CONFIG_H $c_switch_site $c_switch_machine $c_switch_system)
|
462
|
4602 XE_SPACE(c_switch_window_system, $c_switch_x_site $c_switch_gtk $X_CFLAGS)
|
155
|
4603 XE_SPACE(c_switch_all, $c_switch_general $c_switch_window_system)
|
|
4604 XE_SPACE(ld_switch_general, $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_run)
|
|
4605 XE_SPACE(ld_switch_window_system, $ld_switch_x_site)
|
|
4606 XE_SPACE(ld_switch_all, $ld_switch_general $ld_switch_window_system)
|
|
4607 XE_SPACE(ld_libs_general, $LIBS $libs_machine $libs_system $libs_standard)
|
462
|
4608 XE_SPACE(ld_libs_window_system, $X_EXTRA_LIBS $libs_x $libs_gtk $X_PRE_LIBS)
|
997
|
4609 XE_SPACE(ld_libs_all, $ld_libs_window_system $ld_libs_general $ld_libs_module)
|
149
|
4610
|
151
|
4611 dnl Compute lists of Makefiles and subdirs
|
|
4612 AC_SUBST(SRC_SUBDIR_DEPS)
|
|
4613 XE_APPEND(src, MAKE_SUBDIR)
|
380
|
4614 internal_makefile_list="Makefile.in"
|
149
|
4615 SUBDIR_MAKEFILES=''
|
151
|
4616 test -d lock || mkdir lock
|
149
|
4617 for dir in $MAKE_SUBDIR; do
|
167
|
4618 case "$dir" in */* ) dnl Implement mkdir -p
|
|
4619 ( for d in `echo $dir | sed 's:/: :g'` ; do
|
|
4620 test -d "$d" || mkdir "$d"; cd "$d"
|
|
4621 done ) ;;
|
|
4622 * ) test -d "$dir" || mkdir "$dir" ;;
|
|
4623 esac
|
382
|
4624 XE_SPACE(SUBDIR_MAKEFILES, $SUBDIR_MAKEFILES $dir/Makefile $dir/GNUmakefile)
|
155
|
4625 XE_SPACE(internal_makefile_list, $internal_makefile_list $dir/Makefile.in)
|
149
|
4626 done
|
167
|
4627 AC_SUBST(INSTALL_ARCH_DEP_SUBDIR)
|
149
|
4628 AC_SUBST(MAKE_SUBDIR)
|
|
4629 AC_SUBST(SUBDIR_MAKEFILES)
|
|
4630
|
1111
|
4631 dnl Make s&m symlinks in the src directory, for config.h.
|
157
|
4632 for dir in src/s src/m; do
|
|
4633 if test ! -d "$dir" ; then
|
|
4634 echo Making symbolic link to "$srcdir/$dir"
|
|
4635 ${LN_S} "$srcdir/$dir" "$dir"
|
|
4636 fi
|
|
4637 done
|
|
4638
|
1111
|
4639 dnl Also make modules/common link if needed for the module Makefiles.
|
|
4640 if test "$need_modules_common" = "yes"; then
|
|
4641 for dir in modules/common; do
|
|
4642 if test ! -d "$dir" ; then
|
|
4643 echo Making symbolic link to "$srcdir/$dir"
|
|
4644 ${LN_S} "$srcdir/$dir" "$dir"
|
|
4645 fi
|
|
4646 done
|
|
4647 fi
|
|
4648
|
149
|
4649 if test "$extra_verbose" = "yes"; then
|
151
|
4650 echo ""
|
163
|
4651 PRINT_VAR(extra_objs
|
|
4652 c_switch_general c_switch_window_system c_switch_all
|
|
4653 ld_switch_general ld_switch_window_system ld_switch_all
|
|
4654 ld_libs_general ld_libs_window_system ld_libs_all)
|
149
|
4655 echo ""
|
|
4656 fi
|
|
4657
|
438
|
4658 dnl ----------------------------------------------
|
|
4659 dnl Create some auxiliary files for developers.
|
|
4660 dnl ----------------------------------------------
|
|
4661
|
|
4662 dnl Create a .gdbinit useful for debugging XEmacs
|
|
4663 if test -f "$srcdir/src/.gdbinit" -a ! -f "src/.gdbinit"; then
|
|
4664 test "$extra_verbose" = "yes" && echo "creating src/.gdbinit"
|
|
4665 echo "source $srcdir/src/.gdbinit" > "src/.gdbinit"
|
|
4666 fi
|
|
4667
|
|
4668 dnl Create a .dbxrc useful for debugging XEmacs
|
|
4669 if test -f "$srcdir/src/.dbxrc" -a ! -f "src/.dbxrc"; then
|
|
4670 test "$extra_verbose" = "yes" && echo "creating src/.dbxrc"
|
|
4671 echo ". $srcdir/src/.dbxrc" > "src/.dbxrc"
|
|
4672 fi
|
|
4673
|
|
4674 dnl Create a useful TAGS file
|
|
4675 if test -f "$srcdir/TAGS" -a ! -f "TAGS"; then
|
|
4676 test "$extra_verbose" = "yes" && echo "creating TAGS"
|
|
4677 echo "
|
|
4678 $srcdir/TAGS,include" > "TAGS"
|
151
|
4679 fi
|
|
4680
|
|
4681 dnl Create top level .sbinit for Sun compilers
|
373
|
4682 if test "$__SUNPRO_C" = "yes"; then
|
438
|
4683 test "$extra_verbose" = "yes" && echo "creating .sbinit"
|
157
|
4684 ( echo "# For use with Sun WorkShop's Source browser."
|
|
4685 echo "# See sbquery(1) and sbinit(4) for more information"
|
|
4686 for dir in $MAKE_SUBDIR; do echo "import $dir"; done
|
|
4687 ) > .sbinit
|
|
4688 fi
|
151
|
4689
|
|
4690 dnl There are no more compile tests; remove the core they created.
|
|
4691 rm -f core
|
|
4692
|
274
|
4693 dnl ----------------------------------------------
|
|
4694 dnl Substitute into Makefile, config.h and paths.h
|
|
4695 dnl ----------------------------------------------
|
|
4696
|
|
4697 dnl what sort of things to edit into Makefile, config.h and paths.h
|
70
|
4698 dnl configuration here uncanonicalized to avoid exceeding size limits.
|
|
4699
|
280
|
4700 AC_SUBST(PROGNAME)
|
0
|
4701 AC_SUBST(version)
|
|
4702 AC_SUBST(configuration)
|
|
4703 AC_SUBST(canonical)
|
422
|
4704 AC_SUBST(inststaticdir)
|
|
4705 AC_SUBST(instvardir)
|
0
|
4706 AC_SUBST(srcdir)
|
|
4707 AC_SUBST(bindir)
|
|
4708 AC_SUBST(datadir)
|
155
|
4709 AC_SUBST(pkgdir)
|
0
|
4710 AC_SUBST(statedir)
|
|
4711 AC_SUBST(libdir)
|
|
4712 AC_SUBST(mandir)
|
452
|
4713 AC_SUBST(extra_includes)
|
274
|
4714
|
278
|
4715 AC_SUBST(prefix)
|
420
|
4716 AC_SUBST(PREFIX_USER_DEFINED)
|
278
|
4717 dnl Yo, Stephen Bourne! I want to marry you!
|
|
4718 PREFIX=$prefix
|
|
4719 while true; do
|
|
4720 case "$PREFIX" in
|
|
4721 *\$* ) eval "PREFIX=$PREFIX" ;;
|
|
4722 *) break ;;
|
|
4723 esac
|
|
4724 done
|
|
4725 AC_SUBST(PREFIX)
|
|
4726
|
|
4727 AC_SUBST(exec_prefix)
|
420
|
4728 AC_SUBST(EXEC_PREFIX_USER_DEFINED)
|
278
|
4729 EXEC_PREFIX=$exec_prefix
|
|
4730 while true; do
|
|
4731 case "$EXEC_PREFIX" in
|
|
4732 *\$* ) eval "EXEC_PREFIX=$EXEC_PREFIX" ;;
|
|
4733 *) break ;;
|
|
4734 esac
|
|
4735 done
|
|
4736 AC_SUBST(EXEC_PREFIX)
|
|
4737
|
0
|
4738 AC_SUBST(infodir)
|
274
|
4739 AC_SUBST(INFODIR_USER_DEFINED)
|
|
4740 INFODIR=$infodir
|
|
4741 while true; do
|
|
4742 case "$INFODIR" in
|
|
4743 *\$* ) eval "INFODIR=$INFODIR" ;;
|
|
4744 *) break ;;
|
|
4745 esac
|
|
4746 done
|
|
4747 AC_SUBST(INFODIR)
|
|
4748
|
203
|
4749 AC_SUBST(infopath)
|
274
|
4750 AC_SUBST(INFOPATH_USER_DEFINED)
|
|
4751 INFOPATH=$infopath
|
|
4752 while true; do
|
|
4753 case "$INFOPATH" in
|
|
4754 *\$* ) eval "INFOPATH=$INFOPATH" ;;
|
|
4755 *) break ;;
|
|
4756 esac
|
|
4757 done
|
|
4758 AC_SUBST(INFOPATH)
|
|
4759
|
269
|
4760 AC_SUBST(package_path)
|
274
|
4761 AC_SUBST(PACKAGE_PATH_USER_DEFINED)
|
|
4762 PACKAGE_PATH=$package_path
|
|
4763 while true; do
|
|
4764 case "$PACKAGE_PATH" in
|
|
4765 *\$* ) eval "PACKAGE_PATH=$PACKAGE_PATH" ;;
|
|
4766 *) break ;;
|
|
4767 esac
|
|
4768 done
|
|
4769 AC_SUBST(PACKAGE_PATH)
|
|
4770
|
0
|
4771 AC_SUBST(lispdir)
|
274
|
4772 AC_SUBST(LISPDIR_USER_DEFINED)
|
|
4773 LISPDIR=$lispdir
|
|
4774 while true; do
|
|
4775 case "$LISPDIR" in
|
|
4776 *\$* ) eval "LISPDIR=$LISPDIR" ;;
|
|
4777 *) break ;;
|
|
4778 esac
|
|
4779 done
|
|
4780 AC_SUBST(LISPDIR)
|
|
4781
|
388
|
4782 AC_SUBST(moduledir)
|
|
4783 AC_SUBST(MODULEDIR_USER_DEFINED)
|
|
4784 MODULEDIR=$moduledir
|
|
4785 while true; do
|
|
4786 case "$MODULEDIR" in
|
|
4787 *\$* ) eval "MODULEDIR=$MODULEDIR" ;;
|
|
4788 *) break ;;
|
|
4789 esac
|
|
4790 done
|
|
4791 AC_SUBST(MODULEDIR)
|
|
4792
|
|
4793 AC_SUBST(sitelispdir)
|
|
4794 AC_SUBST(SITELISPDIR_USER_DEFINED)
|
|
4795 SITELISPDIR=$sitelispdir
|
|
4796 while true; do
|
|
4797 case "$SITELISPDIR" in
|
|
4798 *\$* ) eval "SITELISPDIR=$SITELISPDIR" ;;
|
|
4799 *) break ;;
|
|
4800 esac
|
|
4801 done
|
|
4802 AC_SUBST(SITELISPDIR)
|
|
4803
|
|
4804 AC_SUBST(sitemoduledir)
|
|
4805 AC_SUBST(SITEMODULEDIR_USER_DEFINED)
|
|
4806 SITEMODULEDIR=$sitemoduledir
|
|
4807 while true; do
|
|
4808 case "$SITEMODULEDIR" in
|
|
4809 *\$* ) eval "SITEMODULEDIR=$SITEMODULEDIR" ;;
|
|
4810 *) break ;;
|
|
4811 esac
|
|
4812 done
|
|
4813 AC_SUBST(SITEMODULEDIR)
|
274
|
4814
|
0
|
4815 AC_SUBST(etcdir)
|
274
|
4816 AC_SUBST(ETCDIR_USER_DEFINED)
|
|
4817 ETCDIR=$etcdir
|
|
4818 while true; do
|
|
4819 case "$ETCDIR" in
|
|
4820 *\$* ) eval "ETCDIR=$ETCDIR" ;;
|
|
4821 *) break ;;
|
|
4822 esac
|
|
4823 done
|
|
4824 AC_SUBST(ETCDIR)
|
|
4825
|
420
|
4826 AC_SUBST(docdir)
|
|
4827 AC_SUBST(DOCDIR_USER_DEFINED)
|
|
4828 DOCDIR=$docdir
|
|
4829 while true; do
|
|
4830 case "$DOCDIR" in
|
|
4831 *\$* ) eval "DOCDIR=$DOCDIR" ;;
|
|
4832 *) break ;;
|
|
4833 esac
|
|
4834 done
|
|
4835 AC_SUBST(DOCDIR)
|
|
4836
|
0
|
4837 AC_SUBST(archlibdir)
|
274
|
4838 AC_SUBST(ARCHLIBDIR_USER_DEFINED)
|
|
4839 ARCHLIBDIR=$archlibdir
|
|
4840 while true; do
|
|
4841 case "$ARCHLIBDIR" in
|
|
4842 *\$* ) eval "ARCHLIBDIR=$ARCHLIBDIR" ;;
|
|
4843 *) break ;;
|
|
4844 esac
|
|
4845 done
|
|
4846 AC_SUBST(ARCHLIBDIR)
|
|
4847
|
0
|
4848 AC_SUBST(docdir)
|
|
4849 AC_SUBST(bitmapdir)
|
149
|
4850 AC_SUBST(extra_objs)
|
|
4851
|
|
4852 dnl The following flags combine all the information from:
|
|
4853 dnl - command line options (user always gets priority)
|
|
4854 dnl - user environment variables
|
|
4855 dnl - determined by configure
|
388
|
4856 dnl - the s&m header files (required for ellcc)
|
0
|
4857 AC_SUBST(machfile)
|
|
4858 AC_SUBST(opsysfile)
|
149
|
4859 AC_SUBST(c_switch_general)
|
|
4860 AC_SUBST(c_switch_window_system)
|
|
4861 AC_SUBST(c_switch_all)
|
|
4862 AC_SUBST(ld_switch_general)
|
|
4863 AC_SUBST(ld_switch_window_system)
|
|
4864 AC_SUBST(ld_switch_all)
|
|
4865 AC_SUBST(ld_libs_general)
|
|
4866 AC_SUBST(ld_libs_window_system)
|
|
4867 AC_SUBST(ld_libs_all)
|
|
4868 AC_SUBST(CFLAGS)
|
|
4869 AC_SUBST(CPPFLAGS)
|
|
4870 AC_SUBST(LDFLAGS)
|
173
|
4871 RECURSIVE_MAKE="\$(MAKE) \$(MFLAGS) CC='\$(CC)' CFLAGS='\$(CFLAGS)' LDFLAGS='\$(LDFLAGS)' CPPFLAGS='\$(CPPFLAGS)'"
|
|
4872 AC_SUBST(RECURSIVE_MAKE)
|
149
|
4873
|
|
4874 AC_SUBST(native_sound_lib)
|
|
4875 AC_SUBST(sound_cflags)
|
0
|
4876 AC_SUBST(RANLIB)
|
|
4877 AC_SUBST(dynodump_arch)
|
|
4878
|
380
|
4879 AC_SUBST(XEMACS_CC)
|
|
4880
|
420
|
4881 dnl The default is yes
|
|
4882 if test "$with_prefix" = "yes"; then
|
|
4883 AC_DEFINE(PREFIX_USER_DEFINED)
|
|
4884 fi
|
380
|
4885
|
388
|
4886 dnl The default is no
|
267
|
4887 if test "$with_site_lisp" = "no"; then
|
|
4888 AC_DEFINE(INHIBIT_SITE_LISP)
|
185
|
4889 fi
|
388
|
4890 dnl The default is yes
|
|
4891 if test "$with_site_modules" = "no"; then
|
|
4892 AC_DEFINE(INHIBIT_SITE_MODULES)
|
|
4893 fi
|
173
|
4894
|
207
|
4895 XE_SPACE(ac_configure_args, $ac_configure_args)
|
424
|
4896 AC_DEFINE_UNQUOTED(EMACS_CONFIGURATION, "$configuration")
|
207
|
4897 AC_DEFINE_UNQUOTED(EMACS_CONFIG_OPTIONS, "$ac_configure_args")
|
149
|
4898
|
|
4899 dnl Following are deprecated
|
|
4900
|
|
4901 null_string=""
|
|
4902 AC_DEFINE_UNQUOTED(LD_SWITCH_X_SITE, $null_string)
|
|
4903 AC_DEFINE_UNQUOTED(LD_SWITCH_X_SITE_AUX, $null_string)
|
|
4904 AC_DEFINE_UNQUOTED(C_SWITCH_X_SITE, $null_string)
|
|
4905 AC_DEFINE_UNQUOTED(LD_SWITCH_SITE, $null_string)
|
|
4906 AC_DEFINE_UNQUOTED(C_SWITCH_SITE, $null_string)
|
0
|
4907
|
70
|
4908 dnl Note: as a general rule, *only* define things here that are not
|
|
4909 dnl autodetected. For things that are autodetected, define them
|
|
4910 dnl at the point where the autodetection occurs or would occur,
|
|
4911 dnl so that the user gets immediate feedback on the results of the
|
|
4912 dnl autodetection.
|
|
4913
|
181
|
4914 if test "$GNU_MALLOC" = "yes"; then AC_DEFINE(GNU_MALLOC)
|
|
4915 elif test "$with_system_malloc" = "yes"; then AC_DEFINE(USE_SYSTEM_MALLOC)
|
|
4916 elif test "$with_debug_malloc" = "yes"; then AC_DEFINE(USE_DEBUG_MALLOC)
|
|
4917 AC_DEFINE(USE_SYSTEM_MALLOC)
|
0
|
4918 fi
|
169
|
4919 test "$GCC" = "yes" && AC_DEFINE(USE_GCC)
|
149
|
4920 test "$external_widget" = "yes" && AC_DEFINE(EXTERNAL_WIDGET)
|
925
|
4921 test "$use_kkcc" = "yes" && AC_DEFINE(USE_KKCC)
|
442
|
4922 test "$quick_build" = "yes" && AC_DEFINE(QUICK_BUILD)
|
380
|
4923 test "$with_purify" = "yes" && AC_DEFINE(PURIFY)
|
149
|
4924 test "$with_quantify" = "yes" && AC_DEFINE(QUANTIFY)
|
|
4925 test "$with_pop" = "yes" && AC_DEFINE(MAIL_USE_POP)
|
|
4926 test "$with_kerberos" = "yes" && AC_DEFINE(KERBEROS)
|
|
4927 test "$with_hesiod" = "yes" && AC_DEFINE(HESIOD)
|
272
|
4928 test "$use_union_type" = "yes" && AC_DEFINE(USE_UNION_TYPE)
|
424
|
4929 test "$pdump" = "yes" && AC_DEFINE(PDUMP)
|
724
|
4930 test "$with_ipv6_cname" = "yes" && AC_DEFINE(IPV6_CANONICALIZE)
|
149
|
4931
|
|
4932 dnl -------------------------------
|
|
4933 dnl Report on what we decided to do
|
|
4934 dnl -------------------------------
|
0
|
4935
|
118
|
4936 (
|
149
|
4937 dnl /etc/osversion is on SONY NEWS-OS
|
|
4938 if test -f /etc/osversion; then dnl SONY NEWS-OS
|
|
4939 echo "osversion: `cat /etc/osversion`"
|
|
4940 else
|
|
4941 echo "uname -a: `uname -a`"
|
134
|
4942 fi
|
149
|
4943 echo ""
|
|
4944 echo "$0 $quoted_arguments"
|
261
|
4945 ) > Installation
|
|
4946
|
414
|
4947 if test ! -z ${emacs_beta_version} ; then
|
|
4948 if test -z "${emacs_is_beta}" ; then
|
|
4949 xemacs_betaname=".${emacs_beta_version}"
|
|
4950 else
|
|
4951 xemacs_betaname="-b${emacs_beta_version}"
|
|
4952 fi
|
|
4953 else
|
430
|
4954 xemacs_betaname=""
|
414
|
4955 fi
|
149
|
4956
|
|
4957 dnl Start stdout redirection to '| tee -a Installation'
|
116
|
4958 (
|
0
|
4959 echo "
|
|
4960
|
975
|
4961 XEmacs ${emacs_major_version}.${emacs_minor_version}${xemacs_betaname} \"$xemacs_codename\" $xemacs_extra_name configured for \`$canonical'.
|
442
|
4962 "
|
|
4963 echo "
|
|
4964 Compilation / Installation:"
|
|
4965 echo " Source code location: $srcdir"
|
|
4966 echo " Installation prefix: $prefix"
|
149
|
4967 if test -n "$site_includes"; then
|
442
|
4968 echo " Additional header files: $site_includes"
|
149
|
4969 fi
|
|
4970 if test -n "$site_libraries"; then
|
442
|
4971 echo " Additional libraries: $site_libraries"
|
149
|
4972 fi
|
209
|
4973 if test -n "$site_prefixes"; then
|
442
|
4974 echo " Additional prefixes: $site_prefixes"
|
209
|
4975 fi
|
149
|
4976 if test -n "$runpath"; then
|
442
|
4977 echo " Runtime library search path: $runpath"
|
|
4978 fi
|
|
4979
|
|
4980 if test -n "$opsysfile"
|
|
4981 then echo " Operating system description file: \`$opsysfile'"
|
|
4982 else echo " Not using any operating system description file"
|
|
4983 fi
|
|
4984 if test -n "$machfile"
|
|
4985 then echo " Machine description file: \`$machfile'"
|
|
4986 else echo " Not using any machine description file"
|
398
|
4987 fi
|
442
|
4988
|
1111
|
4989 echo " Compiler: $XEMACS_CC $CFLAGS"
|
442
|
4990 echo " Relocating allocator for buffers: $rel_alloc"
|
|
4991 echo " GNU version of malloc: ${GNU_MALLOC}${GNU_MALLOC_reason}"
|
708
|
4992 case "$ld_switch_site" in
|
|
4993 *nocombreloc*) echo " Linking with \`-z nocombreloc'.
|
|
4994 - Consider configuring with --pdump." ;;
|
|
4995 esac
|
442
|
4996
|
|
4997 echo "
|
|
4998 Window System:"
|
|
4999 if test "$with_msw" = "yes"; then
|
|
5000 echo " Compiling in support for the Microsoft window system."
|
|
5001 fi
|
|
5002 if test "$with_x11" = "yes"; then
|
|
5003 echo " Compiling in support for the X window system:"
|
|
5004 echo " - X Windows headers location: $x_includes"
|
|
5005 echo " - X Windows libraries location: $x_libraries"
|
|
5006 if test "$with_xauth" != yes; then
|
|
5007 echo " - Xau (X authority) not available."
|
|
5008 fi
|
|
5009 if test "$with_xmu" != yes; then
|
|
5010 echo " - Xmu library not available; substituting equivalent routines."
|
|
5011 fi
|
|
5012 if test "$with_wmcommand" != no; then
|
|
5013 echo " - Handling WM_COMMAND properly."
|
|
5014 fi
|
|
5015 fi
|
|
5016 if test "$need_athena" = "yes"; then
|
|
5017 echo " Compiling in support for the Athena widget set:"
|
|
5018 echo " - Athena headers location: $athena_h_path"
|
|
5019 echo " - Athena library to link: $athena_lib"
|
438
|
5020 fi
|
442
|
5021 case "$with_menubars" in
|
462
|
5022 gtk ) echo " Using GTK menubars." ;;
|
442
|
5023 lucid ) echo " Using Lucid menubars." ;;
|
|
5024 motif ) echo " Using Motif menubars."
|
|
5025 echo " *WARNING* The Motif menubar implementation is currently buggy."
|
|
5026 echo " We recommend using the Lucid menubar instead."
|
|
5027 echo " Re-run configure with --with-menubars='lucid'." ;;
|
|
5028 msw ) echo " Using MS-Windows menubars." ;;
|
|
5029 esac
|
|
5030 case "$with_scrollbars" in
|
462
|
5031 gtk ) echo " Using GTK scrollbars." ;;
|
442
|
5032 lucid ) echo " Using Lucid scrollbars." ;;
|
|
5033 motif ) echo " Using Motif scrollbars." ;;
|
|
5034 athena ) echo " Using Athena scrollbars." ;;
|
|
5035 msw ) echo " Using MS-Windows scrollbars." ;;
|
|
5036 esac
|
|
5037 case "$with_dialogs" in
|
462
|
5038 gtk ) echo " Using GTK dialog boxes." ;;
|
442
|
5039 motif ) echo " Using Motif dialog boxes."
|
|
5040 if test "$unexec" = "unexaix.o"; then if test "`uname -v`" = 4 -a "`uname -r`" -ge 3; then
|
|
5041 echo " *WARNING* The Motif dialog boxes cause problems on AIX 4.3 and higher."
|
|
5042 echo " We recommend using the Athena dialog boxes instead."
|
|
5043 echo " Install libXaw and re-run configure with --with-dialogs='athena'."
|
|
5044 echo " Read the PROBLEMS file for more information."
|
|
5045 fi; fi ;;
|
|
5046 athena ) echo " Using Athena dialog boxes." ;;
|
|
5047 msw ) echo " Using MS-Windows dialog boxes." ;;
|
|
5048 esac
|
|
5049 case "$with_widgets" in
|
462
|
5050 gtk ) echo " Using GTK native widgets." ;;
|
442
|
5051 motif ) echo " Using Motif native widgets." ;;
|
|
5052 athena ) echo " Using Athena native widgets." ;;
|
|
5053 msw ) echo " Using MS-Windows native widgets." ;;
|
|
5054 esac
|
|
5055 if test "$with_dragndrop" = yes; then
|
|
5056 echo " Compiling in support for Drag'n'Drop (EXPERIMENTAL)."
|
|
5057 echo " - Drag'n'Drop prototype: $dragndrop_proto."
|
0
|
5058 fi
|
149
|
5059
|
442
|
5060 echo "
|
|
5061 TTY:"
|
|
5062 test "$with_ncurses" = yes && echo " Compiling in support for ncurses."
|
|
5063 test "$with_gpm" = yes && echo " Compiling in support for GPM (General Purpose Mouse)."
|
|
5064
|
|
5065 echo "
|
|
5066 Images:"
|
|
5067 test "$with_gif" = yes && echo " Compiling in support for GIF images (builtin)."
|
153
|
5068 if test "$with_xpm" = yes; then
|
442
|
5069 echo " Compiling in support for XPM images."
|
175
|
5070 elif test "$with_x11" = yes; then
|
442
|
5071 echo " WARNING: -----------------------------------------------------------"
|
|
5072 echo " WARNING: Compiling without XPM image support."
|
373
|
5073 if test "$xpm_problem" != ""; then
|
|
5074 echo " Reason: $xpm_problem"
|
|
5075 fi
|
|
5076 echo " WARNING: You should strongly consider installing XPM."
|
151
|
5077 echo " WARNING: Otherwise toolbars and other graphics will look suboptimal."
|
373
|
5078 echo " WARNING: (a copy may be found in ftp://ftp.xemacs.org/pub/xemacs/aux)"
|
442
|
5079 echo " WARNING: -----------------------------------------------------------"
|
308
|
5080 fi
|
373
|
5081 if test "$with_png" = yes; then
|
442
|
5082 echo " Compiling in support for PNG images."
|
373
|
5083 elif test "$window_system" != "none"; then
|
442
|
5084 echo " WARNING: -----------------------------------------------------------"
|
373
|
5085 echo " WARNING: Compiling without PNG image support."
|
|
5086 if test "$png_problem" != ""; then
|
|
5087 echo " Reason: $png_problem"
|
|
5088 fi
|
|
5089 echo " WARNING: You should strongly consider installing the PNG libraries."
|
|
5090 echo " WARNING: Otherwise certain images and glyphs may not display."
|
|
5091 echo " WARNING: (a copy may be found in ftp://ftp.xemacs.org/pub/xemacs/aux)"
|
442
|
5092 echo " WARNING: -----------------------------------------------------------"
|
373
|
5093 fi
|
442
|
5094 test "$with_jpeg" = yes && echo " Compiling in support for JPEG images."
|
|
5095 test "$with_tiff" = yes && echo " Compiling in support for TIFF images."
|
310
|
5096 test "$with_xface" = yes && echo " Compiling in support for X-Face message headers."
|
432
|
5097
|
442
|
5098 echo "
|
|
5099 Sound:"
|
|
5100 test "$with_native_sound" = yes && echo " Compiling in support for sound (native)."
|
|
5101 test "$with_nas_sound" = yes && echo " Compiling in support for NAS (network audio system)."
|
|
5102 test "$old_nas" = yes && echo " - NAS library lacks error trapping; will play synchronously."
|
|
5103 test "$with_esd_sound" = yes && echo " Compiling in support for ESD (Enlightened Sound Daemon)."
|
|
5104
|
|
5105 echo "
|
|
5106 Databases:"
|
|
5107 test "$with_database_berkdb" = yes && echo " Compiling in support for Berkeley database."
|
116
|
5108 test "$with_database_dbm" = yes && echo " Compiling in support for DBM."
|
426
|
5109 test "$with_database_gdbm" = yes && echo " Compiling in support for GNU DBM."
|
442
|
5110 test "$with_ldap" = yes && echo " Compiling in support for LDAP."
|
|
5111 if test "$with_postgresql" = yes; then
|
|
5112 echo " Compiling in support for PostgreSQL."
|
|
5113 echo " - Using PostgreSQL header file: $libpq_fe_h_file"
|
|
5114 test "$with_postgresqlv7" = yes && echo " - Using PostgreSQL V7 bindings."
|
|
5115 fi
|
|
5116
|
|
5117 echo "
|
|
5118 Internationalization:"
|
|
5119 test "$with_mule" = yes && echo " Compiling in support for Mule (multi-lingual Emacs)."
|
|
5120 test "$with_xim" != no && echo " Compiling in support for XIM (X11R5+ I18N input method)."
|
|
5121 test "$with_xim" = motif && echo " - Using Motif to provide XIM support."
|
|
5122 test "$with_xim" = xlib && echo " - Using raw Xlib to provide XIM support."
|
|
5123 test "$with_xfs" = yes && echo " - Using XFontSet to provide bilingual menubar."
|
|
5124 test "$with_canna" = yes && echo " Compiling in support for Canna on Mule."
|
120
|
5125 if test "$with_wnn" = yes; then
|
|
5126 echo " Compiling in support for the WNN input method on Mule."
|
442
|
5127 test "$with_wnn6" = yes && echo " - Using WNN version 6."
|
120
|
5128 fi
|
442
|
5129
|
|
5130 echo "
|
|
5131 Mail:"
|
|
5132 test "$with_pop" = yes && echo " Compiling in support for POP mail retrieval."
|
|
5133 test "$with_kerberos" = yes && echo " Compiling in support for Kerberos POP authentication."
|
|
5134 test "$with_hesiod" = yes && echo " Compiling in support for Hesiod POP server access."
|
|
5135 test -n "$mail_locking" && echo " Compiling in support for \"$mail_locking\" mail spool file locking method."
|
|
5136
|
|
5137 echo "
|
|
5138 Other Features:"
|
708
|
5139 test "$with_ipv6_cname" = no && echo " Inhibiting IPv6 canonicalization at startup."
|
116
|
5140 test "$with_tooltalk" = yes && echo " Compiling in support for ToolTalk."
|
149
|
5141 test "$with_workshop" = yes && echo " Compiling in support for Sun WorkShop."
|
442
|
5142 test "$with_socks" = yes && echo " Compiling in support for SOCKS."
|
|
5143 test "$with_dnet" = yes && echo " Compiling in support for DNET."
|
|
5144 test "$with_modules" = "yes" && echo " Compiling in support for dynamic shared object modules."
|
|
5145 test "$use_union_type" = yes && echo " Using the union type for Lisp_Objects."
|
925
|
5146 test "$use_kkcc" = yes && echo " Using the new GC algorithms."
|
442
|
5147 test "$pdump" = yes && echo " Using the new portable dumper."
|
|
5148 test "$debug" = yes && echo " Compiling in support for extra debugging code."
|
|
5149 test "$usage_tracking" = yes && echo " Compiling in support for active usage tracking (Sun internal)."
|
800
|
5150 if test "$error_check_extents $error_check_types $error_check_text $error_check_gc $error_check_malloc $error_check_glyphs $error_check_byte_code $error_check_display $error_check_structures" \
|
828
|
5151 != "no no no no no no no no no"; then
|
151
|
5152 echo " WARNING: ---------------------------------------------------------"
|
|
5153 echo " WARNING: Compiling in support for runtime error checking."
|
|
5154 echo " WARNING: XEmacs will run noticeably more slowly as a result."
|
|
5155 echo " WARNING: Error checking is on by default for XEmacs beta releases."
|
|
5156 echo " WARNING: ---------------------------------------------------------"
|
|
5157 fi
|
118
|
5158 echo ""
|
116
|
5159 ) | tee -a Installation
|
261
|
5160 dnl echo "The above configure report is appended to \"Installation\" file."
|
118
|
5161 echo ""
|
|
5162
|
149
|
5163 dnl -----------------------------------
|
|
5164 dnl Now generate config.h and Makefiles
|
|
5165 dnl -----------------------------------
|
70
|
5166 dnl This has to be called in order for this variable to get into config.status
|
120
|
5167 AC_SUBST(internal_makefile_list)
|
0
|
5168 # Remove any trailing slashes in these variables.
|
149
|
5169 test -n "$prefix" &&
|
159
|
5170 prefix=`echo '' "$prefix" | sed -e 's:^ ::' -e 's,\([[^/]]\)/*$,\1,'`
|
149
|
5171 test -n "$exec_prefix" &&
|
159
|
5172 exec_prefix=`echo '' "$exec_prefix" | sed -e 's:^ ::' -e 's,\([[^/]]\)/*$,\1,'`
|
149
|
5173
|
|
5174 dnl Build Makefile.in's from Makefile.in.in's
|
|
5175 dnl except ./Makefile from $srcdir/Makefile.in
|
1111
|
5176 dnl src/Makefile.in will have src/depend appended to it;
|
|
5177 dnl module Makefiles will have the common text in
|
|
5178 dnl modules/common/Makefile.common appended.
|
149
|
5179
|
272
|
5180 for file in $internal_makefile_list; do
|
1111
|
5181 case $file in
|
|
5182 src/Makefile.in ) file="src/Makefile.in:src/Makefile.in.in:src/depend" ;;
|
|
5183 modules/* ) file="${file}:${file}.in:modules/common/Makefile.common" ;;
|
|
5184 esac
|
430
|
5185 XE_APPEND($file, ac_output_files)
|
272
|
5186 done
|
276
|
5187 ac_output_files="$ac_output_files src/paths.h lib-src/config.values"
|
430
|
5188 test "$with_modules" = "yes" && XE_APPEND(lib-src/ellcc.h, ac_output_files)
|
272
|
5189
|
|
5190 AC_OUTPUT($ac_output_files,
|
380
|
5191 [for dir in . $MAKE_SUBDIR; do
|
165
|
5192 (
|
149
|
5193 cd $dir
|
|
5194 rm -f junk.c
|
163
|
5195 < Makefile.in \
|
165
|
5196 sed -e '/^# Generated/d' \
|
163
|
5197 -e 's%/\*\*/#.*%%' \
|
165
|
5198 -e 's/^ *# */#/' \
|
380
|
5199 dnl Delete Makefile.in.in comment lines
|
163
|
5200 -e '/^##/d' \
|
380
|
5201 dnl Pass through CPP directives unchanged
|
163
|
5202 -e '/^#/ {
|
|
5203 p
|
|
5204 d
|
380
|
5205 }' \
|
|
5206 dnl Quote other lines to protect from CPP substitution
|
|
5207 -e '/./ {
|
|
5208 s/\([[\"]]\)/\\\1/g
|
163
|
5209 s/^/"/
|
|
5210 s/$/"/
|
|
5211 }' > junk.c;
|
380
|
5212
|
|
5213 dnl Create a GNUmakefile and Makefile from Makefile.in.
|
|
5214
|
|
5215 changequote(<<,>>)dnl
|
|
5216 dnl CPP_MAKEFILE(CPPFLAGS,filename)
|
|
5217 define(<<CPP_MAKEFILE>>,
|
|
5218 echo creating $dir/<<$2>>
|
|
5219 $CPP -I. -I${top_srcdir}/src <<$1>> junk.c \
|
|
5220 dnl Delete line directives inserted by $CPP
|
|
5221 | sed -e 's/^\#.*//' \
|
|
5222 dnl Delete spurious blanks inserted by $CPP
|
|
5223 -e 's/^[ TAB][ TAB]*$//'\
|
|
5224 -e 's/^ /TAB/' \
|
|
5225 dnl Delete blank lines
|
442
|
5226 -e '/^[ ]*$/d' \
|
380
|
5227 dnl Restore lines quoted above to original contents.
|
442
|
5228 -e '/^\"/ {
|
380
|
5229 s/\\\([\"]\)/\1/g
|
|
5230 s/^[ TAB]*\"//
|
|
5231 s/\"[ TAB]*$//
|
|
5232 }' > Makefile.new
|
149
|
5233 chmod 444 Makefile.new
|
380
|
5234 mv -f Makefile.new <<$2>>
|
|
5235 )dnl CPP_MAKEFILE
|
|
5236
|
|
5237 CPP_MAKEFILE(,Makefile)
|
|
5238 CPP_MAKEFILE(-DUSE_GNU_MAKE,GNUmakefile)
|
|
5239 changequote([,])dnl
|
|
5240 rm -f junk.c
|
|
5241 )
|
149
|
5242 done
|
175
|
5243
|
181
|
5244 dnl Append AC_DEFINE information to lib-src/config.values
|
|
5245 dnl (AC_SUBST information is already there (see config.values.sh).
|
|
5246 sed < config.status >> lib-src/config.values \
|
|
5247 -e '/{ac_dA}.*{ac_dB}.*{ac_dC}.*{ac_dD}$/!d' \
|
|
5248 -e 's/\${ac_dA}\(.*\)\${ac_dB}.*\${ac_dC}\(.*\)\${ac_dD}/\1 \2/' \
|
|
5249 -e 's/^\([[^ ]]*\) $/\1 ""/' \
|
|
5250 -e 's/ 1$/ t/'
|
175
|
5251
|
149
|
5252 ],
|
|
5253 [CPP="$CPP"
|
|
5254 top_srcdir="$srcdir"
|
|
5255 MAKE_SUBDIR="$MAKE_SUBDIR"
|
380
|
5256 ])dnl
|