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