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