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