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 () {
|
3494
|
1886 return __GNUC__;
|
|
1887 }])], [:], [__GCC="$?"])
|
|
1888 AC_RUN_IFELSE([AC_LANG_SOURCE([int main () {
|
|
1889 return __GNUC_MINOR__;
|
|
1890 }])], [:], [__GCC_MINOR="$?"])
|
|
1891 __GCC_VERSION=$__GCC"."$__GCC_MINOR
|
|
1892 echo "You appear to be using GCC version" $__GCC_VERSION
|
2651
|
1893 fi
|
|
1894
|
|
1895 dnl Support for using a different compiler for xemacs itself.
|
|
1896 dnl Useful for building XEmacs with a C++ compiler.
|
|
1897 dnl For example, `configure --compiler=gcc --xemacs-compiler=g++
|
|
1898
|
|
1899 dnl The compiler used to build xemacs, as opposed to the compiler
|
|
1900 dnl used by configure and lib-src, is determined from the following
|
|
1901 dnl sources, in order of priority:
|
2680
|
1902 dnl o --with-xemacs-compiler configure flag
|
2651
|
1903 dnl o XEMACS_CC environment variable
|
|
1904 dnl o same as the regular compiler, (determined previously)
|
|
1905
|
|
1906 dnl We don't do AC_PROG_CC for XEMACS_CC; if we can't trust these people....
|
|
1907 test -n "$with_xemacs_compiler" && XEMACS_CC="$with_xemacs_compiler"
|
|
1908 : ${XEMACS_CC:="$CC"}
|
|
1909
|
|
1910 dnl Figure out what C preprocessor to use.
|
|
1911
|
|
1912 dnl On Sun systems, people sometimes set up the variable CPP
|
|
1913 dnl with a value that is a directory, not an executable at all.
|
|
1914 dnl Detect that case, and ignore that value.
|
|
1915 test -n "$CPP" -a -d "$CPP" && CPP=
|
|
1916
|
|
1917 test -n "$NON_GNU_CPP" -a "$GCC" != "yes" -a -z "$CPP" && CPP="$NON_GNU_CPP"
|
|
1918
|
|
1919 AC_PROG_CPP
|
|
1920
|
|
1921 dnl --------------------------------------------------------------------
|
|
1922 dnl Compiler feature macros
|
|
1923 dnl --------------------------------------------------------------------
|
|
1924
|
|
1925 dnl We want feature macros defined here *and* in config.h.in, so that
|
|
1926 dnl the compilation environment at configure time and compile time agree.
|
|
1927
|
|
1928 AC_MSG_CHECKING(for GNU libc)
|
3312
|
1929 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <features.h>],[
|
2651
|
1930 #if ! (defined __GLIBC__ || defined __GNU_LIBRARY__)
|
|
1931 #error Not a GNU libc system :-(
|
|
1932 ******* ======= ******** &&&&&&&&
|
|
1933 #endif
|
3312
|
1934 ])], have_glibc=yes, have_glibc=no)
|
2651
|
1935 AC_MSG_RESULT($have_glibc)
|
|
1936 dnl I'm tired of pop being broken with GLIBC -slb
|
|
1937 dnl Well. then why not fix fucking pop?
|
|
1938 test "$have_glibc" = "yes" && AC_DEFINE(_GNU_SOURCE)
|
|
1939
|
|
1940 dnl We'd like to use vendor extensions, where available.
|
|
1941 dnl We'd like to use functions from the latest Unix98 standards.
|
|
1942 dnl See http://www.opengroup.org/onlinepubs/007908799/xsh/compilation.html
|
|
1943 case "$opsys" in
|
|
1944 sol2)
|
|
1945 AC_DEFINE(__EXTENSIONS__)
|
|
1946 dnl Solaris 2 before 2.5 had some bugs with feature test macro interaction.
|
|
1947 if test "$os_release" -ge 505; then
|
|
1948 AC_DEFINE(_XOPEN_SOURCE,500)
|
|
1949 AC_DEFINE(_XOPEN_SOURCE_EXTENDED)
|
|
1950 fi ;;
|
|
1951 linux)
|
|
1952 AC_DEFINE(_POSIX_C_SOURCE,199506L)
|
|
1953 dnl #### should this be 600?
|
|
1954 AC_DEFINE(_XOPEN_SOURCE,500)
|
|
1955 AC_DEFINE(_XOPEN_SOURCE_EXTENDED)
|
|
1956 ;;
|
|
1957 freebsd4*)
|
|
1958 AC_DEFINE(_POSIX_C_SOURCE,199506L)
|
|
1959 dnl #### Do we want these too? Apparently yes for _XOPEN_SOURCE=500.
|
|
1960 AC_DEFINE(_XOPEN_SOURCE,500)
|
|
1961 dnl AC_DEFINE(_XOPEN_SOURCE_EXTENDED)
|
|
1962 ;;
|
|
1963 esac
|
|
1964
|
|
1965 dnl Identify compilers to enable compiler-specific hacks.
|
|
1966 dnl Add support for other compilers HERE!
|
|
1967 dnl GCC is already identified elsewhere.
|
|
1968 AC_RUN_IFELSE([AC_LANG_SOURCE([int main () {
|
|
1969 #if defined __SUNPRO_C
|
|
1970 return 11;
|
|
1971 #elif defined __DECC
|
|
1972 return 12;
|
|
1973 #elif defined __USLC__ && defined __SCO_VERSION__
|
|
1974 return 13;
|
|
1975 #elif defined __INTEL_COMPILER
|
|
1976 return 14;
|
|
1977 #else
|
|
1978 return 0;
|
|
1979 #endif
|
|
1980 }])], [],
|
|
1981 [case "$?" in
|
|
1982 11) echo "You appear to be using the SunPro C compiler." ; __SUNPRO_C=yes ;;
|
|
1983 12) echo "You appear to be using the DEC C compiler." ; __DECC=yes ;;
|
|
1984 13) echo "You appear to be using the SCO C compiler." ; __USLC__=yes ;;
|
|
1985 14) echo "You appear to be using the Intel C++ compiler."; __ICC=yes
|
|
1986 dnl Newer versions of icc claim to be GCC
|
|
1987 GCC=no ;;
|
|
1988 esac])
|
|
1989
|
|
1990 dnl --------------------------------------------------------------------
|
|
1991 dnl Extract some information from the operating system and machine files
|
|
1992 dnl --------------------------------------------------------------------
|
|
1993
|
|
1994 echo "Extracting information from the machine- and system-dependent headers..."
|
|
1995
|
|
1996 dnl It is not important that this name contain the PID; you cannot run
|
|
1997 dnl two configures in the same directory and have anything work
|
|
1998 dnl anyway.
|
|
1999 tempcname="conftest.c"
|
|
2000
|
|
2001 dnl CPP_to_sh(CPP_SYMBOL, SH_VAR, DEFAULT_VALUE)
|
|
2002 define([CPP_to_sh],
|
|
2003 [[#]ifndef [$1]
|
|
2004 [#]define [$1]ifelse([$3],,, [ "$3"])
|
|
2005 [#]endif
|
|
2006 configure___ [$2]=[$1]
|
|
2007 ])dnl CPP_to_sh
|
|
2008
|
|
2009 dnl CPP_boolean_to_sh(CPP_SYMBOL, SH_VAR)
|
|
2010 define([CPP_boolean_to_sh],
|
|
2011 [[#]ifdef [$1]
|
|
2012 configure___ [$2]=yes
|
|
2013 [#]else
|
|
2014 configure___ [$2]=no
|
|
2015 [#]endif
|
|
2016 ])dnl CPP_boolean_to_sh
|
|
2017
|
|
2018 cat > $tempcname < confdefs.h
|
|
2019 cat >> $tempcname <<EOF
|
|
2020 #define NOT_C_CODE
|
|
2021 #define C_SWITCH_SITE
|
|
2022 #define C_SWITCH_X_SITE
|
|
2023 #define LD_SWITCH_SITE
|
|
2024 #define LD_SWITCH_X_SITE
|
|
2025 #define LD_SWITCH_X_SITE_AUX
|
|
2026 #define OS_RELEASE $os_release
|
|
2027
|
|
2028 #ifdef config_opsysfile
|
|
2029 #include "$srcdir/src/$opsysfile"
|
|
2030 #endif
|
|
2031
|
|
2032 #ifdef config_machfile
|
|
2033 #include "$srcdir/src/$machfile"
|
|
2034 #endif
|
|
2035
|
|
2036 CPP_to_sh(LIBS_MACHINE, libs_machine)
|
|
2037 CPP_to_sh(LIBS_SYSTEM, libs_system)
|
|
2038 CPP_to_sh(LIBS_TERMCAP, libs_termcap)
|
|
2039 CPP_to_sh(LIB_STANDARD, libs_standard)
|
|
2040
|
|
2041 CPP_to_sh(OBJECTS_MACHINE, objects_machine)
|
|
2042 CPP_to_sh(OBJECTS_SYSTEM, objects_system)
|
|
2043
|
|
2044 CPP_to_sh(C_SWITCH_MACHINE, c_switch_machine)
|
|
2045 CPP_to_sh(C_SWITCH_SYSTEM, c_switch_system)
|
|
2046
|
|
2047 CPP_to_sh(LD_SWITCH_MACHINE, ld_switch_machine)
|
|
2048 CPP_to_sh(LD_SWITCH_SYSTEM, ld_switch_system)
|
|
2049
|
|
2050 CPP_to_sh(UNEXEC, unexec)
|
|
2051
|
|
2052 CPP_to_sh(SYSTEM_TYPE, system_type)
|
|
2053
|
|
2054 CPP_to_sh(LD_SWITCH_SHARED, ld_switch_shared, -c)
|
|
2055
|
|
2056 #define ORDINARY_LD "\$(CC) \$(CFLAGS)"
|
|
2057 configure___ ordinary_ld=ORDINARY_LD
|
|
2058
|
|
2059 #ifdef ORDINARY_LINK
|
|
2060 #define LD ORDINARY_LD
|
|
2061 #else /* no ORDINARY LINK */
|
|
2062 #ifdef COFF_ENCAPSULATE
|
|
2063 #define LD "\$(CC) -nostdlib"
|
|
2064 #else /* not COFF_ENCAPSULATE */
|
|
2065 #ifdef LINKER
|
|
2066 #define LD LINKER
|
|
2067 #else /* ! defined (LINKER) */
|
|
2068 #define LD "ld"
|
|
2069 #endif /* ! defined (LINKER) */
|
|
2070 #endif /* ! defined (COFF_ENCAPSULATE) */
|
|
2071 #endif /* not ORDINARY_LINK */
|
|
2072 configure___ ld=LD
|
|
2073
|
|
2074 CPP_to_sh(LIB_GCC, lib_gcc)
|
|
2075 CPP_to_sh(LD_TEXT_START_ADDR, ld_text_start_addr)
|
|
2076
|
|
2077 #if ! defined (ORDINARY_LINK) && !defined (START_FILES)
|
|
2078 #ifdef NO_REMAP
|
|
2079 #ifdef COFF_ENCAPSULATE
|
|
2080 #define START_FILES "pre-crt0.o /usr/local/lib/gcc-crt0.o"
|
|
2081 #else /* ! defined (COFF_ENCAPSULATE) */
|
|
2082 #define START_FILES "pre-crt0.o /lib/crt0.o"
|
|
2083 #endif /* ! defined (COFF_ENCAPSULATE) */
|
|
2084 #else /* ! defined (NO_REMAP) */
|
|
2085 #define START_FILES "ecrt0.o"
|
|
2086 #endif /* ! defined (NO_REMAP) */
|
|
2087 #endif /* no ORDINARY_LINK */
|
|
2088 #ifndef START_FILES
|
|
2089 #define START_FILES
|
|
2090 #endif
|
|
2091 configure___ start_files=START_FILES
|
|
2092
|
|
2093 CPP_boolean_to_sh(ORDINARY_LINK, ordinary_link)
|
|
2094 CPP_boolean_to_sh(SYSTEM_MALLOC, system_malloc)
|
|
2095 CPP_boolean_to_sh(TERMINFO, have_terminfo)
|
|
2096 dnl The MAIL_USE_xxx variables come from the s&m headers
|
|
2097 CPP_boolean_to_sh(MAIL_USE_FLOCK, mail_use_flock)
|
|
2098 CPP_boolean_to_sh(MAIL_USE_LOCKF, mail_use_lockf)
|
|
2099 CPP_boolean_to_sh(MAIL_USE_LOCKING, mail_use_locking)
|
|
2100 CPP_boolean_to_sh(HAVE_WIN32_PROCESSES, win32_processes)
|
|
2101 EOF
|
|
2102
|
|
2103 dnl The value of CPP is a quoted variable reference, so we need to do this
|
|
2104 dnl to get its actual value...
|
|
2105 CPP=`eval "echo $CPP $CPPFLAGS"`
|
|
2106 define(TAB, [ ])dnl
|
|
2107 eval `$CPP -Isrc $tempcname \
|
|
2108 | sed -n -e "s/[[ TAB]]*=[[ TAB\"]]*/='/" -e "s/[[ TAB\"]]*\$/'/" -e "s/^configure___//p"`
|
|
2109
|
|
2110 rm $tempcname
|
|
2111
|
|
2112 dnl s&m files shouldn't be required to define anything, or even to exist.
|
|
2113 dnl So we default SYSTEM_TYPE to the obvious documented standard, `uname -s`,
|
|
2114 dnl appropriately emacsulated.
|
|
2115 test -z "$system_type" && \
|
|
2116 AC_DEFINE_UNQUOTED(SYSTEM_TYPE,"`uname -s | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`")
|
|
2117
|
|
2118 dnl If the s&m files don't define a system-specific dumper, simply use pdump.
|
|
2119 dnl Sometime in the future, we'll remove all definitions of UNEXEC
|
|
2120 dnl from all the s&m files.
|
|
2121 test -z "$unexec" && enable_pdump=yes
|
|
2122
|
|
2123 if test "$enable_pdump" = "yes"; then
|
|
2124 ordinary_link="yes"
|
|
2125 ld="${ordinary_ld}"
|
|
2126 start_files=
|
|
2127 libs_standard=
|
|
2128 unexec=
|
|
2129 lib_gcc=
|
|
2130 fi
|
|
2131
|
3263
|
2132 dnl Enable KKCC by default
|
2790
|
2133 test -z "$enable_kkcc" && enable_kkcc=yes
|
|
2134
|
2720
|
2135 dnl Dump into executable
|
|
2136 if test -z "$enable_dump_in_exec"; then
|
|
2137 if test "$enable_pdump" = "yes"; then
|
3263
|
2138 if test "$enable_newgc" = "yes"; then
|
2720
|
2139 enable_dump_in_exec=no
|
|
2140 else
|
|
2141 enable_dump_in_exec=yes
|
|
2142 fi
|
|
2143 fi
|
|
2144 fi
|
|
2145
|
3092
|
2146 dnl New incremental garbage collector
|
|
2147 if test "$enable_newgc" = "yes"; then
|
|
2148 enable_kkcc=yes
|
|
2149 fi
|
|
2150
|
2651
|
2151 dnl For debugging...
|
|
2152 test "$verbose" = "yes" && \
|
|
2153 PRINT_VAR(libs_machine libs_system libs_termcap libs_standard
|
|
2154 objects_machine objects_system c_switch_machine c_switch_system
|
|
2155 ld_switch_machine ld_switch_system unexec ld_switch_shared
|
|
2156 ld lib_gcc ld_text_start_addr start_files ordinary_link
|
|
2157 have_terminfo mail_use_flock mail_use_lockf) && echo ""
|
|
2158
|
|
2159 dnl Pick up mingw include path
|
|
2160 dnl We only cope with headers in mingw, not mingw32: no previous version of
|
|
2161 dnl XEmacs supported mingw and cygnus have made this incompatible change
|
|
2162 dnl so we just go with the flow.
|
|
2163 case "$opsys" in mingw* | cygwin*)
|
3228
|
2164 cygwin_include=`eval gcc -print-search-dirs | sed -ne s'/install: //p'`
|
|
2165 cygwin_include=`eval "cd $cygwin_include/../../../..; pwd"`
|
|
2166 cygwin_include="-I$cygwin_include/include" ;
|
2651
|
2167 extra_includes="$cygwin_include/mingw $cygwin_include" ;
|
|
2168 case "$opsys" in mingw*)
|
|
2169 XE_APPEND($extra_includes, c_switch_system) ;;
|
|
2170 esac
|
|
2171 ;;
|
|
2172 esac
|
|
2173
|
|
2174 dnl Non-ordinary link usually requires -lc
|
|
2175 test "$ordinary_link" = "no" -a -z "$libs_standard" && libs_standard="-lc"
|
|
2176
|
|
2177 dnl -----------------------
|
|
2178 dnl Compiler-specific hacks
|
|
2179 dnl -----------------------
|
|
2180
|
|
2181 dnl DEC C `-std1' means ANSI C mode
|
|
2182 test "$__DECC" = "yes" && XE_APPEND(-std1, c_switch_site)
|
|
2183
|
|
2184 dnl Some versions of SCO native compiler need -Kalloca
|
|
2185 if test "$__USLC__" = yes; then
|
|
2186 AC_MSG_CHECKING(for whether the -Kalloca compiler flag is needed)
|
|
2187 need_kalloca=no
|
3317
|
2188 AC_LINK_IFELSE([AC_LANG_PROGRAM([], [void *x = alloca(4);])], [:], [
|
2651
|
2189 xe_save_c_switch_system="$c_switch_system"
|
|
2190 c_switch_system="$c_switch_system -Kalloca"
|
3317
|
2191 AC_LINK_IFELSE([AC_LANG_PROGRAM([], [void *x = alloca(4);])],
|
3312
|
2192 [ need_kalloca=yes ])
|
2651
|
2193 c_switch_system="$xe_save_c_switch_system"])
|
|
2194 AC_MSG_RESULT($need_kalloca)
|
|
2195 test "$need_kalloca" = "yes" && XE_APPEND(-Kalloca,c_switch_system)
|
|
2196 fi
|
|
2197
|
|
2198 dnl If we're specifying XEMACS_CC, it'd better be in the same family
|
|
2199 dnl as CC or the following flag calculations are bogus.
|
|
2200 dnl #### We may want to actually error and abort here, but I am not sure.
|
|
2201 if test "$CC" != "$XEMACS_CC"; then
|
|
2202 if test "$XEMACS_CC" = "g++" -a "$GCC" != "yes"; then
|
|
2203 AC_MSG_WARN([CC and g++ are mismatched; XE_CFLAGS may be wrong])
|
|
2204 xemacs_cc_cc_mismatch=yes
|
|
2205 elif test -n "$GCC" -a "$XEMACS_CC" != "g++"; then
|
|
2206 AC_MSG_WARN([gcc and XEMACS_CC are mismatched; XE_CFLAGS may be wrong])
|
|
2207 xemacs_cc_cc_mismatch=yes
|
|
2208 dnl #### Add other detectable mismatches here.
|
|
2209 else
|
|
2210 xemacs_cc_cc_mismatch=no
|
|
2211 fi
|
|
2212 fi
|
|
2213
|
|
2214 dnl Calculate optimization flags. These will be off by default in beta
|
|
2215 dnl versions and on in release versions.
|
|
2216
|
2667
|
2217 if test -z "$with_optimization"; then
|
2992
|
2218 # If user set --with-cflags-optimization, use it to unilaterally
|
|
2219 # determine whether optimization should be enabled.
|
|
2220 if test "$cflags_optimization_specified" = "yes" ; then
|
3443
|
2221 if test -z "$with_cflags_optimization" ; then
|
2992
|
2222 with_optimization=no
|
|
2223 else
|
|
2224 with_optimization=yes
|
|
2225 fi
|
|
2226 elif test -z "$emacs_is_beta" ; then
|
2667
|
2227 with_optimization=yes
|
|
2228 else
|
2651
|
2229 with_optimization=no
|
|
2230 fi
|
|
2231 fi
|
|
2232
|
|
2233
|
|
2234 dnl #### We should be checking C_OPTIMIZE_SWITCH in m/*, s/*.
|
|
2235
|
|
2236 AC_MSG_CHECKING([for preferred optimization flags])
|
|
2237 if test "$with_optimization" = "yes" ; then
|
|
2238 if test "$cflags_optimization_specified" = "no"; then
|
|
2239 dnl Following values of cflags_optimization are known to work well.
|
|
2240 dnl Should we take debugging options into consideration?
|
|
2241 if test "$GCC" = "yes"; then
|
|
2242 with_cflags_optimization="-O3"
|
|
2243 elif test "$__SUNPRO_C" = "yes"; then
|
|
2244 case "$opsys" in
|
|
2245 sol2 ) with_cflags_optimization="-xO4" ;;
|
|
2246 sunos4* ) with_cflags_optimization="-xO2" ;;
|
|
2247 esac
|
|
2248 elif test "$__DECC" = "yes"; then
|
|
2249 with_cflags_optimization="-O3"
|
|
2250 elif test "$CC" = "xlc"; then
|
|
2251 dnl see http://www.nersc.gov/vendor_docs/ibm/vac/sc094959.pdf
|
|
2252 with_cflags_optimization="-O3 -qstrict -qnoansialias -qlibansi -qmaxmem=20000"
|
|
2253 elif test "$__ICC" = "yes"; then
|
|
2254 with_cflags_optimization="-O3 -Ob2"
|
|
2255 dnl ### Add optimal cflags_optimization support for other compilers HERE!
|
|
2256 else
|
|
2257 with_cflags_optimization="-O" ;dnl The only POSIX-approved flag
|
|
2258 fi
|
|
2259 fi
|
|
2260 else
|
|
2261 with_cflags_optimization=
|
|
2262 fi
|
|
2263
|
|
2264 AC_MSG_RESULT([${with_cflags_optimization}])
|
|
2265
|
|
2266 dnl #### We should be checking C_DEBUG_SWITCH in m/*, s/*.
|
|
2267
|
|
2268 AC_MSG_CHECKING([for preferred debugging flags])
|
|
2269 if test "$cflags_debugging_specified" = "no"; then
|
|
2270 dnl ### Add optimal debugging support for other compilers HERE!
|
|
2271 with_cflags_debugging="-g"
|
|
2272
|
|
2273 debugging_ok_with_optimization=no
|
|
2274 if test "$GCC" = "yes" -o "$CC" = "xlc" -o "$__ICC" = "yes"; then
|
|
2275 debugging_ok_with_optimization=yes
|
|
2276 fi
|
|
2277
|
|
2278 if test "$with_optimization" = "yes" -a "$debugging_ok_with_optimization" = "no"; then
|
|
2279 with_cflags_debugging=
|
|
2280 fi
|
|
2281 fi
|
|
2282 AC_MSG_RESULT([${with_cflags_debugging}])
|
|
2283
|
|
2284 dnl Calculate warning flags. We separate the flags for warnings from
|
|
2285 dnl the other flags because we want to force the warnings to be seen
|
|
2286 dnl by everyone who doesn't specifically override them.
|
|
2287
|
|
2288 AC_MSG_CHECKING([for preferred warning flags for XEMACS_CC])
|
|
2289
|
|
2290 dnl If this stays nil, it will be set to cflags_warning before use.
|
|
2291 xe_cflags_warning=""
|
|
2292
|
|
2293 if test "$cflags_warning_specified" = "no"; then
|
|
2294 dnl Following warning flags are known to work well.
|
|
2295 if test "$__SUNPRO_C" = "yes"; then
|
|
2296 case "$opsys" in
|
|
2297 sol2 ) with_cflags_warning="-v" ;;
|
|
2298 esac
|
|
2299 elif test "$CC" = "xlc"; then
|
|
2300 with_cflags_warning="-qinfo"
|
|
2301 elif test "$GCC" = "yes"; then
|
|
2302 with_cflags_warning="-Wall -Wno-switch -Wundef"
|
|
2303 dnl This is not very useful, as it issues warnings that may appear
|
|
2304 dnl or disappear rather randomly, cannot easily be fixed, and are
|
|
2305 dnl not a big deal. If you want it, add it yourself.
|
|
2306 dnl with_cflags_warning="$with_cflags_warning -Winline"
|
|
2307
|
|
2308 dnl Yuck, bad compares have been worth at least 3 crashes!
|
|
2309 dnl Warnings about char subscripts are pretty pointless, though,
|
|
2310 dnl and we use them in various places.
|
|
2311 with_cflags_warning="$with_cflags_warning -Wsign-compare -Wno-char-subscripts"
|
3494
|
2312 test "$__GCC" -ge 3 && with_cflags_warning="$with_cflags_warning -Wpacked"
|
2651
|
2313 dnl glibc is intentionally not `-Wpointer-arith'-clean.
|
|
2314 dnl Ulrich Drepper has rejected patches to fix the glibc header files.
|
|
2315 test "$have_glibc" != "yes" && \
|
|
2316 with_cflags_warning="$with_cflags_warning -Wpointer-arith"
|
|
2317 dnl Warning flags that may differ for gcc and g++ (xemacs_compiler)
|
|
2318 dnl With g++, -Wshadow produces five zillion utterly random warnings --
|
|
2319 dnl a local var named `buffer' conflicts with `struct buffer' for
|
|
2320 dnl example. Even with gcc, -Wshadow is questionable because of its
|
|
2321 dnl complaints about parameters with the same names as global functions.
|
|
2322 dnl There is no -Wmissing-declarations under g++.
|
|
2323 dnl But gcc warns about -Weffc++ in C compiles.
|
|
2324 dnl With g++, there is no effective way to use -Wunused-parameter without
|
|
2325 dnl some very ugly code changes.
|
|
2326 if test "$with_xemacs_compiler" = "g++"; then
|
|
2327 xe_cflags_warning="$with_cflags_warning -Weffc++"
|
3494
|
2328 elif test "$__GCC" -ge 3; then
|
2651
|
2329 xe_cflags_warning="$with_cflags_warning -Wunused-parameter"
|
3494
|
2330 if test "$__GCC" -gt 3 || test "$__GCC_MINOR" -ge 4; then
|
|
2331 with_cflags_warning="$with_cflags_warning -Wdeclaration-after-statement"
|
|
2332 fi
|
2651
|
2333 fi
|
|
2334 with_cflags_warning="$with_cflags_warning -Wshadow -Wmissing-declarations"
|
|
2335 with_cflags_warning="$with_cflags_warning -Wmissing-prototypes -Wstrict-prototypes"
|
|
2336 dnl **** If more gcc/g++ flags are added, from here on must handle
|
|
2337 dnl **** with_cflags_warning and xe_cflags_warning in parallel
|
|
2338 elif test "$__ICC" = "yes"; then
|
|
2339 with_cflags_warning="-Wall -w1 -we147"
|
|
2340 dnl ### Add optimal with_cflags_warning support for other compilers HERE!
|
|
2341 fi
|
|
2342 fi
|
|
2343 test -z "$xe_cflags_warning" && xe_cflags_warning="$with_cflags_warning"
|
|
2344 AC_MSG_RESULT([${xe_cflags_warning}])
|
|
2345
|
|
2346 AC_MSG_CHECKING([for preferred warning flags for CC])
|
|
2347 AC_MSG_RESULT([${with_cflags_warning}])
|
|
2348
|
|
2349 dnl Calculate remaining cflags.
|
|
2350 dnl Use either command line flag, environment var, or autodetection
|
|
2351
|
|
2352 AC_MSG_CHECKING([for remaining CFLAGS])
|
|
2353
|
|
2354 if test "$cflags_specified" = "no"; then
|
|
2355 dnl Following values of CFLAGS are known to work well.
|
|
2356 if test "$CC" = "xlc"; then
|
|
2357 CFLAGS="-qro"
|
|
2358 dnl ### Add optimal CFLAGS support for other compilers HERE!
|
|
2359 fi
|
|
2360 fi
|
|
2361 AC_MSG_RESULT([${CFLAGS}])
|
|
2362
|
|
2363 dnl Now combine all C flags. Put the warning and optimization flags first
|
|
2364 dnl so that user-specified flags will override.
|
|
2365 dnl Do XE_CFLAGS before adding flags to CFLAGS.
|
|
2366 dnl Flags for XEMACS_CC:
|
|
2367
|
|
2368 XE_CFLAGS="$xe_cflags_warning $with_cflags_debugging $with_cflags_optimization $CFLAGS"
|
|
2369 dnl Flags for CC:
|
|
2370 CFLAGS="$with_cflags_warning $with_cflags_debugging $with_cflags_optimization $CFLAGS"
|
|
2371
|
|
2372 AC_MSG_CHECKING([total value of XE_CFLAGS])
|
|
2373 AC_MSG_RESULT([${XE_CFLAGS}])
|
|
2374 AC_MSG_CHECKING([total value of CFLAGS])
|
|
2375 AC_MSG_RESULT([${CFLAGS}])
|
|
2376
|
|
2377 dnl Search for GCC specific build problems we know about
|
|
2378 if test "$GCC" = "yes"; then
|
|
2379 AC_MSG_CHECKING(for buggy gcc versions)
|
|
2380 GCC_VERSION=`$CC --version`
|
|
2381 case `uname -s`:`uname -m`:$GCC_VERSION in
|
|
2382 dnl egcs 2.90.21 (egcs-1.00 release)
|
|
2383 dnl egcs 2.90.29 (egcs-1.0.3 release)
|
|
2384 *:sun4*:2.8.1|*:sun4*:egcs-2.90.*)
|
|
2385 dnl Don't use -O2 with gcc 2.8.1 and egcs 1.0 under SPARC architectures
|
|
2386 dnl without also using `-fno-schedule-insns'.
|
|
2387 case "$CFLAGS" in
|
|
2388 *-O2*|*-O3*)
|
|
2389 case "$CFLAGS" in
|
|
2390 *-fno-schedule-insns*) ;;
|
|
2391 *)
|
|
2392 AC_MSG_RESULT(yes)
|
|
2393 AC_MSG_WARN([Don't use -O2 with gcc 2.8.1 and egcs 1.0 under SPARC architectures])
|
|
2394 AC_MSG_WARN([without also using -fno-schedule-insns.])
|
|
2395 AC_MSG_ERROR([Aborting due to known problem])
|
|
2396 ;;
|
|
2397 esac
|
|
2398 ;;
|
|
2399 esac
|
|
2400 ;;
|
|
2401 dnl egcs-2.91.57 (egcs-1.1 release)
|
|
2402 dnl egcs-2.91.66 (egcs-1.1.2 release)
|
|
2403 Linux:alpha:egcs-2.91.*)
|
|
2404 AC_MSG_RESULT(yes)
|
|
2405 AC_MSG_WARN([There have been reports of egcs-1.1 not compiling XEmacs correctly on])
|
|
2406 AC_MSG_WARN([Alpha Linux. There have also been reports that egcs-1.0.3a is O.K.])
|
|
2407 AC_MSG_ERROR([Aborting due to known problem])
|
|
2408 ;;
|
|
2409 *:i*86*:2.7.2*)
|
|
2410 case "$CFLAGS" in
|
|
2411 *-O2*|*-O3*)
|
|
2412 case "$GCC_VERSION" in
|
|
2413 2.7.2)
|
|
2414 case "$CFLAGS" in
|
|
2415 *-fno-strength-reduce*) ;;
|
|
2416 *)
|
|
2417 AC_MSG_RESULT(yes)
|
|
2418 AC_MSG_WARN([Don't use -O2 with gcc 2.7.2 under Intel/XXX without also using])
|
|
2419 AC_MSG_WARN([-fno-strength-reduce.])
|
|
2420 AC_MSG_ERROR([Aborting due to known problem])
|
|
2421 ;;
|
|
2422 esac
|
|
2423 ;;
|
|
2424 esac
|
|
2425 case "$CFLAGS" in
|
|
2426 *-fno-caller-saves*) ;;
|
|
2427 *)
|
|
2428 AC_MSG_RESULT(yes)
|
|
2429 AC_MSG_WARN([Don't use -O2 with gcc 2.7.2 under Intel/XXX without also using])
|
|
2430 AC_MSG_WARN([-fno-caller-saves.])
|
|
2431 AC_MSG_ERROR([Aborting due to known problem])
|
|
2432 ;;
|
|
2433 esac
|
|
2434 ;;
|
|
2435 esac
|
|
2436 ;;
|
|
2437 esac
|
|
2438 AC_MSG_RESULT(no)
|
|
2439 fi
|
|
2440
|
|
2441 dnl GNU ld now defaults to combreloc, which screws up unexec, but not pdump.
|
|
2442 dnl Note that it's OK if the GNU style long option causes non-GNU ld to barf
|
|
2443 dnl a usage message, that's often good enough. Please report it, though.
|
|
2444 dnl #### Should make this Solaris-friendly.
|
|
2445 dnl Link with -z nocombreloc for now.
|
|
2446 if test "$enable_pdump" != "yes"; then
|
3312
|
2447 AC_MSG_CHECKING([for "-z nocombreloc" linker flag])
|
2651
|
2448 case "`ld --help 2>&1`" in
|
|
2449 *-z\ nocombreloc* ) AC_MSG_RESULT(yes)
|
|
2450 XE_PREPEND(-z nocombreloc, ld_switch_site) ;;
|
|
2451 *) AC_MSG_RESULT(no) ;;
|
|
2452 esac
|
|
2453 fi
|
|
2454
|
|
2455 dnl Inform compiler that certain flags are meant for the linker
|
|
2456 XE_PROTECT_LINKER_FLAGS(ld_switch_system)
|
|
2457 XE_PROTECT_LINKER_FLAGS(ld_switch_machine)
|
|
2458 XE_PROTECT_LINKER_FLAGS(ld_switch_site)
|
|
2459 XE_PROTECT_LINKER_FLAGS(LDFLAGS)
|
|
2460 XE_PROTECT_LINKER_FLAGS(ld_call_shared)
|
|
2461
|
|
2462 dnl Add s&m-determined objects (including unexec) to link line
|
|
2463 test -n "$objects_machine" && XE_ADD_OBJS($objects_machine)
|
|
2464 test -n "$objects_system" && XE_ADD_OBJS($objects_system)
|
|
2465 test -n "$unexec" && test ! "$enable_pdump" = "yes" && XE_ADD_OBJS($unexec)
|
|
2466 test "$enable_pdump" = "yes" && XE_ADD_OBJS(dumper.o)
|
|
2467
|
|
2468 dnl Dynodump (Solaris 2.x, x<6)
|
|
2469 AC_MSG_CHECKING(for dynodump)
|
|
2470 if test "$unexec" != "unexsol2.o"; then
|
|
2471 AC_MSG_RESULT(no)
|
|
2472 else
|
|
2473 AC_MSG_RESULT(yes)
|
|
2474 AC_DEFINE(DYNODUMP)
|
|
2475 XE_APPEND(dynodump, MAKE_SUBDIR)
|
|
2476 XE_APPEND(dynodump, SRC_SUBDIR_DEPS)
|
|
2477 case "$machine" in
|
|
2478 sparc ) dynodump_arch=sparc ;;
|
|
2479 *86* ) dynodump_arch=i386 ;;
|
|
2480 powerpc ) dynodump_arch=ppc ;;
|
|
2481 esac
|
|
2482 fi
|
|
2483
|
|
2484 dnl Feed s&m crud to src/Makefile
|
|
2485
|
|
2486 dnl Linux/powerpc needs the following magic for some reason
|
|
2487 dnl [Not needed with YellowDog 2.3 and causes link problems with YellowDog 3.0,
|
|
2488 dnl the two most popular PowerPC distributions.]
|
|
2489 dnl test "$machine$opsys" = "powerpclinux" && start_flags="-T $srcdir/src/ppc.ldscript"
|
|
2490
|
|
2491 AC_LANG(C)
|
|
2492 if test "$unexec" = "unexaix.o"; then
|
|
2493 dnl AIX needs various hacks to make static linking work.
|
|
2494 if test "$with_dynamic" = "no"; then
|
|
2495 start_flags="-Wl,-bnso,-bnodelcsect"
|
|
2496 test "$GCC" = "yes" && start_flags="-B/bin/ ${start_flags}"
|
|
2497 for f in "/lib/syscalls.exp" "/lib/threads.exp"; do
|
|
2498 if test -r "$f"; then start_flags="${start_flags},-bI:${f}"; fi
|
|
2499 done
|
|
2500 for f in "/usr/lpp/X11/bin/smt.exp" "/usr/bin/X11/smt.exp"; do
|
|
2501 if test -r "$f"; then start_flags="${start_flags},-bI:${f}"; break; fi
|
|
2502 done
|
|
2503 AC_CHECK_LIB([c], [terminateAndUnload], [XE_APPEND(-lC, libs_system)])
|
|
2504 fi
|
|
2505 elif test -n "$ld_text_start_addr"; then
|
|
2506 start_flags="-T $ld_text_start_addr -e __start"
|
|
2507 fi
|
|
2508 AC_SUBST(start_flags)
|
|
2509
|
|
2510 AC_SUBST(ld_switch_shared)
|
|
2511 AC_SUBST(start_files)
|
|
2512 if test "$ordinary_link" = "no" -a "$GCC" = "yes"; then
|
|
2513 test -z "$linker" && linker='$(CC) -nostdlib'
|
|
2514 test -z "$lib_gcc" && lib_gcc='`$(CC) -print-libgcc-file-name`'
|
|
2515 fi
|
|
2516 test "$GCC" != "yes" && lib_gcc=
|
|
2517 AC_SUBST(ld)
|
|
2518 AC_SUBST(lib_gcc)
|
|
2519
|
|
2520 dnl ---------------------------------------------------------------
|
|
2521 dnl Get version information for:
|
|
2522 dnl C compiler, libc
|
|
2523 dnl #### should do CC compiler, too, if different from XEMACS_CC
|
|
2524 dnl ---------------------------------------------------------------
|
|
2525
|
|
2526 compiler_version=""
|
|
2527 gcc_compiler_specs=""
|
|
2528 libc_version=""
|
|
2529
|
|
2530 AC_MSG_CHECKING([for compiler version information])
|
|
2531
|
|
2532 dnl First try portable compilers, then crack system secrets
|
|
2533 dnl #### Is this code correct if $XEMACS_CC != $CC? XEMACS_CC hasn't been
|
|
2534 dnl run through the AC_PROG_CC mill.
|
|
2535 dnl Would anybody really build libsrc with GCC and XEmacs with non-GCC?
|
|
2536 if test "$GCC" = "yes"; then
|
2692
|
2537 compiler_version=`$XEMACS_CC --version | sed 1q`
|
|
2538 gcc_compiler_specs=`$XEMACS_CC -v 2>&1 | sed 's/.* \([[^ ]]\)/\1/' | sed 1q`
|
2651
|
2539 else case "$XEMACS_CC" in
|
|
2540 dnl The Intel cc compiler
|
|
2541 ic*)
|
2692
|
2542 compiler_version=`icc -V 2>&1 | sed 1q`
|
2651
|
2543 ;;
|
|
2544 dnl non-gcc machine-specific magic - contributions welcome
|
|
2545 *) case "$ac_cv_build" in
|
|
2546 *-*-aix* )
|
|
2547 dnl Yes, it's this ugly for AIX...
|
|
2548 realcc=`which $XEMACS_CC`
|
|
2549 dnl Might be a symlink created by replaceCset command
|
|
2550 if test -L $realcc ; then
|
|
2551 ccdir=`dirname $realcc`
|
|
2552 ccprog=`/bin/ls -l $realcc | sed 's/.* \([[^ ]]\)/\1/'`
|
|
2553 dnl This doesn't handle ../../xlc type stuff, but I've not seen one...
|
|
2554 case $ccprog in
|
|
2555 */*) realcc=$ccprog;;
|
|
2556 *) realcc=$ccdir/$ccprog;;
|
|
2557 esac
|
|
2558 fi
|
|
2559 lpp=`lslpp -wqc $realcc | cut -f2 -d:`
|
|
2560 if test ! -z "$lpp" ; then
|
|
2561 lppstr=`lslpp -Lqc $lpp`
|
|
2562 lpplev=`echo "$lppstr" | cut -f3 -d:`
|
|
2563 lppdesc=`echo "$lppstr" | cut -f8 -d:`
|
|
2564 fi
|
|
2565 if test ! -z "$lpplev" ; then
|
|
2566 compiler_version="$lpp $lpplev - $lppdesc"
|
|
2567 fi
|
|
2568 ;;
|
|
2569
|
|
2570 *-*-solaris*)
|
2692
|
2571 compiler_version=`$XEMACS_CC -V 2>&1 | sed 1q`
|
2651
|
2572 ;;
|
|
2573
|
|
2574 alpha*-dec-osf*)
|
|
2575 compiler_version=`$XEMACS_CC -V | tr '\n' ' '`
|
|
2576 ;;
|
|
2577
|
|
2578 mips-sgi-irix*)
|
|
2579 compiler_version=`$XEMACS_CC -version`
|
|
2580 ;;
|
|
2581 esac
|
|
2582 esac
|
|
2583 fi
|
|
2584
|
|
2585 dnl Awww, shucks.
|
|
2586 if test -z "$compiler_version"; then
|
|
2587 compiler_version="detection failed (please report this)"
|
|
2588 fi
|
|
2589 AC_MSG_RESULT([$compiler_version])
|
|
2590
|
|
2591 AC_MSG_CHECKING(for standard C library version information)
|
|
2592
|
|
2593 case "$ac_cv_build" in
|
|
2594 *-*-linux*)
|
|
2595 dnl #### who would ever _not_ be running the distro's libc?
|
|
2596 dnl Maybe it would be better to get/augment this info with ldd?
|
|
2597 if test -f /etc/redhat-release ; then
|
|
2598 libc_version=`rpm -q glibc`
|
|
2599 elif test -f /etc/debian_version ; then
|
|
2600 libc_version=`dpkg-query --showformat='${version}' --show libc6`
|
|
2601 libc_version="GNU libc $libc_version (Debian)"
|
|
2602 dnl need SuSE et al checks here...
|
|
2603 fi
|
|
2604 dnl #### Tested on Debian, does this actually work elsewhere? ;-)
|
|
2605 if test -z "$libc_version"; then
|
|
2606 libc_version=`ls /lib/libc-*.so | sed -e 's,/lib/libc-\(.*\)\.so,\1,'`
|
|
2607 fi
|
|
2608 ;;
|
|
2609
|
|
2610 *-*-aix*)
|
|
2611 libc_version="bos.rte.libc `lslpp -Lqc bos.rte.libc | cut -f3 -d:`"
|
|
2612 ;;
|
|
2613
|
|
2614 *-*-solaris*)
|
|
2615 libc=`pkginfo -l SUNWcsl | grep VERSION: | awk '{print $2}'`
|
|
2616 libc_version="SUNWcsl $libc"
|
|
2617
|
|
2618 ;;
|
|
2619
|
|
2620 mips-sgi-irix*)
|
|
2621 libc_version="IRIX libc `uname -sRm`"
|
|
2622 ;;
|
|
2623
|
|
2624 alpha*-dec-osf*)
|
|
2625 dnl Another ugly case
|
|
2626 (cd /usr/.smdb.;
|
|
2627 libc_version=` grep -h libc.so *.inv | awk '$9 == "f" {print $12}' | tr '\n' ','`
|
|
2628 )
|
|
2629 ;;
|
|
2630 esac
|
|
2631
|
|
2632 dnl Awww, shucks.
|
|
2633 if test -z "libc_version"; then
|
|
2634 libc_version="detection failed (please report this)"
|
|
2635 fi
|
|
2636 AC_MSG_RESULT([$libc_version])
|
|
2637
|
|
2638 dnl ---------------------------------------------------------------
|
|
2639 dnl Add site and system specific flags to compile and link commands
|
|
2640 dnl ---------------------------------------------------------------
|
|
2641
|
|
2642 dnl --with-site-libraries (multiple dirs)
|
|
2643 COLON_TO_SPACE(with_site_libraries)
|
|
2644 if test -n "$with_site_libraries"; then
|
|
2645 for arg in $with_site_libraries; do
|
|
2646 case "$arg" in
|
|
2647 -* ) ;;
|
|
2648 * ) test -d "$arg" || \
|
|
2649 XE_DIE("Invalid site library \`$arg': no such directory")
|
|
2650 arg="-L${arg}" ;;
|
|
2651 esac
|
|
2652 XE_APPEND($arg, ld_switch_site)
|
|
2653 done
|
|
2654 fi
|
|
2655
|
|
2656 dnl --with-site-includes (multiple dirs)
|
|
2657 COLON_TO_SPACE(with_site_includes)
|
|
2658 if test -n "$with_site_includes"; then
|
|
2659 for arg in $with_site_includes; do
|
|
2660 case "$arg" in
|
|
2661 -* ) ;;
|
|
2662 * ) test -d "$arg" || \
|
|
2663 XE_DIE("Invalid site include \`$arg': no such directory")
|
|
2664 arg="-I${arg}" ;;
|
|
2665 esac
|
|
2666 XE_APPEND($arg, c_switch_site)
|
|
2667 done
|
|
2668 fi
|
|
2669
|
|
2670 dnl --with-site-prefixes (multiple dirs)
|
|
2671 dnl --with-site-prefixes=dir1:dir2 is a convenient shorthand for
|
|
2672 dnl --with-site-libraries=dir1/lib:dir2/lib --with-site-includes=dir1/include:dir2/include
|
|
2673 dnl Site prefixes take precedence over the standard places, but not over
|
|
2674 dnl with-site-includes and with-site-libraries.
|
|
2675 COLON_TO_SPACE(with_site_prefixes)
|
|
2676 if test -n "$with_site_prefixes"; then
|
|
2677 for dir in $with_site_prefixes; do
|
|
2678 lib_dir="${dir}/lib"
|
|
2679 inc_dir="${dir}/include"
|
|
2680 if test ! -d "$dir"; then
|
|
2681 XE_DIE("Invalid site prefix \`$dir': no such directory")
|
|
2682 elif test ! -d "$lib_dir"; then
|
|
2683 XE_DIE("Invalid site prefix \`$dir': no such directory \`$lib_dir'")
|
|
2684 else
|
|
2685 if test -d "$inc_dir"; then
|
|
2686 XE_APPEND("-I$inc_dir", c_switch_site)
|
|
2687 fi
|
|
2688 XE_APPEND("-L$lib_dir", ld_switch_site)
|
|
2689 fi
|
|
2690 done
|
|
2691 fi
|
|
2692
|
|
2693 dnl GNU software installs by default into /usr/local/{include,lib}
|
|
2694 dnl if test -d "/usr/local/include" -a -d "/usr/local/lib"; then
|
|
2695 dnl XE_APPEND("-L/usr/local/lib", ld_switch_site)
|
|
2696 dnl XE_APPEND("-I/usr/local/include", c_switch_site)
|
|
2697 dnl fi
|
|
2698
|
|
2699 dnl Extra system-specific library directories - please add to list
|
|
2700 for dir in "/usr/ccs/lib"; do
|
|
2701 test -d "$dir" && XE_APPEND(-L${dir}, ld_switch_system)
|
|
2702 done
|
|
2703
|
|
2704 dnl --with-site-runtime-libraries (multiple dirs)
|
|
2705 COLON_TO_SPACE(with_site_runtime_libraries)
|
|
2706 if test -n "$with_site_runtime_libraries"; then
|
|
2707 LD_RUN_PATH="`echo $with_site_runtime_libraries | sed -e 's/ */:/g'`"
|
|
2708 export LD_RUN_PATH
|
|
2709 fi
|
|
2710
|
|
2711 dnl Linux systems have dynamic runtime library directories listed in
|
|
2712 dnl /etc/ld.so.conf. Since those are used at run time, it seems pretty
|
|
2713 dnl safe to use them at link time, and less controversial than forcing
|
|
2714 dnl the run-time to use the link-time libraries. This also helps avoid
|
|
2715 dnl mismatches between the link-time and run-time libraries.
|
|
2716
|
|
2717 dnl #### Unfortunately, there are horrible libc4 and libc5 libraries
|
|
2718 dnl listed in /etc/ld.so.conf on some systems, and including them on
|
|
2719 dnl the link path leads to linking in utterly broken libc's.
|
|
2720 dnl There are many clever ways of approaching this problem,
|
|
2721 dnl but finding one that actually works...
|
|
2722
|
|
2723 dnl if test -z "$LD_RUN_PATH" -a -r "/etc/ld.so.conf"; then
|
|
2724 dnl for dir in `cat /etc/ld.so.conf`; do
|
|
2725 dnl test -d "$dir" && XE_APPEND(-L${dir}, ld_switch_system)
|
|
2726 dnl done
|
|
2727 dnl add_runtime_path=no
|
|
2728 dnl fi
|
|
2729
|
|
2730 dnl -------------------------------------
|
|
2731 dnl Compute runtime library path
|
|
2732 dnl -------------------------------------
|
|
2733
|
|
2734 if test -n "$add_runtime_path"; then :;
|
|
2735 elif test "$with_dynamic" = "no"; then add_runtime_path=no
|
|
2736 elif test -n "$LD_RUN_PATH"; then add_runtime_path=yes
|
|
2737 else case "$opsys" in
|
|
2738 sol2 | irix* | *bsd* | decosf* ) add_runtime_path=yes ;;
|
|
2739 * ) add_runtime_path=no ;;
|
|
2740 esac
|
|
2741 fi
|
|
2742
|
|
2743 if test "$add_runtime_path" = "yes"; then
|
|
2744 dnl Try to autodetect runtime library flag (usually -R),
|
|
2745 dnl and whether it works (or at least does no harm)
|
3312
|
2746 AC_MSG_CHECKING([for runtime libraries flag])
|
2651
|
2747 case "$opsys" in
|
|
2748 sol2 ) dash_r="-R" ;;
|
|
2749 decosf* | linux* | irix*) dash_r="-rpath " ;;
|
|
2750 *)
|
|
2751 dash_r=""
|
|
2752 for try_dash_r in "-R" "-R " "-rpath "; do
|
|
2753 xe_check_libs="${try_dash_r}/no/such/file-or-directory"
|
|
2754 XE_PROTECT_LINKER_FLAGS(xe_check_libs)
|
3312
|
2755 AC_LINK_IFELSE([], dash_r="$try_dash_r")
|
2651
|
2756 xe_check_libs=""
|
|
2757 test -n "$dash_r" && break
|
|
2758 done ;;
|
|
2759 esac
|
|
2760 if test -n "$dash_r";
|
3312
|
2761 then AC_MSG_RESULT(["${dash_r}"])
|
2651
|
2762 else AC_MSG_RESULT(NONE)
|
|
2763 fi
|
|
2764 fi
|
|
2765
|
|
2766 xe_add_unique_runpath_dir='
|
|
2767 xe_add_p=yes
|
|
2768 for xe_dir in $runpath_dirs; do dnl Uniquify
|
|
2769 test "$xe_dir" = "$xe_runpath_dir" && xe_add_p=no
|
|
2770 done
|
|
2771 if test "$xe_add_p" = "yes"; then
|
|
2772 test -n "$runpath" && runpath="${runpath}:"
|
|
2773 runpath="${runpath}${xe_runpath_dir}"
|
|
2774 runpath_dirs="$runpath_dirs $xe_runpath_dir"
|
|
2775 fi'
|
|
2776
|
|
2777 XE_COMPUTE_RUNPATH()
|
|
2778
|
|
2779 dnl -----------------------------------
|
|
2780 dnl Do some misc autoconf-special tests
|
|
2781 dnl -----------------------------------
|
|
2782
|
|
2783 dnl Do the opsystem or machine files prohibit the use of the GNU malloc?
|
|
2784 dnl Assume not, until told otherwise.
|
|
2785 GNU_MALLOC=yes
|
|
2786 if test "$with_dlmalloc" != "no"; then
|
|
2787 doug_lea_malloc=yes
|
|
2788 else
|
|
2789 doug_lea_malloc=no
|
|
2790 fi
|
|
2791 after_morecore_hook_exists=yes
|
|
2792 AC_CHECK_FUNC(malloc_set_state, ,doug_lea_malloc=no)
|
|
2793 AC_MSG_CHECKING(whether __after_morecore_hook exists)
|
3312
|
2794 AC_LINK_IFELSE([AC_LANG_PROGRAM([extern void (* __after_morecore_hook)();],
|
|
2795 [__after_morecore_hook = 0])],
|
2651
|
2796 [AC_MSG_RESULT(yes)],
|
|
2797 [AC_MSG_RESULT(no)
|
|
2798 after_morecore_hook_exists=no])
|
|
2799 if test "$system_malloc" = "yes" ; then
|
|
2800 GNU_MALLOC=no
|
|
2801 GNU_MALLOC_reason="
|
|
2802 - The GNU allocators don't work with this system configuration."
|
|
2803 elif test "$with_system_malloc" = "yes" ; then
|
|
2804 GNU_MALLOC=no
|
|
2805 GNU_MALLOC_reason="
|
|
2806 - User chose not to use GNU allocators."
|
|
2807 elif test "$with_debug_malloc" = "yes" ; then
|
|
2808 GNU_MALLOC=no
|
|
2809 GNU_MALLOC_reason="
|
|
2810 - User chose to use Debugging Malloc."
|
|
2811 fi
|
|
2812
|
|
2813 if test "$doug_lea_malloc" = "yes" -a "$GNU_MALLOC" = "yes" ; then
|
|
2814 GNU_MALLOC_reason="
|
|
2815 - Using Doug Lea's new malloc from the GNU C Library."
|
|
2816 AC_DEFINE(DOUG_LEA_MALLOC)
|
|
2817 if test "$after_morecore_hook_exists" = "no" ; then
|
|
2818 GNU_MALLOC_reason="
|
|
2819 - Using Doug Lea's new malloc from the Linux C Library."
|
|
2820 AC_DEFINE(_NO_MALLOC_WARNING_)
|
|
2821 fi
|
|
2822 fi
|
|
2823
|
|
2824 dnl #### mcheck is broken in all versions of Linux libc and glibc.
|
|
2825 dnl Try this again when 2.1 hits the streets.
|
|
2826 dnl Avoid using free-hook.c if support exists for malloc debugging in libc
|
|
2827 dnl have_libmcheck=no
|
|
2828 dnl if test "$enable_error_checking_malloc" = "yes" -a \
|
|
2829 dnl "$have_glibc" = "yes" -a \
|
|
2830 dnl "$doug_lea_malloc" = "yes"; then
|
|
2831 dnl AC_CHECK_HEADERS(mcheck.h)
|
|
2832 dnl AC_CHECK_LIB(mcheck, mcheck, have_libmcheck=yes, have_libmcheck=no)
|
|
2833 dnl fi
|
|
2834
|
|
2835 dnl if test "$have_libmcheck" = "yes"; then
|
|
2836 dnl AC_DEFINE(HAVE_LIBMCHECK)
|
|
2837 dnl libmcheck=-lmcheck
|
|
2838 dnl AC_SUBST(libmcheck)
|
|
2839 dnl fi
|
|
2840
|
|
2841 dnl Some other nice autoconf tests. If you add a test here which
|
|
2842 dnl should make an entry in src/config.h, do not forget to add an
|
|
2843 dnl #undef clause to src/config.h.in for autoconf to modify.
|
|
2844
|
|
2845 AC_PROG_RANLIB
|
|
2846 AC_PROG_INSTALL
|
|
2847 AC_PROG_YACC
|
|
2848
|
|
2849 dnl checks for header files
|
|
2850 AC_CHECK_HEADERS(dnl
|
|
2851 a.out.h dnl
|
|
2852 elf.h dnl
|
|
2853 cygwin/version.h dnl
|
|
2854 fcntl.h dnl
|
|
2855 libgen.h dnl
|
|
2856 locale.h dnl
|
|
2857 wchar.h dnl
|
|
2858 mach/mach.h dnl
|
|
2859 sys/param.h dnl
|
|
2860 sys/pstat.h dnl
|
|
2861 sys/resource.h dnl
|
|
2862 sys/time.h dnl
|
|
2863 sys/timeb.h dnl
|
|
2864 sys/times.h dnl
|
|
2865 sys/un.h dnl
|
|
2866 sys/vlimit.h dnl
|
|
2867 ulimit.h dnl
|
|
2868 )
|
|
2869 AC_HEADER_SYS_WAIT
|
|
2870 AC_HEADER_STDC
|
|
2871 AC_HEADER_TIME
|
|
2872 AC_CHECK_DECLS([sys_siglist],,,
|
|
2873 [#include <signal.h>
|
|
2874 /* NetBSD declares sys_siglist in unistd.h. */
|
|
2875 #if HAVE_UNISTD_H
|
|
2876 # include <unistd.h>
|
|
2877 #endif
|
667
|
2878 ])
|
2651
|
2879
|
|
2880
|
|
2881 dnl ----------------------------------------------------------------
|
|
2882 dnl Checking for utime() or utimes().
|
|
2883 dnl We prefer utime, since it is more standard.
|
|
2884 dnl Some systems have utime.h but do not declare the struct anyplace,
|
|
2885 dnl so we use a more sophisticated test for utime than AC_CHECK_FUNCS.
|
|
2886 dnl ----------------------------------------------------------------
|
|
2887 AC_MSG_CHECKING(for utime)
|
3312
|
2888 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <sys/types.h>
|
2651
|
2889 #include <utime.h>],
|
3312
|
2890 [struct utimbuf x; x.actime = x.modtime = 0; utime ("/", &x);])],
|
2651
|
2891 [AC_MSG_RESULT(yes)
|
|
2892 AC_DEFINE(HAVE_UTIME)],
|
|
2893 [AC_MSG_RESULT(no)
|
|
2894 dnl We don't have utime(); how about utimes()?
|
|
2895 AC_CHECK_FUNCS(utimes)])
|
|
2896
|
|
2897
|
|
2898 dnl checks for typedefs
|
|
2899 AC_TYPE_SIGNAL
|
|
2900 AC_TYPE_SIZE_T
|
|
2901 AC_TYPE_PID_T
|
|
2902 AC_TYPE_UID_T
|
|
2903 AC_TYPE_MODE_T
|
|
2904 AC_TYPE_OFF_T
|
3072
|
2905 dnl #### deprecated 2.13-ism
|
2651
|
2906 AC_CHECK_TYPE(ssize_t, int)
|
|
2907
|
|
2908 dnl not AC_CHECK_TYPE; lisp.h does hairy conditional typedef
|
|
2909 if test "$ac_cv_header_inttypes_h" != "yes"; then
|
|
2910 AC_MSG_CHECKING(for intptr_t in sys/types.h)
|
3312
|
2911 AC_COMPILE_IFELSE([AC_LANG_SOURCE([#include <sys/types.h>
|
2651
|
2912 intptr_t x;
|
3312
|
2913 ])],[AC_MSG_RESULT(yes)
|
2651
|
2914 AC_DEFINE(HAVE_INTPTR_T_IN_SYS_TYPES_H,1)],
|
|
2915 [AC_MSG_RESULT(no)])
|
|
2916 fi
|
|
2917
|
|
2918 dnl check for Unix98 socklen_t
|
|
2919 AC_MSG_CHECKING(for socklen_t)
|
3312
|
2920 AC_COMPILE_IFELSE([AC_LANG_SOURCE([#include <sys/types.h>
|
2651
|
2921 #include <sys/socket.h>
|
|
2922 socklen_t x;
|
3312
|
2923 ])],[AC_MSG_RESULT(yes)],[
|
|
2924 AC_COMPILE_IFELSE([AC_LANG_SOURCE([#include <sys/types.h>
|
2651
|
2925 #include <sys/socket.h>
|
|
2926 int accept (int, struct sockaddr *, size_t *);
|
3312
|
2927 ])],[
|
2651
|
2928 AC_MSG_RESULT(size_t)
|
|
2929 AC_DEFINE(socklen_t,size_t)], [
|
|
2930 AC_MSG_RESULT(int)
|
|
2931 AC_DEFINE(socklen_t,int)])])
|
|
2932
|
|
2933 AC_MSG_CHECKING(for struct timeval)
|
3312
|
2934 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#ifdef TIME_WITH_SYS_TIME
|
2651
|
2935 #include <sys/time.h>
|
|
2936 #include <time.h>
|
|
2937 #else
|
|
2938 #ifdef HAVE_SYS_TIME_H
|
|
2939 #include <sys/time.h>
|
|
2940 #else
|
|
2941 #include <time.h>
|
|
2942 #endif
|
3312
|
2943 #endif], [static struct timeval x; x.tv_sec = x.tv_usec;])],
|
2651
|
2944 [AC_MSG_RESULT(yes)
|
|
2945 HAVE_TIMEVAL=yes
|
|
2946 AC_DEFINE(HAVE_TIMEVAL)],
|
|
2947 [AC_MSG_RESULT(no)
|
|
2948 HAVE_TIMEVAL=no])
|
|
2949
|
|
2950 dnl checks for structure members
|
|
2951 AC_STRUCT_TM
|
|
2952 AC_STRUCT_TIMEZONE
|
|
2953
|
|
2954 dnl checks for compiler characteristics
|
|
2955 AC_C_CONST
|
|
2956
|
|
2957 dnl check for Make feature
|
|
2958 AC_PROG_MAKE_SET
|
|
2959
|
|
2960 dnl check byte order
|
|
2961 AC_C_BIGENDIAN
|
|
2962
|
|
2963 dnl define SIZEOF_TYPE
|
|
2964 AC_CHECK_SIZEOF(short)
|
|
2965 if test "$ac_cv_sizeof_short" = 0; then
|
|
2966 echo ""
|
|
2967 echo "*** PANIC *** Configure tests are not working - compiler is broken."
|
|
2968 echo "*** PANIC *** Please examine config.log for compilation errors."
|
|
2969 exit 1
|
|
2970 fi
|
|
2971 AC_CHECK_SIZEOF(int)
|
|
2972 AC_CHECK_SIZEOF(long)
|
|
2973 AC_CHECK_SIZEOF(long long)
|
|
2974 AC_CHECK_SIZEOF(void *)
|
|
2975 AC_CHECK_SIZEOF(double)
|
|
2976
|
|
2977 dnl check for long file names
|
|
2978 AC_SYS_LONG_FILE_NAMES
|
|
2979
|
|
2980 dnl -lm is required for floating point support, among other things
|
|
2981 AC_CHECK_FUNC(sin, ,AC_CHECK_LIB(m, sin))
|
|
2982
|
3312
|
2983 AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <math.h>],
|
|
2984 [return atanh(1.0) + asinh(1.0) + acosh(1.0); ])],
|
2651
|
2985 AC_DEFINE(HAVE_INVERSE_HYPERBOLIC))
|
|
2986
|
|
2987 dnl See if mkstemp is available
|
|
2988 AC_CHECK_FUNCS(mkstemp)
|
|
2989
|
|
2990 dnl Determine type of mail locking from configure args and s&m headers
|
3312
|
2991 AC_MSG_CHECKING([type of mail spool file locking])
|
|
2992 AC_MSG_RESULT()
|
2651
|
2993 AC_CHECK_FUNCS(lockf flock)
|
|
2994 dnl The mail_use_xxx variables are set according to the s&m headers.
|
|
2995 test -z "$with_mail_locking" -a "$mail_use_flock" = "yes" && with_mail_locking=flock
|
|
2996 test -z "$with_mail_locking" -a "$mail_use_lockf" = "yes" && with_mail_locking=lockf
|
|
2997 test -z "$with_mail_locking" -a "$mail_use_locking" = "yes" && with_mail_locking=locking
|
|
2998 if test -z "$with_mail_locking"; then
|
|
2999 case "$opsys" in cygwin* | mingw*)
|
|
3000 with_mail_locking=pop ;;
|
|
3001 esac
|
|
3002 fi
|
|
3003
|
|
3004 if test "$with_mail_locking" = "lockf"; then AC_DEFINE(MAIL_LOCK_LOCKF)
|
|
3005 elif test "$with_mail_locking" = "flock"; then AC_DEFINE(MAIL_LOCK_FLOCK)
|
|
3006 elif test "$with_mail_locking" = "locking"; then AC_DEFINE(MAIL_LOCK_LOCKING)
|
|
3007 elif test "$with_mail_locking" = "pop"; then
|
|
3008 with_pop=yes
|
|
3009 with_mail_locking=
|
|
3010 elif test "$with_mail_locking" = "mmdf"; then AC_DEFINE(MAIL_LOCK_MMDF)
|
|
3011 else with_mail_locking="file"; AC_DEFINE(MAIL_LOCK_DOT)
|
|
3012 fi
|
|
3013 test "$with_mail_locking" = "lockf" -a "$ac_cv_func_lockf" != "yes" && \
|
|
3014 XE_DIE("lockf mail locking requested but not available.")
|
|
3015 test "$with_mail_locking" = "flock" -a "$ac_cv_func_flock" != "yes" && \
|
|
3016 XE_DIE("flock mail locking requested but not available.")
|
|
3017 test "$with_mail_locking" = "locking" -a "$ac_cv_func_locking" != "yes" && \
|
|
3018 XE_DIE("locking mail locking requested but not available.")
|
|
3019
|
|
3020 case "$opsys" in decosf*)
|
|
3021 AC_CHECK_LIB(pthreads, cma_open)
|
|
3022 test "$ac_cv_lib_pthreads_cma_open" = "yes" && \
|
|
3023 c_switch_site="$c_switch_site -threads" ;;
|
|
3024 esac
|
|
3025
|
|
3026 dnl ----------------------------------------------------------------
|
|
3027 dnl Miscellaneous flags
|
|
3028 dnl ----------------------------------------------------------------
|
|
3029
|
|
3030 AC_MSG_CHECKING(whether the -xildoff compiler flag is required)
|
|
3031 if ${CC-cc} '-###' -xildon no_such_file.c 2>&1 | grep '^[^ ]*/ild ' > /dev/null ; then
|
|
3032 if ${CC-cc} '-###' -xildoff no_such_file.c 2>&1 | grep '^[^ ]*/ild ' > /dev/null ;
|
|
3033 then AC_MSG_RESULT(no);
|
|
3034 else AC_MSG_RESULT(yes); XE_APPEND(-xildoff, ld_switch_site)
|
|
3035 fi
|
|
3036 else AC_MSG_RESULT(no)
|
|
3037 fi
|
|
3038
|
|
3039 dnl Link with "-z ignore" on Solaris if supported
|
|
3040 if test "$opsys" = "sol2"; then
|
|
3041 if test "$os_release" -ge 506; then
|
3312
|
3042 AC_MSG_CHECKING([for "-z ignore" linker flag])
|
2651
|
3043 case "`ld -h 2>&1`" in
|
|
3044 *-z\ ignore\|record* ) AC_MSG_RESULT(yes)
|
|
3045 XE_PREPEND(-z ignore, ld_switch_site) ;;
|
|
3046 *) AC_MSG_RESULT(no) ;;
|
|
3047 esac
|
|
3048 fi
|
|
3049 fi
|
|
3050
|
|
3051 dnl ----------------------
|
|
3052 dnl Choose a window system
|
|
3053 dnl ----------------------
|
|
3054
|
3312
|
3055 AC_MSG_CHECKING([for specified window system])
|
|
3056 AC_MSG_RESULT()
|
2651
|
3057
|
|
3058 dnl Autodetection of Gdk libraries and includes
|
|
3059 dnl -------------------------------------------
|
|
3060 dnl On some systems (FreeBSD springs to mind), they use
|
|
3061 dnl versions on the utility routines, so instead of gtk-config
|
|
3062 dnl you must use gtk12-config, etc, etc.
|
|
3063
|
|
3064 GNOME_CONFIG=no
|
|
3065 GTK_CONFIG=no
|
|
3066
|
|
3067 if test "$with_gnome" != "no"; then
|
|
3068 AC_MSG_CHECKING(for GNOME configuration script)
|
|
3069 for possible in gnome-config
|
|
3070 do
|
|
3071 possible_version=`${possible} --version 2> /dev/null`
|
|
3072 if test "x${possible_version}" != "x"; then
|
|
3073 GNOME_CONFIG="${possible}"
|
|
3074 with_gnome=yes
|
|
3075 with_gtk=yes
|
|
3076 break
|
|
3077 fi
|
|
3078 done
|
|
3079 AC_MSG_RESULT([${GNOME_CONFIG}])
|
|
3080 fi
|
|
3081
|
|
3082 if test "${GNOME_CONFIG}" != "no"; then
|
|
3083 GNOME_LIBS=`${GNOME_CONFIG} --libs gnomeui`
|
|
3084 GNOME_CFLAGS=`${GNOME_CONFIG} --cflags gnomeui`
|
|
3085 AC_DEFINE(HAVE_GNOME)
|
|
3086 XE_APPEND(${GNOME_LIBS}, libs_gtk)
|
|
3087 XE_APPEND(${GNOME_CFLAGS}, c_switch_gtk)
|
|
3088 fi
|
|
3089
|
|
3090 if test "$with_gtk" != "no";then
|
|
3091 AC_MSG_CHECKING(for GTK configuration script)
|
|
3092 for possible in gtk12-config gtk14-config gtk-config
|
|
3093 do
|
|
3094 possible_version=`${possible} --version 2> /dev/null`
|
|
3095 if test "x${possible_version}" != "x"; then
|
|
3096 GTK_CONFIG="${possible}"
|
|
3097 case "${possible_version}" in
|
|
3098 1.0.*) AC_MSG_WARN([GTK 1.2 is required, please upgrade your version of GTK.]); with_gtk=no;;
|
|
3099 1.3.*) AC_MSG_WARN([GTK 1.3 is not supported right now]); with_gtk=no;;
|
|
3100 1.2.*)
|
|
3101 with_gtk=yes
|
|
3102 break
|
|
3103 ;;
|
|
3104 *) AC_MSG_WARN([Found unsupported version of GTK: $possible_version]);;
|
|
3105 esac
|
|
3106 fi
|
|
3107 done
|
|
3108 AC_MSG_RESULT([${GTK_CONFIG}])
|
|
3109 fi
|
|
3110
|
|
3111 if test "${GTK_CONFIG}" != "no"; then
|
|
3112 AC_MSG_CHECKING(gtk version)
|
|
3113 GTK_VERSION=`${GTK_CONFIG} --version`
|
|
3114 AC_MSG_RESULT(${GTK_VERSION})
|
|
3115
|
|
3116 AC_MSG_CHECKING(gtk libs)
|
|
3117 GTK_LIBS=`${GTK_CONFIG} --libs`
|
|
3118 XE_APPEND(${GTK_LIBS}, libs_gtk)
|
|
3119 AC_MSG_RESULT(${GTK_LIBS})
|
|
3120
|
|
3121 AC_MSG_CHECKING(gtk cflags)
|
|
3122 GTK_CFLAGS=`${GTK_CONFIG} --cflags`
|
|
3123 if test "$GCC" = "yes"; then
|
|
3124 GTK_CFLAGS="${GTK_CFLAGS} -Wno-shadow"
|
|
3125 fi
|
|
3126 XE_APPEND(${GTK_CFLAGS}, c_switch_gtk)
|
|
3127 AC_MSG_RESULT(${GTK_CFLAGS})
|
|
3128
|
|
3129 AC_CHECK_LIB(gdk_imlib, main, XE_PREPEND(-lgdk_imlib, libs_gtk))
|
|
3130 AC_CHECK_LIB(Imlib, Imlib_init, XE_APPEND(-lImlib, libs_gtk))
|
|
3131 AC_CHECK_FUNCS(gdk_imlib_init)
|
|
3132
|
|
3133 AC_DEFINE(HAVE_XPM)
|
|
3134 AC_DEFINE(HAVE_GTK)
|
|
3135 AC_SUBST(GTK_CONFIG)
|
|
3136
|
|
3137 window_system=gtk
|
|
3138 with_gtk=yes
|
|
3139 if test "$with_x11" != "no"; then
|
|
3140 AC_MSG_WARN([Configuring GTK, forcing with_x11 to no])
|
|
3141 with_x11=no
|
|
3142 fi
|
|
3143
|
|
3144 for feature in scrollbars toolbars menubars dialogs widgets
|
|
3145 do
|
|
3146 eval "feature_value=\${enable_${feature}}"
|
|
3147 case "${feature_value}" in
|
|
3148 yes|no|gtk|"" )
|
|
3149 ;;
|
|
3150 * )
|
|
3151 feature_conflict_with_gtk=yes
|
|
3152 AC_MSG_WARN([--enable-${feature}=${feature_value} is incompatible with --with-gtk]) ;;
|
|
3153 esac
|
|
3154 done
|
|
3155 if test "${feature_conflict_with_gtk}" = "yes"; then
|
|
3156 XE_DIE(["One or more GUI toolkit features conflict with GTK"])
|
|
3157 fi
|
|
3158
|
|
3159 test "${enable_scrollbars}" != "no" && enable_scrollbars=gtk
|
|
3160 test "${enable_toolbars}" != "no" && enable_toolbars=gtk
|
|
3161 test "${enable_menubars}" != "no" && enable_menubars=gtk
|
|
3162 test "${enable_dialogs}" != "no" && enable_dialogs=gtk
|
|
3163 test "${enable_widgets}" != "no" && enable_widgets=gtk
|
|
3164
|
|
3165 dnl Check for libglade support (it rocks)
|
|
3166 OLD_CFLAGS="${CFLAGS}"
|
|
3167 OLD_CPPFLAGS="${CPPFLAGS}"
|
|
3168 OLD_LDFLAGS="${LDFLAGS}"
|
|
3169 CFLAGS="${GTK_CFLAGS} ${CFLAGS}"
|
|
3170 CPPFLAGS="${GTK_CFLAGS} ${CFLAGS}"
|
|
3171 LDFLAGS="${LDFLAGS} ${GTK_LIBS}"
|
|
3172 AC_CHECK_HEADERS(glade/glade.h glade.h)
|
|
3173 AC_CHECK_LIB(xml, main, XE_PREPEND(-lxml, libs_gtk))
|
|
3174 AC_CHECK_LIB(glade, main, XE_PREPEND(-lglade, libs_gtk))
|
|
3175 AC_CHECK_LIB(glade-gnome, main, XE_PREPEND(-lglade-gnome, libs_gtk))
|
|
3176 AC_EGREP_HEADER([char \*txtdomain;], [glade/glade-xml.h],
|
|
3177 [AC_MSG_RESULT(yes)
|
|
3178 AC_DEFINE(LIBGLADE_XML_TXTDOMAIN,1)],
|
|
3179 [AC_MSG_RESULT(no)])
|
|
3180 CFLAGS="${OLD_CFLAGS}"
|
|
3181 CPPFLAGS="${OLD_CPPFLAGS}"
|
|
3182 LDFLAGS="${OLD_LDFLAGS}"
|
|
3183 fi
|
|
3184
|
|
3185 dnl We may eventually prefer gtk/gdk over vanilla X11...
|
|
3186
|
|
3187 if test "$with_x11" != "no"; then
|
|
3188 dnl User-specified --x-includes or --x-libraries implies --with-x11.
|
|
3189 test "$x_includes $x_libraries" != "NONE NONE" && \
|
|
3190 window_system=x11 with_x11=yes
|
|
3191
|
|
3192 dnl Autodetection of X11 libraries and includes
|
|
3193 dnl -------------------------------------------
|
|
3194 dnl AC_PATH_XTRA thinks it can find our X headers and includes, but
|
|
3195 dnl it often gets it wrong, so we only use it as a last resort.
|
|
3196
|
|
3197 dnl $OPENWINHOME implies --x-includes and --x-libraries
|
|
3198 dnl Not (yet) handled by autoconf2
|
|
3199 if test "$x_includes $x_libraries" = "NONE NONE" \
|
|
3200 -a -n "$OPENWINHOME" \
|
|
3201 -a "$OPENWINHOME" != "/usr/openwin" \
|
|
3202 -a -d "$OPENWINHOME"; then
|
|
3203 test -d "$OPENWINHOME/lib" && x_libraries="$OPENWINHOME/lib"
|
|
3204 test -d "$OPENWINHOME/include" && x_includes="$OPENWINHOME/include"
|
|
3205 test -d "$OPENWINHOME/share/include" && x_includes="$OPENWINHOME/share/include"
|
|
3206 fi
|
|
3207
|
|
3208 if test "$x_includes" = "NONE"; then
|
|
3209 dnl AC_PATH_XTRA often guesses /usr/include, when some other
|
|
3210 dnl include directory is a MUCH better guess (Linux, HP-UX 10.20).
|
|
3211 dnl This is a workaround for idiot (esp. HP) system vendors, who
|
|
3212 dnl provide a /usr/include/X11, but DON'T FULLY POPULATE IT.
|
|
3213 for dir in "/usr/X11" "/usr/X11R6"; do
|
|
3214 if test -d "$dir/include/X11"; then x_includes="$dir/include"; break; fi
|
|
3215 done
|
|
3216 fi
|
|
3217
|
|
3218 if test "$x_libraries" = "NONE"; then
|
|
3219 for dir in "/usr/X11/lib" "/usr/X11R6/lib" "/usr/lib/X11R6"; do
|
|
3220 if test -r "$dir/libX11.a"; then x_libraries="$dir"; break; fi
|
|
3221 done
|
|
3222 fi
|
|
3223
|
|
3224 AC_PATH_XTRA # Autoconf claims to find X library and include dirs for us.
|
|
3225 if test "$no_x" = "yes"
|
|
3226 then with_x11=no window_system=none HAVE_X_WINDOWS=no
|
|
3227 else with_x11=yes window_system=x11 HAVE_X_WINDOWS=yes
|
|
3228 fi
|
|
3229 fi
|
|
3230
|
|
3231 dnl #### wmperry:: !x11 != NONE
|
|
3232 dnl case "$with_x11" in
|
|
3233 dnl yes ) window_system=x11 HAVE_X_WINDOWS=yes ;;
|
|
3234 dnl no ) window_system=none HAVE_X_WINDOWS=no ;;
|
|
3235 dnl esac
|
|
3236
|
|
3237 if test "$with_x11" = "yes"; then
|
|
3238 AC_DEFINE(HAVE_X_WINDOWS)
|
|
3239 XE_APPEND(lwlib, MAKE_SUBDIR)
|
|
3240 XE_APPEND(lwlib, SRC_SUBDIR_DEPS)
|
|
3241
|
|
3242 dnl Look for Motif, but only if not found in $x_includes and $x_libraries
|
|
3243 AC_CHECK_HEADER(Xm/Xm.h, [AC_CHECK_LIB(Xm, XmStringFree, got_motif=yes)])
|
|
3244
|
|
3245 if test "$got_motif" != "yes"; then
|
|
3246 dnl Try to find Motif/CDE/Tooltalk dirs
|
|
3247 dnl These take precedence over other X libs/includes, so PRE-pend
|
|
3248 for lib_dir in "/usr/dt/lib" "/usr/lib/Motif2.1" \
|
|
3249 "/usr/lib/Motif1.2" "/usr/lib/Motif1.1"; do
|
|
3250 inc_dir=`echo $lib_dir | sed -e 's/lib/include/'`
|
|
3251 if test -d "$lib_dir" -a -d "$inc_dir"; then
|
|
3252 case "$x_libraries" in *"$lib_dir"* ) ;; *)
|
|
3253 x_libraries="$lib_dir $x_libraries"
|
|
3254 XE_PREPEND(-L${lib_dir}, X_LIBS) ;;
|
|
3255 esac
|
|
3256 case "$x_includes" in "$inc_dir"* ) ;; *)
|
|
3257 x_includes="$inc_dir $x_includes"
|
|
3258 XE_PREPEND(-I${inc_dir}, X_CFLAGS) ;;
|
|
3259 esac
|
|
3260 break; dnl only need ONE Motif implementation!
|
|
3261 fi
|
|
3262 done
|
|
3263 fi
|
|
3264
|
|
3265 dnl Contrib X libs/includes do NOT take precedence, so AP-pend
|
|
3266 for rel in "X11R6" "X11R5" "X11R4"; do
|
|
3267 lib_dir="/usr/contrib/$rel/lib" inc_dir="/usr/contrib/$rel/include"
|
|
3268 if test -d "$lib_dir" -a -d "$inc_dir"; then
|
|
3269 case "$x_libraries" in *"$lib_dir"* ) ;; *)
|
|
3270 x_libraries="$x_libraries $lib_dir"
|
|
3271 XE_APPEND(-L${lib_dir}, X_LIBS)
|
|
3272 esac
|
|
3273 case "$x_includes" in "$inc_dir"* ) ;; *)
|
|
3274 x_includes="$x_includes $inc_dir"
|
|
3275 XE_APPEND(-I${inc_dir}, X_CFLAGS)
|
|
3276 esac
|
|
3277 break; dnl Only need ONE X11 implementation !
|
|
3278 fi
|
|
3279 done
|
|
3280
|
|
3281 dnl Avoid version mismatch for shared library libXm.so on osf4
|
|
3282 case "$opsys" in
|
|
3283 decosf*) if test "$GCC" = yes -a -d /usr/shlib; then XE_APPEND(-L/usr/shlib, X_LIBS); fi ;;
|
|
3284 esac
|
|
3285
|
|
3286 ld_switch_x_site="$X_LIBS"
|
|
3287
|
|
3288 XE_COMPUTE_RUNPATH()
|
|
3289
|
|
3290 if test "$verbose" = "yes"; then
|
|
3291 echo; echo "X11 compilation variables:"
|
|
3292 PRINT_VAR(x_libraries x_includes X_CFLAGS X_LIBS X_PRE_LIBS X_EXTRA_LIBS)
|
|
3293 echo
|
|
3294 fi
|
|
3295
|
|
3296 dnl Set up bitmaps search path.
|
|
3297 dnl The original suggestion was to unconditionally to append X11/bitmaps
|
|
3298 dnl to each element of $x_includes, I'm pretty sure this is the wrong
|
|
3299 dnl thing to do. We test for bitmaps and X11/bitmaps directories on each
|
|
3300 dnl element and add them to BITMAPDIR if they exist.
|
|
3301 bitmapdirs=
|
|
3302 if test "$x_includes" != NONE; then
|
|
3303 for i in $x_includes; do
|
|
3304 if test -d "$i/bitmaps"; then
|
|
3305 bitmapdirs="$i/bitmaps:$bitmapdirs"
|
|
3306 fi
|
|
3307 if test -d "$i/X11/bitmaps"; then
|
|
3308 bitmapdirs="$i/X11/bitmaps:$bitmapdirs"
|
|
3309 fi
|
|
3310 done
|
|
3311 bitmapdirs=`echo "$bitmapdirs" | sed s/.$//`
|
|
3312 fi
|
|
3313 test ! -z "$bitmapdirs" && AC_DEFINE_UNQUOTED(BITMAPDIR, "$bitmapdirs")
|
|
3314
|
|
3315 dnl Autodetect defines extracted from X config by xmkmf, e.g. NARROWPROTO
|
3312
|
3316 AC_MSG_CHECKING([for X defines extracted by xmkmf])
|
|
3317 AC_MSG_RESULT()
|
2651
|
3318 rm -fr conftestdir
|
|
3319 if mkdir conftestdir; then
|
|
3320 cd conftestdir
|
|
3321 cat > Imakefile <<'EOF'
|
|
3322 xetest:
|
|
3323 @echo ${PROTO_DEFINES} ${STD_DEFINES}
|
|
3324 EOF
|
|
3325 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
|
|
3326 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
|
|
3327 xmkmf_defines=`${MAKE-make} xetest 2>/dev/null | grep -v make`
|
|
3328 fi
|
|
3329 cd ..
|
|
3330 rm -fr conftestdir
|
|
3331 for word in $xmkmf_defines; do
|
|
3332 case "$word" in
|
|
3333 -D__STDC__*) ;;
|
|
3334 -D* )
|
|
3335 sym=`echo '' $word | sed -e 's:^ *-D::' -e 's:=.*::'`
|
|
3336 case "$word" in
|
|
3337 -D*=* ) val=`echo '' $word | sed -e 's:^.*=::'` ;;
|
|
3338 * ) val=1 ;;
|
|
3339 esac
|
|
3340 dnl Avoid re-AC_DEFINE-ing xmkmf symbols we've already defined above.
|
|
3341 if grep "^#define $sym " confdefs.h >/dev/null; then :; else
|
|
3342 if test "$val" = "1"
|
|
3343 then AC_DEFINE_UNQUOTED($sym)
|
|
3344 else AC_DEFINE_UNQUOTED($sym,$val)
|
|
3345 fi
|
|
3346 fi ;;
|
|
3347 esac
|
|
3348 done
|
|
3349 fi
|
|
3350
|
|
3351 dnl make sure we can find Intrinsic.h
|
|
3352 AC_CHECK_HEADER(X11/Intrinsic.h, ,
|
|
3353 [AC_MSG_ERROR([Unable to find X11 header files.])])
|
|
3354
|
|
3355 dnl -lXt and -lX11 are required
|
|
3356 dnl Some broken systems require the magic "-b i486-linuxaout" flag
|
|
3357 AC_CHECK_LIB(X11, XOpenDisplay, have_lib_x11=yes)
|
|
3358 if test "$have_lib_x11" != "yes"; then
|
|
3359 AC_CHECK_LIB(X11, XGetFontProperty,
|
|
3360 ld_switch_x_site="-b i486-linuxaout $ld_switch_x_site",
|
|
3361 [AC_MSG_ERROR([Unable to find X11 libraries.])],
|
|
3362 -b i486-linuxaout)
|
|
3363 fi
|
|
3364 libs_x="-lX11"
|
|
3365 test "$verbose" = "yes" && echo " Setting libs_x to \"-lX11\""
|
|
3366
|
|
3367 dnl Autodetect -lXext
|
|
3368 AC_CHECK_LIB(Xext, XShapeSelectInput, XE_PREPEND(-lXext, libs_x))
|
|
3369
|
|
3370 dnl Require -lXt
|
|
3371 AC_CHECK_LIB(Xt, XtOpenDisplay, XE_PREPEND(-lXt, libs_x),
|
|
3372 AC_MSG_ERROR([Unable to find X11 libraries.]))
|
|
3373
|
|
3374 AC_MSG_CHECKING(the version of X11 being used)
|
|
3375 AC_RUN_IFELSE([AC_LANG_SOURCE([#include <X11/Intrinsic.h>
|
|
3376 int main(int c, char *v[]) { return c>1 ? XlibSpecificationRelease : 0; }])],
|
|
3377 [./conftest foobar; x11_release=$?],[x11_release=4],[x11_release=4])
|
|
3378 AC_MSG_RESULT(R${x11_release})
|
|
3379 AC_DEFINE_UNQUOTED(THIS_IS_X11R${x11_release})
|
|
3380
|
|
3381 if test "${x11_release}" = "4"; then
|
|
3382 case "$enable_widgets" in
|
|
3383 "" | "no") enable_widgets=no ;;
|
|
3384 *) XE_DIE("Widget support requires X11R5 or greater") ;;
|
|
3385 esac
|
|
3386 fi
|
|
3387
|
|
3388 AC_CHECK_FUNCS(XConvertCase XtRegisterDrawable)
|
|
3389
|
|
3390 AC_CHECK_HEADERS(X11/Xlocale.h X11/Xfuncproto.h)
|
|
3391
|
|
3392 dnl XFree86 has a non-standard prototype for this X11R6 function
|
|
3393 AC_CHECK_FUNCS(XRegisterIMInstantiateCallback)
|
|
3394 AC_MSG_CHECKING(for standard XRegisterIMInstantiateCallback prototype)
|
3312
|
3395 AC_COMPILE_IFELSE([AC_LANG_SOURCE([
|
2651
|
3396 #define NeedFunctionPrototypes 1
|
|
3397 #include <X11/Xlib.h>
|
|
3398 extern Bool XRegisterIMInstantiateCallback(
|
|
3399 Display*, struct _XrmHashBucketRec*, char*, char*, XIMProc, XPointer*);
|
3312
|
3400 ])],
|
2651
|
3401 [AC_MSG_RESULT(yes)],
|
|
3402 [AC_MSG_RESULT(no)
|
|
3403 AC_DEFINE(XREGISTERIMINSTANTIATECALLBACK_NONSTANDARD_PROTOTYPE)])
|
|
3404
|
|
3405 dnl autodetect -lXmu
|
|
3406 test -z "$with_xmu" && { AC_CHECK_LIB(Xmu, XmuReadBitmapDataFromFile,
|
|
3407 with_xmu=yes, with_xmu=no) }
|
|
3408 if test "$with_xmu" = "no"; then
|
|
3409 XE_ADD_OBJS(xmu.o)
|
|
3410 else
|
|
3411 XE_PREPEND(-lXmu, libs_x)
|
|
3412 AC_DEFINE(HAVE_XMU)
|
|
3413 fi
|
|
3414
|
|
3415 dnl Autodetect -lXbsd
|
|
3416 dnl #### Someone, please add a better function than main
|
|
3417 AC_CHECK_LIB(Xbsd, main, XE_PREPEND(-lXbsd, libs_x))
|
|
3418
|
|
3419 dnl Problem with the MIT distribution of X on AIX
|
|
3420 if test "$unexec" = "unexaix.o" -a "$x11_release" = "6"; then
|
|
3421 dnl X11R6 requires thread-safe code on AIX for some reason
|
|
3422 if test "$GCC" = "yes"; then
|
|
3423 XE_PREPEND(-mthreads, X_CFLAGS)
|
|
3424 XE_PREPEND(-mthreads, libs_x)
|
|
3425 else
|
|
3426 case "$CC" in
|
|
3427 "xlc" ) CC="xlc_r" ;;
|
|
3428 "xlC" ) CC="xlC_r" ;;
|
|
3429 "cc" ) CC="cc_r" ;;
|
|
3430 esac
|
|
3431 fi
|
|
3432 fi
|
|
3433
|
3094
|
3434 dnl include xft/AA support?
|
|
3435 dnl #### need to check for includes here (especially, freetype.h for v.2)
|
|
3436
|
|
3437 if test "$with_xft_emacs" = "yes"; then
|
3312
|
3438 AC_MSG_CHECKING([for Xrender, fontconfig, and Xft])
|
3094
|
3439 xft_includes_found=no
|
|
3440 AC_CHECK_HEADERS([freetype/config/ftheader.h],
|
|
3441 [xft_includes_found=yes],
|
|
3442 [
|
|
3443 dnl #### How about /sw/include, and /opt/local/include?
|
|
3444 dnl these directories need to be the parent of the freetype directory
|
|
3445 for freetype_include_top in "/usr/X11R6/include/freetype2" \
|
|
3446 "/usr/include/freetype2"
|
|
3447 do
|
|
3448 if test -d $freetype_include_top; then
|
3312
|
3449 AC_MSG_CHECKING([in ${freetype_include_top}/freetype2])
|
3094
|
3450 dnl disable autoconf's fucking cache; why these fuckheads think it
|
|
3451 dnl is better to be broken than to be slow, I don't know!
|
|
3452 dnl #### there's gotta be a better-looking way to do this!!
|
|
3453 unset "$as_ac_Header"
|
|
3454 save_c_switch_site="$c_switch_site"
|
|
3455 c_switch_site="$c_switch_site -I${freetype_include_top}"
|
|
3456 AC_CHECK_HEADERS([freetype/config/ftheader.h],
|
|
3457 [xft_includes_found=yes],
|
|
3458 [c_switch_site=$save_c_switch_site])
|
|
3459 fi
|
3158
|
3460 done])
|
|
3461 if test "$xft_includes_found" != "yes"; then
|
|
3462 XE_DIE(["Unable to find headers for --with-xft"])
|
|
3463 else
|
|
3464 AC_CHECK_LIB(Xrender, XRenderQueryExtension, XE_PREPEND(-lXrender, libs_x),
|
|
3465 [XE_DIE(["Unable to find libXrender for --with-xft"])])
|
|
3466 AC_CHECK_LIB(fontconfig, FcPatternCreate, XE_PREPEND(-lfontconfig, libs_x),
|
|
3467 [XE_DIE(["Unable to find libfontconfig for --with-xft"])])
|
|
3468 AC_CHECK_LIB(Xft, XftFontOpen, XE_PREPEND(-lXft, libs_x),
|
|
3469 [XE_DIE(["Unable to find libXft for --with-xft"])])
|
3354
|
3470 dnl #### detect fontconfig properly!!!!
|
|
3471 with_fontconfig=yes
|
|
3472 AC_DEFINE(HAVE_FONTCONFIG)
|
3158
|
3473 AC_DEFINE(USE_XFT)
|
|
3474 dnl Due to interactions with other libraries, must postpone AC_DEFINE
|
|
3475 dnl of USE_XFT_MENUBARS, USE_XFT_TABS, and USE_XFT_GAUGE.
|
|
3476 unset xft_includes_found
|
|
3477 fi
|
3094
|
3478 fi
|
|
3479
|
2651
|
3480 fi dnl $with_x11 = yes
|
|
3481
|
|
3482 if test "$with_msw" != "no"; then
|
3312
|
3483 AC_MSG_CHECKING([for MS-Windows])
|
|
3484 AC_MSG_RESULT()
|
2651
|
3485 AC_CHECK_LIB(gdi32,main,with_msw=yes)
|
|
3486 if test "$with_msw" = "yes"; then
|
|
3487 AC_DEFINE(HAVE_MS_WINDOWS)
|
|
3488
|
|
3489 dnl The net installer only works with MS-Windows currently
|
|
3490 if test "$with_netinstall" = "yes"; then
|
|
3491 XE_APPEND(netinstall, MAKE_SUBDIR)
|
|
3492 XE_APPEND(netinstall, SRC_SUBDIR_DEPS)
|
|
3493 XE_APPEND(netinstall, INSTALL_ARCH_DEP_SUBDIR)
|
|
3494 fi
|
|
3495
|
|
3496 install_pp="$srcdir/lib-src/installexe.sh"
|
|
3497 XE_APPEND(-limm32 -lshell32 -lgdi32 -luser32 -lcomdlg32 -lcomctl32 -lole32 -luuid -lwinspool -lmpr, libs_system)
|
|
3498 if test "$with_dragndrop" != no; then
|
|
3499 XE_APPEND(msw, dragndrop_proto)
|
|
3500 with_dragndrop=yes
|
|
3501 fi
|
|
3502 if test "$window_system" != x11; then
|
|
3503 window_system=msw
|
|
3504 test "$enable_scrollbars" != "no" && enable_scrollbars=msw
|
|
3505 test "$enable_menubars" != "no" && enable_menubars=msw
|
|
3506 test "$enable_toolbars" != "no" && enable_toolbars=msw
|
|
3507 test "$enable_dialogs" != "no" && enable_dialogs=msw
|
|
3508 test "$enable_widgets" != "no" && enable_widgets=msw
|
|
3509 fi
|
|
3510 dnl check for our special version of select
|
|
3511 AC_RUN_IFELSE([AC_LANG_SOURCE([#include <fcntl.h>
|
|
3512 int main() { return (open("/dev/windows", O_RDONLY, 0) > 0)? 0 : 1; }])],
|
|
3513 [AC_DEFINE(HAVE_MSG_SELECT)])
|
|
3514 fi
|
|
3515 fi
|
|
3516
|
|
3517 AC_SUBST(install_pp)
|
|
3518
|
|
3519 test -z "$with_dragndrop" && with_dragndrop="$with_dragndrop_default"
|
|
3520 test -z "$window_system" && window_system="none"
|
|
3521
|
|
3522 dnl Test for features that require a window system - ANY window system
|
|
3523 if test "$window_system" = "none"; then
|
|
3524 for feature in menubars scrollbars toolbars dialogs dragndrop xface
|
|
3525 do
|
|
3526 if eval "test -n \"\$enable_${feature}\" -a \"\$enable_${feature}\" != no" ; then
|
|
3527 AC_MSG_WARN([--enable-$feature ignored: Not valid without window system support])
|
|
3528 fi
|
|
3529 eval "enable_${feature}=no"
|
|
3530 done
|
|
3531 else
|
|
3532 test -z "$enable_toolbars" && enable_toolbars=yes
|
|
3533 fi
|
|
3534
|
|
3535 dnl ### Test for features that require mswindows support - currently none
|
|
3536 dnl ### MS-Windows folks: add code here..... (martin)
|
|
3537 if test "$with_msw" != "yes"; then
|
|
3538 for feature in MARTIN_IS_CLUELESS_ABOUT_MSW_FEATURES
|
|
3539 do
|
|
3540 if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
|
|
3541 AC_MSG_WARN([--with-$feature ignored: Not valid without MS-Windows support])
|
|
3542 fi
|
|
3543 eval "with_${feature}=no"
|
|
3544 done
|
|
3545 else
|
|
3546 :
|
|
3547 fi
|
|
3548
|
|
3549 dnl Test for features that require X11 support
|
|
3550 if test "$with_x11" != "yes"; then
|
|
3551 dnl It ought to be reasonable to have no output device at all, and only use
|
|
3552 dnl XEmacs in --batch mode.
|
|
3553 dnl if test "$with_tty" = "no" ; then
|
|
3554 dnl AC_MSG_ERROR([No window system support and no TTY support - Unable to proceed.])
|
|
3555 dnl fi
|
|
3556 for feature in with_tooltalk with_cde with_offix with_wmcommand with_xim with_xmu enable_sound_nas
|
|
3557 do
|
|
3558 if eval "test -n \"\$${feature}\" -a \"\$${feature}\" != \"no\"" ; then
|
|
3559 AC_MSG_WARN([--$feature ignored: Not valid without X support])
|
|
3560 fi
|
|
3561 eval "${feature}=no"
|
|
3562 done
|
|
3563 fi
|
|
3564
|
|
3565 dnl Balloon Help requires the Shape extension, not available everywhere,
|
|
3566 dnl for example not on AIX 4.3.
|
|
3567 if test "$with_x11" = "yes"; then
|
|
3568 AC_CHECK_HEADER(X11/extensions/shape.h, [
|
|
3569 AC_DEFINE(HAVE_BALLOON_HELP)
|
2741
|
3570 ],[],
|
|
3571 [
|
|
3572 #include <X11/Xlib.h>
|
|
3573 #include <X11/Xutil.h>
|
|
3574 ])
|
2651
|
3575 fi
|
|
3576
|
|
3577 dnl FSF 19.29 has some bitmapdir stuff here.
|
|
3578 bitmapdir=
|
|
3579
|
|
3580 case "$window_system" in
|
|
3581 x11 ) HAVE_X_WINDOWS=yes; echo " Using X11." ;;
|
|
3582 msw ) HAVE_X_WINDOWS=no ; echo " Using MS-Windows." ;;
|
|
3583 gtk )
|
|
3584 HAVE_X_WINDOWS=no
|
|
3585 test "$with_gnome" = "yes" && echo " Using GNOME."
|
|
3586 test "$with_gnome" = "no" && echo " Using GTK."
|
|
3587 ;;
|
|
3588 none ) HAVE_X_WINDOWS=no ; echo " Using no window system." ;;
|
|
3589 esac
|
|
3590
|
|
3591 case "$x_libraries" in *X11R4* )
|
|
3592 test "$opsys" = "hpux9" && opsysfile="s/hpux9-x11r4.h"
|
|
3593 test "$opsys" = "hpux9-shr" && opsysfile="s/hpux9shxr4.h"
|
|
3594 esac
|
|
3595
|
|
3596 dnl Enable or disable proper handling of WM_COMMAND
|
3312
|
3597 AC_MSG_CHECKING([for WM_COMMAND option])
|
2651
|
3598 dnl if test "$with_wmcommand" = "yes"; then
|
|
3599 if test "$with_wmcommand" != "no"; then
|
|
3600 AC_DEFINE(HAVE_WMCOMMAND)
|
3312
|
3601 AC_MSG_RESULT(yes)
|
|
3602 else
|
|
3603 AC_MSG_RESULT(no)
|
2651
|
3604 fi
|
|
3605
|
|
3606 dnl Autodetect Xauth
|
|
3607 dnl -lXau is only used by gnuclient, so use a special variable for Xauth X libs
|
|
3608 test -z "$with_xauth" && test "$window_system" = "none" && with_xauth=no
|
|
3609 test -z "$with_xauth" && { AC_CHECK_HEADER(X11/Xauth.h, ,with_xauth=no) }
|
|
3610 test -z "$with_xauth" && { AC_CHECK_LIB(Xau, XauGetAuthByAddr,[:],with_xauth=no) }
|
|
3611 test -z "$with_xauth" && with_xauth=yes
|
|
3612 if test "$with_xauth" = "yes"; then
|
|
3613 AC_DEFINE(HAVE_XAUTH)
|
|
3614 XE_SPACE(libs_xauth, $GTK_LIBS $X_EXTRA_LIBS -lXau $libs_x $X_PRE_LIBS)
|
|
3615 fi
|
|
3616 AC_SUBST(libs_xauth)
|
|
3617
|
|
3618 dnl This one is for the static initializeds variables in
|
|
3619 dnl offix.c, so that the thing is dumped after lastfile.o
|
|
3620 AC_SUBST(dnd_objs)
|
|
3621
|
|
3622 dnl Autodetect dll support
|
|
3623
|
|
3624 dnl If g++ is used, we have to explicitly link modules with -lstdc++ on Cygwin
|
|
3625 dnl to avoid undefined symbol errors. This will never hurt, so just do it on
|
|
3626 dnl all platforms in case others have the same brain damage.
|
|
3627 if test "$with_xemacs_compiler" = "g++"; then
|
|
3628 LIBSTDCPP=-lstdc++
|
|
3629 else
|
|
3630 LIBSTDCPP=
|
|
3631 fi
|
|
3632 AC_SUBST(LIBSTDCPP)
|
|
3633
|
|
3634 dnl This must come before the detection code for anything that is in a module
|
|
3635 if test "$enable_modules" != "no"; then
|
3312
|
3636 AC_MSG_CHECKING([for module support])
|
|
3637 AC_MSG_RESULT()
|
2651
|
3638
|
|
3639 case "$opsys" in
|
|
3640 mingw* | cygwin* ) have_dl=yes ;;
|
|
3641 darwin ) have_dl=yes
|
|
3642 AC_DEFINE(HAVE_DYLD)
|
|
3643 ;;
|
|
3644 * )
|
|
3645 dnl Check for the ELFish dlopen()
|
|
3646 AC_CHECK_HEADER(dlfcn.h, [
|
|
3647 AC_MSG_CHECKING([for dlopen in -lc])
|
3312
|
3648 AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <dlfcn.h>],
|
|
3649 [dlopen ("", 0);])], [ have_dl=yes ; AC_MSG_RESULT($have_dl)], [
|
2741
|
3650 AC_MSG_RESULT([no])
|
2651
|
3651 AC_MSG_CHECKING([for dlopen in -ldl])
|
|
3652 ac_save_LIBS="$LIBS"
|
|
3653 LIBS="$LIBS -ldl"
|
3312
|
3654 AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <dlfcn.h>],
|
|
3655 [dlopen ("", 0);])], [ have_dl=yes; AC_MSG_RESULT($have_dl)], [
|
2741
|
3656 AC_MSG_RESULT([no])
|
2651
|
3657 AC_MSG_CHECKING([for dlopen in -lsvld])
|
|
3658 LIBS="$ac_save_LIBS -lsvld"
|
3312
|
3659 AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <dlfcn.h>],
|
|
3660 [dlopen ("", 0);])], [ have_dl=yes; AC_MSG_RESULT($have_dl) ],
|
2741
|
3661 [LIBS="$ac_save_LIBS" ; AC_MSG_RESULT([no])])])])])
|
2651
|
3662 if test "$have_dl" = "yes"; then
|
|
3663 AC_DEFINE(HAVE_DLOPEN)
|
|
3664 else
|
|
3665 dnl Check for HP/UX shl_load
|
|
3666 AC_CHECK_HEADER(dl.h, [
|
|
3667 AC_MSG_CHECKING([for shl_load in -lc])
|
3312
|
3668 AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <dl.h>],
|
|
3669 [shl_load ("", 0, 0);])], [have_dl=yes; AC_MSG_RESULT($have_dl)], [
|
2741
|
3670 AC_MSG_RESULT([no])
|
2651
|
3671 AC_MSG_CHECKING([for shl_load in -ldl])
|
|
3672 ac_save_LIBS="$LIBS"
|
|
3673 LIBS="$LIBS -ldld"
|
3312
|
3674 AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <dl.h>],
|
|
3675 [shl_load ("", 0, 0);])], [have_dl=yes],
|
2741
|
3676 [LIBS="$ac_save_LIBS"; AC_MSG_RESULT([no])])])])
|
2651
|
3677 if test "$have_dl" = "yes"; then
|
|
3678 AC_DEFINE(HAVE_SHL_LOAD)
|
|
3679 else
|
|
3680 dnl Check for libtool's libltdl
|
|
3681 AC_CHECK_HEADER(ltdl.h, [
|
|
3682 AC_MSG_CHECKING([for lt_dlinit in -lltdl])
|
|
3683 ac_save_LIBS="$LIBS"
|
|
3684 LIBS="$LIBS -lltdl"
|
3312
|
3685 AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <ltdl.h>],
|
|
3686 [lt_dlinit ();])], [have_dl=yes], [LIBS="$ac_save_LIBS"])])
|
2741
|
3687 AC_MSG_RESULT($have_dl)
|
2651
|
3688 if test "$have_dl" = "yes"; then
|
|
3689 AC_DEFINE(HAVE_LTDL)
|
|
3690 fi
|
|
3691 dnl end !HP/UX
|
|
3692 fi
|
|
3693 dnl end !dlopen
|
|
3694 fi
|
|
3695 ac_save_LIBS=
|
|
3696 dnl end !darwin
|
|
3697 esac
|
|
3698
|
|
3699 if test -n "$have_dl"; then
|
|
3700 dnl XE_SHLIB_STUFF (in aclocal.m4) defines $can_build_shared
|
|
3701 XE_SHLIB_STUFF
|
|
3702 fi
|
|
3703
|
|
3704 if test "$can_build_shared" = "yes"; then
|
|
3705 AC_DEFINE(HAVE_SHLIB)
|
|
3706 dnl src must be built before modules on MacOSX and Windows platforms, since
|
|
3707 dnl the binary must be available to properly link the modules
|
|
3708 dnl For no-module builds, this is added *after* the module directories
|
|
3709 XE_APPEND(src, MAKE_SUBDIR)
|
|
3710 XE_APPEND(src, INSTALL_ARCH_DEP_SUBDIR)
|
|
3711 test -n "$libdl" && XE_PREPEND(-l${libdl}, LIBS)
|
|
3712 AC_CHECK_FUNCS(dlerror _dlerror)
|
|
3713 enable_modules=yes
|
|
3714 MOD_CC="../../lib-src/ellcc"
|
|
3715 MODCFLAGS="\$(CFLAGS) --mode=compile --mod-output=\$@ -I../../src -I\$(srcdir)/../../src"
|
|
3716 INSTALLPATH="\$(moduledir)"
|
|
3717 MOD_INSTALL_PROGRAM=${INSTALL_PROGRAM}
|
|
3718 OBJECT_TO_BUILD="\$(MODNAME).ell"
|
|
3719 else
|
|
3720 if test "$enable_modules" = "yes"; then
|
|
3721 XE_DIE("Required module support cannot be provided.")
|
|
3722 else
|
|
3723 echo " No module support."
|
|
3724 fi
|
|
3725 enable_modules=no
|
|
3726 fi
|
|
3727 fi
|
|
3728 if test "$enable_modules" != "yes"; then
|
|
3729 MOD_CC="$XEMACS_CC"
|
|
3730 MODCFLAGS="\$(XE_CFLAGS) -I../../src -I\$(srcdir)/../../src"
|
|
3731 INSTALLPATH=""
|
|
3732 MOD_INSTALL_PROGRAM="true"
|
|
3733 OBJECT_TO_BUILD="\$(MODNAME).o"
|
|
3734 fi
|
|
3735 MODARCHDIR=
|
|
3736 MAKE_DOCFILE="../../lib-src/make-docfile"
|
|
3737 AC_SUBST(with_modules, $enable_modules)
|
|
3738 AC_SUBST(MOD_CC)
|
|
3739 AC_SUBST(MODARCHDIR)
|
|
3740 AC_SUBST(MAKE_DOCFILE)
|
|
3741 AC_SUBST(MODCFLAGS)
|
|
3742 AC_SUBST(INSTALLPATH)
|
|
3743 AC_SUBST(MOD_INSTALL_PROGRAM)
|
|
3744 AC_SUBST(OBJECT_TO_BUILD)
|
|
3745
|
|
3746 dnl Autodetect tooltalk
|
|
3747 if test "$with_tooltalk" != "no" ; then
|
|
3748 dnl autodetect the location of tt_c.h
|
|
3749 dnl tt_c.h might be in Tt or desktop include directories
|
|
3750 for dir in "" "Tt/" "desktop/" ; do
|
|
3751 AC_CHECK_HEADER(${dir}tt_c.h, tt_c_h_file="${dir}tt_c.h"; break)
|
|
3752 done
|
|
3753 if test -z "$tt_c_h_file"; then
|
|
3754 if test "$with_tooltalk" = "yes"; then
|
|
3755 USAGE_ERROR("Unable to find required tooltalk header files.")
|
|
3756 fi
|
|
3757 with_tooltalk=no
|
|
3758 fi
|
|
3759 fi
|
|
3760 if test "$with_tooltalk" != "no" ; then
|
|
3761 for extra_libs in "" "-lI18N -lce" "-lcxx"; do
|
|
3762 AC_CHECK_LIB(tt, tt_message_create,
|
|
3763 tt_libs="-ltt $extra_libs"; break, [:],$extra_libs)
|
|
3764 done
|
|
3765 if test -z "$tt_libs"; then
|
|
3766 if test "$with_tooltalk" = "yes"; then
|
|
3767 USAGE_ERROR("Unable to find required tooltalk libraries.")
|
|
3768 fi
|
|
3769 with_tooltalk=no
|
|
3770 fi
|
|
3771 fi
|
|
3772 test -z "$with_tooltalk" && with_tooltalk=yes
|
|
3773 if test "$with_tooltalk" = "yes"; then
|
|
3774 AC_DEFINE(TOOLTALK)
|
|
3775 AC_DEFINE_UNQUOTED(TT_C_H_FILE, "$tt_c_h_file")
|
|
3776 XE_PREPEND($tt_libs, libs_x)
|
|
3777 fi
|
|
3778
|
|
3779 dnl Autodetect CDE
|
|
3780 test -z "$with_cde" && { AC_CHECK_HEADER(Dt/Dt.h, , with_cde=no) }
|
|
3781 test -z "$with_cde" && { AC_CHECK_LIB(DtSvc, DtDndDragStart, [:], with_cde=no) }
|
|
3782 if test "$with_dragndrop" = "no" ; then
|
|
3783 if test "$with_cde" = "yes" ; then
|
3312
|
3784 AC_MSG_WARN([--with-cde forced to `no'; no generic Drag'n'Drop support])
|
2651
|
3785 fi
|
|
3786 with_cde=no
|
|
3787 fi
|
|
3788 test -z "$with_cde" && with_cde=yes
|
|
3789 if test "$with_cde" = "yes" ; then
|
|
3790 AC_DEFINE(HAVE_CDE)
|
|
3791 XE_PREPEND(-lDtSvc, libs_x)
|
|
3792 XE_APPEND(CDE, dragndrop_proto)
|
|
3793 with_tooltalk=yes # CDE requires Tooltalk
|
|
3794 need_motif=yes # CDE requires Motif
|
|
3795 fi
|
|
3796
|
|
3797 dnl Always compile OffiX unless --without-offix is given, no
|
|
3798 dnl X11 support is compiled in, no standard Xmu is available,
|
|
3799 dnl or dragndrop support is disabled
|
|
3800 dnl Because OffiX support currently loses when more than one display
|
|
3801 dnl is in use, we now disable it by default -slb 07/10/1998.
|
|
3802 test "$window_system" != "x11" && with_offix=no
|
|
3803 if test "$with_xmu" != yes -a "$with_x11" = yes; then
|
|
3804 if test "$with_offix" = "yes" ; then
|
3312
|
3805 AC_MSG_WARN([--with-offix forced to `no'; no real Xmu support])
|
2651
|
3806 fi
|
|
3807 with_offix=no
|
|
3808 fi
|
|
3809 if test "$with_dragndrop" = no; then
|
|
3810 if test "$with_offix" = "yes" ; then
|
3312
|
3811 AC_MSG_WARN([--with-offix forced to `no'; no generic Drag'n'Drop support])
|
2651
|
3812 fi
|
|
3813 with_offix=no
|
|
3814 fi
|
|
3815 if test "$with_cde" = yes; then
|
|
3816 if test "$with_offix" = "yes" ; then
|
3312
|
3817 AC_MSG_WARN([--with-offix forced to `no'; CDE already found])
|
2651
|
3818 fi
|
|
3819 with_offix=no
|
|
3820 fi
|
|
3821 test -z "$with_offix" && with_offix=no
|
|
3822 if test "$with_offix" = "yes"; then
|
|
3823 AC_DEFINE(HAVE_OFFIX_DND)
|
|
3824 XE_APPEND(offix.o, dnd_objs)
|
|
3825 XE_APPEND(OffiX, dragndrop_proto)
|
|
3826 fi
|
|
3827 if test "$with_gtk" = "yes"; then
|
|
3828 XE_APPEND(GTK, dragndrop_proto)
|
|
3829 fi
|
|
3830
|
|
3831 dnl Autodetect Drag'n'Drop support
|
|
3832 dnl always included if CDE, Offix, or MSWindows are defined
|
|
3833 if test "$with_dragndrop" != "no" ; then
|
|
3834 AC_MSG_CHECKING(if drag and drop API is needed)
|
|
3835 if test -n "$dragndrop_proto" ; then
|
|
3836 with_dragndrop=yes
|
|
3837 AC_MSG_RESULT([yes (${dragndrop_proto} )])
|
|
3838 AC_DEFINE(HAVE_DRAGNDROP)
|
|
3839 XE_APPEND(dragdrop.o, extra_objs)
|
|
3840 else
|
|
3841 with_dragndrop=no
|
|
3842 AC_MSG_RESULT(no)
|
|
3843 fi
|
|
3844 fi
|
|
3845
|
|
3846 dnl Autodetect LDAP
|
3312
|
3847 AC_MSG_CHECKING([for LDAP])
|
|
3848 AC_MSG_RESULT()
|
2651
|
3849 ldap_libs=
|
|
3850 test -z "$with_ldap" && { AC_CHECK_HEADER(ldap.h, ,with_ldap=no) }
|
|
3851 test -z "$with_ldap" && { AC_CHECK_HEADER(lber.h, ,with_ldap=no) }
|
|
3852 if test "$with_ldap" != "no"; then
|
|
3853 AC_CHECK_LIB(ldap, ldap_search, with_ldap=yes)
|
|
3854 dnl Check for other libraries we need to link with to get the main routines.
|
|
3855 test "$with_ldap" != "yes" && { AC_CHECK_LIB(ldap, ldap_open, [with_ldap=yes with_ldap_lber=yes], , -llber) }
|
|
3856 test "$with_ldap" != "yes" && { AC_CHECK_LIB(ldap, ldap_open, [with_ldap=yes with_ldap_lber=yes with_ldap_krb=yes], , -llber -lkrb) }
|
|
3857 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) }
|
|
3858 dnl Recently, we need -lber even though the main routines are elsewhere,
|
|
3859 dnl because otherwise be get link errors w.r.t. ber_pvt_opt_on. So just
|
|
3860 dnl check for that (it's a variable not a fun but that doesn't seem to
|
|
3861 dnl matter in these checks) and stick in -lber if so. Can't hurt (even to
|
|
3862 dnl stick it in always shouldn't hurt, I don't think) ... #### Someone who
|
|
3863 dnl #### understands LDAP needs to fix this properly.
|
|
3864 test "$with_ldap_lber" != "yes" && { AC_CHECK_LIB(lber, ber_pvt_opt_on, with_ldap_lber=yes) }
|
|
3865 fi
|
|
3866 if test "$with_ldap" = "yes"; then
|
|
3867 AC_DEFINE(HAVE_LDAP)
|
|
3868 if test "$with_ldap_des" = "yes" ; then
|
|
3869 XE_PREPEND(-ldes, ldap_libs)
|
|
3870 fi
|
|
3871 if test "$with_ldap_krb" = "yes" ; then
|
|
3872 XE_PREPEND(-lkrb, ldap_libs)
|
|
3873 fi
|
|
3874 if test "$with_ldap_lber" = "yes" ; then
|
|
3875 XE_PREPEND(-llber, ldap_libs)
|
|
3876 fi
|
|
3877 XE_PREPEND(-lldap, ldap_libs)
|
|
3878 save_LIBS="$LIBS" LIBS="$LIBS $ldap_libs"
|
|
3879 AC_CHECK_FUNCS(ldap_set_option ldap_get_lderrno ldap_result2error ldap_parse_result)
|
|
3880 LIBS="$save_LIBS"
|
|
3881 XE_APPEND(modules/ldap, MAKE_SUBDIR)
|
|
3882 need_modules_common=yes
|
|
3883 if test "$enable_modules" = "yes"; then
|
|
3884 XE_APPEND(modules/ldap, INSTALL_ARCH_DEP_SUBDIR)
|
|
3885 fi
|
|
3886 fi
|
|
3887 AC_SUBST(ldap_libs)
|
|
3888
|
|
3889 dnl Autodetect PostgreSQL
|
|
3890 dnl On many Linux systems, PostgreSQL is packaged to be installed in /usr;
|
|
3891 dnl in this case, configure will easily detect it there.
|
|
3892 dnl
|
|
3893 dnl If PostgreSQL is installed into a different prefix,
|
|
3894 dnl (such as the default /usr/local/pgsql when building from source),
|
|
3895 dnl that prefix must be specified using the --with-site-prefixes flag.
|
|
3896 postgresql_libs=
|
|
3897 if test "$with_postgresql" != "no"; then
|
3312
|
3898 AC_MSG_CHECKING([for PostgreSQL])
|
|
3899 AC_MSG_RESULT()
|
2651
|
3900
|
|
3901 dnl Look for these standard header file locations, known to be used on Linux
|
|
3902 for header_dir in "" "pgsql/" "postgresql/"; do
|
|
3903 AC_CHECK_HEADER(${header_dir}libpq-fe.h,
|
|
3904 libpq_fe_h_file=${header_dir}libpq-fe.h; break)
|
|
3905 done
|
|
3906
|
3050
|
3907 pq_libs=
|
|
3908 extra_libs=
|
|
3909 if test -n "$libpq_fe_h_file"; then
|
|
3910 dnl #### Would it be nicer to do this with a loop?
|
|
3911 dnl It seems unlikely that checking for SSL/crypto support can hurt,
|
|
3912 dnl even if it's found.
|
|
3913 AC_CHECK_LIB(pq, PQconnectdb,[pq_libs="-lpq"],[
|
|
3914 unset ac_cv_lib_pq_PQconnectdb;
|
|
3915 AC_CHECK_LIB(pq, PQconnectdb,[pq_libs="-lpq -lcrypto -lssl"],,
|
|
3916 [-lcrypto -lssl])])
|
|
3917 if test -z "$pq_libs"; then
|
|
3918 have_libpq="no"
|
|
3919 else
|
|
3920 have_libpq="yes"
|
|
3921 fi
|
|
3922 fi
|
2651
|
3923
|
|
3924 if test -n "$libpq_fe_h_file" -a "$have_libpq" = "yes"; then
|
|
3925 with_postgresql=yes
|
|
3926 AC_DEFINE(HAVE_POSTGRESQL)
|
|
3927 AC_CHECK_LIB(pq,PQconnectStart, [
|
|
3928 with_postgresqlv7=yes;
|
3050
|
3929 AC_DEFINE(HAVE_POSTGRESQLV7)], [:], $extra_libs)
|
2651
|
3930 AC_DEFINE_UNQUOTED(LIBPQ_FE_H_FILE, "$libpq_fe_h_file")
|
3050
|
3931 XE_PREPEND([$pq_libs], postgresql_libs)
|
2651
|
3932 XE_APPEND(modules/postgresql, MAKE_SUBDIR)
|
|
3933 need_modules_common=yes
|
|
3934 if test "$enable_modules" = "yes"; then
|
|
3935 XE_APPEND(modules/postgresql, INSTALL_ARCH_DEP_SUBDIR)
|
|
3936 fi
|
|
3937 elif test "$with_postgresql" = "yes"; then
|
|
3938 XE_DIE("Required PostgreSQL support cannot be provided. Check --with-site-prefixes.")
|
|
3939 fi
|
|
3940 fi
|
|
3941 AC_SUBST(postgresql_libs)
|
|
3942
|
|
3943 dnl ----------------------
|
|
3944 dnl Graphics libraries
|
|
3945 dnl ----------------------
|
|
3946
|
|
3947 if test "$window_system" != "none"; then
|
3312
|
3948 AC_MSG_CHECKING([for graphics libraries])
|
|
3949 AC_MSG_RESULT()
|
2651
|
3950
|
|
3951 dnl add special code to handle xpm-nox on Cygwin (csw)
|
|
3952 dnl -- should only happen if CYGWIN && WITH_XPM && WITH_MSW && !WITH_X
|
|
3953 libpath_xpm=
|
|
3954 incpath_xpm=
|
|
3955 case "$opsys" in
|
|
3956 cygwin*)
|
3228
|
3957 cygwin_top=`eval gcc -print-search-dirs | sed -ne s'/install: //p'`
|
|
3958 cygwin_top=`eval "cd $cygwin_top/../../../..; pwd"`
|
2651
|
3959 case "$window_system" in
|
|
3960 dnl use "standard" search pattern
|
|
3961 x11) ;;
|
|
3962 dnl hardcode "standard" non-X11 xpm lib/inc dirs
|
|
3963 msw) libpath_xpm="-L${cygwin_top}/lib/noX"
|
|
3964 incpath_xpm="-I${cygwin_top}/include/noX"
|
|
3965 ;;
|
|
3966 dnl not supported on cygwin (yet?)
|
|
3967 gtk) ;;
|
|
3968 dnl probably not reached...
|
|
3969 none) ;;
|
|
3970 dnl ditto
|
|
3971 *) ;;
|
|
3972 esac
|
|
3973 ;;
|
|
3974 dnl use "standard" search pattern for all other OS's
|
|
3975 *) ;;
|
|
3976 esac
|
|
3977 dnl Autodetect Xpm
|
|
3978 xpm_problem=""
|
|
3979 if test -z "$with_xpm"; then
|
|
3980 XE_PREPEND("$incpath_xpm", CFLAGS)
|
2940
|
3981 XE_PREPEND("$incpath_xpm", XE_CFLAGS)
|
2651
|
3982 XE_PREPEND("$libpath_xpm", LDFLAGS)
|
|
3983 AC_MSG_CHECKING(for Xpm - no older than 3.4f)
|
|
3984 xe_check_libs=-lXpm
|
|
3985 AC_RUN_IFELSE([AC_LANG_SOURCE([#define XPM_NUMBERS
|
|
3986 #include <X11/xpm.h>
|
|
3987 int main(int c, char **v) {
|
|
3988 return c == 1 ? 0 :
|
|
3989 XpmIncludeVersion != XpmLibraryVersion() ? 1 :
|
|
3990 XpmIncludeVersion < 30406 ? 2 : 0 ;}])],
|
|
3991 [./conftest dummy_arg; xpm_status=$?;
|
|
3992 if test "$xpm_status" = "0"; then
|
|
3993 with_xpm=yes;
|
|
3994 else
|
|
3995 with_xpm=no;
|
|
3996 if test "$xpm_status" = "1"; then
|
|
3997 xpm_problem="Xpm library version and header file version don't match!"
|
|
3998 elif test "$xpm_status" = "2"; then
|
|
3999 xpm_problem="Xpm library version is too old!"
|
|
4000 else
|
|
4001 xpm_problem="Internal xpm detection logic error!"
|
|
4002 fi
|
|
4003 echo "
|
|
4004 *** WARNING *** $xpm_problem
|
|
4005 I'm not touching that with a 10-foot pole!
|
|
4006 If you really want to use the installed version of Xpm, rerun
|
|
4007 configure and add '--with-xpm=yes', but don't blame me if XEmacs crashes!"
|
|
4008 fi],
|
|
4009 [with_xpm=no])
|
|
4010 xe_check_libs=
|
|
4011 AC_MSG_RESULT($with_xpm)
|
|
4012 fi
|
|
4013 if test "$with_xpm" = "yes"; then
|
|
4014 dnl #### This code assumes that if AC_CHECK_LIB fails,
|
|
4015 dnl #### then it will succeed if FOR_MSW is defined,
|
|
4016 dnl #### but doesn't actually verify this assumption.
|
|
4017 AC_DEFINE(HAVE_XPM)
|
|
4018 XE_PREPEND("$libpath_xpm", LDFLAGS)
|
|
4019 XE_PREPEND(-lXpm, libs_x)
|
|
4020 XE_PREPEND("$incpath_xpm", CFLAGS)
|
2940
|
4021 XE_PREPEND("$incpath_xpm", XE_CFLAGS)
|
3312
|
4022 AC_MSG_CHECKING([for "FOR_MSW" xpm])
|
2651
|
4023 xe_check_libs=-lXpm
|
3316
|
4024 AC_LINK_IFELSE([AC_LANG_PROGRAM([],[XpmCreatePixmapFromData();])],
|
2651
|
4025 [xpm_for_msw=no],
|
|
4026 [xpm_for_msw=yes])
|
|
4027 xe_check_libs=
|
|
4028 AC_MSG_RESULT($xpm_for_msw)
|
|
4029 if test "$xpm_for_msw" = "yes"; then
|
|
4030 AC_DEFINE(FOR_MSW)
|
|
4031 fi
|
|
4032 fi
|
|
4033
|
|
4034 dnl Autodetect XFACE
|
|
4035 test -z "$with_xface" && { AC_CHECK_HEADER(compface.h, ,with_xface=no) }
|
|
4036 test -z "$with_xface" && { AC_CHECK_LIB(compface, UnGenFace,[:] ,with_xface=no) }
|
|
4037 test -z "$with_xface" && with_xface=yes
|
|
4038 if test "$with_xface" = "yes"; then
|
|
4039 AC_DEFINE(HAVE_XFACE)
|
|
4040 XE_PREPEND(-lcompface, libs_x)
|
|
4041 fi
|
|
4042
|
|
4043 dnl For a brief period we had the GIF code split out into a separate library,
|
|
4044 dnl but patent problems, etc. sort of squashed that idea.
|
|
4045 dnl We default to building with builtin GIF decoding
|
|
4046 if test "$with_gif" != "no"; then
|
|
4047 with_gif="yes"
|
|
4048 AC_DEFINE(HAVE_GIF)
|
|
4049 fi
|
|
4050
|
|
4051 dnl Too many stupid linkers can't detect cascaded lib dependencies until runtime
|
|
4052 dnl So we always search for libz compression support.
|
|
4053 if test "$with_png $with_tiff" != "no no"; then
|
|
4054 AC_CHECK_LIB(c, inflate, [:], [
|
|
4055 AC_CHECK_LIB(z, inflate, [XE_PREPEND(-lz, libs_x)],[
|
|
4056 AC_CHECK_LIB(gz, inflate, [XE_PREPEND(-lgz, libs_x)])])])
|
|
4057 fi
|
|
4058
|
|
4059 dnl autodetect JPEG
|
|
4060 test -z "$with_jpeg" && { AC_CHECK_HEADER(jpeglib.h, ,with_jpeg=no) }
|
|
4061 test -z "$with_jpeg" && { AC_CHECK_LIB(jpeg, jpeg_destroy_decompress,[:],with_jpeg=no) }
|
|
4062 test -z "$with_jpeg" && with_jpeg=yes
|
|
4063 if test "$with_jpeg" = "yes"; then
|
|
4064 AC_DEFINE(HAVE_JPEG)
|
|
4065 XE_PREPEND(-ljpeg, libs_x)
|
|
4066 fi
|
|
4067
|
|
4068 dnl autodetect PNG
|
|
4069 png_problem=""
|
|
4070 test -z "$with_png" && { AC_CHECK_FUNC(pow, ,with_png=no) }
|
|
4071 test -z "$with_png" && { AC_CHECK_HEADER(png.h, ,with_png=no) }
|
2667
|
4072 test -z "$with_png" && { AC_CHECK_LIB(png, png_read_image,[:],with_png=no,[-lz]) }
|
2651
|
4073 if test -z "$with_png"; then
|
|
4074 AC_MSG_CHECKING(for workable png version information)
|
|
4075 xe_check_libs="-lpng -lz"
|
|
4076 AC_RUN_IFELSE([AC_LANG_SOURCE([#include <png.h>
|
|
4077 int main(int c, char **v) {
|
|
4078 if (c == 1) return 0;
|
|
4079 if (strcmp(png_libpng_ver, PNG_LIBPNG_VER_STRING) != 0) return 1;
|
|
4080 return (PNG_LIBPNG_VER < 10002) ? 2 : 0 ;}])],
|
|
4081 [./conftest dummy_arg; png_status=$?;
|
|
4082 if test "$png_status" = "0"; then
|
|
4083 with_png=yes;
|
|
4084 else
|
|
4085 with_png=no;
|
|
4086 if test "$png_status" = "1"; then
|
|
4087 png_problem="PNG library version and header file don't match!"
|
|
4088 elif test "$png_status" = "2"; then
|
|
4089 png_problem="PNG library version too old (pre 1.0.2)!"
|
|
4090 fi
|
|
4091 echo "
|
|
4092 *** WARNING *** $png_problem
|
|
4093 I'm not touching that with a 10-foot pole!
|
|
4094 If you really want to use the installed version of libPNG, rerun
|
|
4095 configure and add '--with-png=yes', but don't blame me if XEmacs crashes!"
|
|
4096 fi],
|
|
4097 [with_png=no])
|
|
4098 xe_check_libs=
|
|
4099 AC_MSG_RESULT($with_png)
|
|
4100 fi
|
|
4101 if test "$with_png" = "yes"; then
|
|
4102 AC_DEFINE(HAVE_PNG)
|
|
4103 XE_PREPEND(-lpng, libs_x)
|
|
4104 fi
|
|
4105
|
|
4106 dnl autodetect TIFF
|
|
4107 test -z "$with_tiff" && { AC_CHECK_HEADER(tiffio.h, ,with_tiff=no) }
|
2667
|
4108 test -z "$with_tiff" && { AC_CHECK_LIB(tiff, TIFFClientOpen,[:],with_tiff=no,[-lz]) }
|
2651
|
4109 test -z "$with_tiff" && with_tiff=yes
|
|
4110 if test "$with_tiff" = "yes"; then
|
|
4111 AC_DEFINE(HAVE_TIFF)
|
|
4112 XE_PREPEND(-ltiff, libs_x)
|
|
4113 fi
|
|
4114 fi
|
|
4115
|
|
4116 dnl ----------------------
|
|
4117 dnl GTK-Specific Graphics libraries
|
|
4118 dnl ----------------------
|
|
4119
|
|
4120 if test "$with_gtk" = "yes"; then
|
|
4121 dnl Autodetect XFACE
|
|
4122 test -z "$with_xface" && { AC_CHECK_HEADER(compface.h, ,with_xface=no) }
|
|
4123 test -z "$with_xface" && { AC_CHECK_LIB(compface, UnGenFace,[:] ,with_xface=no) }
|
|
4124 test -z "$with_xface" && with_xface=yes
|
|
4125 if test "$with_xface" = "yes"; then
|
|
4126 AC_DEFINE(HAVE_XFACE)
|
|
4127 XE_PREPEND(-lcompface, libs_gtk)
|
|
4128 fi
|
|
4129 fi
|
|
4130
|
|
4131 dnl ----------------------
|
|
4132 dnl X-Specific Graphics libraries
|
|
4133 dnl ----------------------
|
|
4134
|
|
4135 if test "$with_x11" = "yes"; then
|
3312
|
4136 AC_MSG_CHECKING([for X11 graphics libraries])
|
|
4137 AC_MSG_RESULT()
|
2651
|
4138 fi
|
|
4139
|
|
4140 case "$enable_widgets" in
|
3019
|
4141 "" | "yes" | "athena") detect_athena=yes ;;
|
2651
|
4142 *) detect_athena=no ;;
|
|
4143 esac
|
|
4144
|
3019
|
4145 case "$enable_dialogs" in
|
|
4146 "" | "yes" | "athena") detect_athena=yes ;;
|
|
4147 esac
|
|
4148
|
2651
|
4149 if test "$with_x11" = "yes" -a "$detect_athena" = "yes" ; then
|
3312
|
4150 AC_MSG_CHECKING([for the Athena widgets])
|
|
4151 AC_MSG_RESULT()
|
2651
|
4152
|
|
4153 dnl What in heck did the user actually want?
|
|
4154 case "$with_athena" in
|
|
4155 dnl This is the default, old fashioned flat Athena.
|
|
4156 "xaw" | "") athena_variant=Xaw athena_3d=no ;;
|
|
4157 "3d") athena_variant=Xaw3d athena_3d=yes ;;
|
|
4158 "next") athena_variant=neXtaw athena_3d=yes ;;
|
|
4159 "95") athena_variant=Xaw95 athena_3d=yes ;;
|
|
4160 "xpm") athena_variant=XawXpm athena_3d=yes ;;
|
|
4161 *) XE_DIE("Unknown Athena widget set \`$with_athena'. This should not happen.") ;;
|
|
4162 esac
|
|
4163
|
|
4164 dnl Search for the Athena library...
|
|
4165 if test "$athena_3d" = "no"; then
|
|
4166 AC_CHECK_LIB($athena_variant, XawScrollbarSetThumb,
|
|
4167 [
|
|
4168 dnl Must not be a 3d library...
|
|
4169 AC_CHECK_LIB($athena_variant, threeDClassRec,
|
|
4170 [AC_MSG_WARN([Could not find a non-3d Athena widget library.])],
|
|
4171 athena_lib=$athena_variant)
|
|
4172 ],
|
|
4173 AC_MSG_WARN([Could not find an Athena widget library.]))
|
|
4174 else
|
|
4175 dnl The real configuration, need 3d library
|
|
4176 AC_CHECK_LIB($athena_variant, threeDClassRec, athena_lib=$athena_variant,
|
|
4177 dnl OK, couldn't find it with a proper name, try the standard Athena lib
|
|
4178 dnl If that is 3d, presume the user asked for what they have installed.
|
|
4179 AC_CHECK_LIB(Xaw, threeDClassRec,
|
|
4180 [
|
|
4181 athena_lib=Xaw;
|
|
4182 AC_MSG_WARN([Assuming that libXaw is actually $athena_variant.]);
|
|
4183 ],
|
|
4184 [AC_MSG_WARN([Could not find a 3d Athena widget library that looked like $athena_variant.])]))
|
|
4185 fi
|
|
4186
|
|
4187 dnl Now we locate the Athena headers that we need.
|
|
4188 if test "$athena_3d" = "no"; then
|
|
4189 AC_CHECK_HEADER(X11/Xaw/ThreeD.h,
|
|
4190 [AC_MSG_WARN([Could not find a non-3d Athena header set.])],
|
|
4191 [AC_CHECK_HEADER(X11/Xaw/XawInit.h,
|
|
4192 [athena_h_path=X11/Xaw],
|
2694
|
4193 [AC_MSG_WARN([Could not find a non-3d Athena header set.])],
|
|
4194 [
|
|
4195 #include <X11/Intrinsic.h>
|
|
4196 ])])
|
2651
|
4197 else
|
|
4198 dnl The three-d Athena headers are so much more slippery.
|
|
4199 dnl Curse this `Lets replace standard libraries' thing that they did. :/
|
|
4200 AC_CHECK_HEADER(X11/$athena_variant/XawInit.h,
|
|
4201 [AC_CHECK_HEADER(X11/$athena_variant/ThreeD.h,
|
|
4202 [athena_h_path=X11/$athena_variant])],[],
|
|
4203 [
|
|
4204 #if HAVE_X11_XFUNCPROTO_H
|
|
4205 #include <X11/Xfuncproto.h>
|
|
4206 #endif
|
2705
|
4207 #include <X11/Intrinsic.h>
|
2651
|
4208 ])
|
|
4209
|
|
4210 dnl Is the variant specific header directory directly under include?
|
|
4211 if test -z "$athena_h_path"; then
|
|
4212 AC_CHECK_HEADER($athena_variant/XawInit.h,
|
|
4213 [AC_CHECK_HEADER($athena_variant/ThreeD.h,
|
|
4214 athena_h_path=$athena_variant)],[],
|
|
4215 [
|
|
4216 #if HAVE_X11_XFUNCPROTO_H
|
|
4217 #include <X11/Xfuncproto.h>
|
|
4218 #endif
|
2694
|
4219 #include <X11/Intrinsic.h>
|
2651
|
4220 ])
|
|
4221 fi
|
|
4222
|
|
4223 dnl If we couldn't find the specific variant, try the generic Athena 3d headers
|
|
4224 if test -z "$athena_h_path" -a "$athena_variant" != "Xaw3d"; then
|
|
4225 AC_CHECK_HEADER(X11/Xaw3d/XawInit.h,
|
|
4226 [AC_CHECK_HEADER(X11/Xaw3d/ThreeD.h,
|
|
4227 [
|
|
4228 AC_MSG_WARN([Assuming that X11/Xaw3d headers are suitable for $athena_variant.])
|
|
4229 athena_h_path=X11/Xaw3d
|
|
4230 ])],[],
|
|
4231 [
|
|
4232 #if HAVE_X11_XFUNCPROTO_H
|
|
4233 #include <X11/Xfuncproto.h>
|
|
4234 #endif
|
2694
|
4235 #include <X11/Intrinsic.h>
|
2651
|
4236 ])
|
|
4237 fi
|
|
4238
|
|
4239 dnl Also generic 3d headers directly under include dir
|
|
4240 if test -z "$athena_h_path" -a "$athena_variant" != "Xaw3d"; then
|
|
4241 AC_CHECK_HEADER(Xaw3d/XawInit.h,
|
|
4242 [AC_CHECK_HEADER(Xaw3d/ThreeD.h,
|
|
4243 [
|
|
4244 AC_MSG_WARN([Assuming that Xaw3d headers are suitable for $athena_variant.])
|
|
4245 athena_h_path=Xaw3d
|
|
4246 ])],[],
|
|
4247 [
|
|
4248 #if HAVE_X11_XFUNCPROTO_H
|
|
4249 #include <X11/Xfuncproto.h>
|
|
4250 #endif
|
2694
|
4251 #include <X11/Intrinsic.h>
|
2651
|
4252 ])
|
|
4253 fi
|
|
4254
|
|
4255 dnl If nothing yet found, see if Xaw is a 3d header set...
|
|
4256 dnl We AC_MSG_WARN if we fail because I am all out of ideas...
|
|
4257 if test -z "$athena_h_path"; then
|
|
4258 AC_CHECK_HEADER(X11/Xaw/ThreeD.h,
|
|
4259 [
|
|
4260 AC_MSG_WARN([Assuming that X11/Xaw headers are suitable for $athena_variant.])
|
|
4261 athena_h_path=X11/Xaw
|
|
4262 ],
|
|
4263 [AC_MSG_WARN([Could not find a suitable 3d Athena header set.])])
|
|
4264 fi
|
|
4265 fi
|
|
4266
|
|
4267 dnl Do we actually have a usable Athena widget set? Please?
|
|
4268 if test -n "$athena_lib" -a -n "$athena_h_path"; then
|
|
4269 have_xaw=yes
|
|
4270 else
|
|
4271 have_xaw=no
|
|
4272 fi
|
|
4273
|
|
4274 else
|
|
4275 have_xaw=no
|
|
4276 fi dnl "$with_x11" = "yes" -a "detect_athena" = "yes"
|
|
4277
|
|
4278 if test "$with_x11" = "yes"; then
|
|
4279 dnl autodetect Motif - but only add to libs_x later (if necessary)
|
|
4280 dnl Use a different function to the earlier test to avoid problems with the
|
|
4281 dnl internal cache.
|
|
4282 AC_CHECK_HEADER(Xm/Xm.h,
|
|
4283 [AC_CHECK_LIB(Xm, XmStringCreate, have_motif=yes, have_motif=no)],
|
|
4284 have_motif=no)
|
|
4285
|
|
4286 if test "$have_motif" = "yes"; then
|
|
4287 dnl autodetect lesstif
|
|
4288 AC_MSG_CHECKING(for Lesstif)
|
|
4289 AC_EGREP_CPP(yes,
|
|
4290 [#include <Xm/Xm.h>
|
|
4291 #ifdef LESSTIF_VERSION
|
|
4292 yes
|
|
4293 #endif
|
|
4294 ], have_lesstif=yes, have_lesstif=no)
|
|
4295 AC_MSG_RESULT($have_lesstif)
|
|
4296 fi
|
|
4297
|
|
4298 fi dnl "$with_x11" = "yes"
|
|
4299
|
|
4300 dnl Finish ensuring that we have values for the various toolkit items.
|
|
4301 dnl Not all toolkits support all widgets
|
3019
|
4302
|
|
4303 dnl Avoid using Motif :-(
|
|
4304 case "$opsys" in
|
|
4305 *linux* | *darwin* | *bsd* ) lucid_prefers_motif="no" ;;
|
|
4306 * ) lucid_prefers_motif="yes" ;;
|
|
4307 esac
|
2651
|
4308
|
|
4309 case "$enable_menubars" in "" | "yes" | "athena" )
|
|
4310 enable_menubars="lucid" ;;
|
|
4311 esac
|
3094
|
4312 dnl this is not in xft reloaded #3
|
|
4313 if test "$with_xft_menubars" != "no" ; then
|
|
4314 if test "$with_xft_emacs" = "yes" -a "$with_menubars" != "no" ; then
|
|
4315 with_xft_menubars="yes"
|
|
4316 else
|
|
4317 with_xft_menubars="no"
|
|
4318 fi
|
|
4319 fi
|
2651
|
4320 case "$enable_dialogs" in "" | "yes" | "lucid" )
|
3019
|
4321 if test "$lucid_prefers_motif" = "yes"; then
|
|
4322 if test "$have_motif" = "yes"; then enable_dialogs="motif"
|
|
4323 elif test "$have_xaw" = "yes"; then enable_dialogs="athena"
|
|
4324 elif test "$with_msw" = "yes"; then enable_dialogs="msw"
|
|
4325 else enable_dialogs=no
|
|
4326 fi
|
|
4327 else
|
|
4328 if test "$have_xaw" = "yes"; then enable_dialogs="athena"
|
|
4329 elif test "$have_motif" = "yes"; then enable_dialogs="motif"
|
|
4330 elif test "$with_msw" = "yes"; then enable_dialogs="msw"
|
|
4331 else enable_dialogs=no
|
|
4332 fi
|
2651
|
4333 fi ;;
|
|
4334 esac
|
|
4335 case "$enable_scrollbars" in "" | "yes" )
|
|
4336 enable_scrollbars="lucid" ;;
|
|
4337 esac
|
|
4338 case "$enable_widgets" in "" | "yes" | "lucid")
|
3019
|
4339 if test "$lucid_prefers_motif" = "yes"; then
|
|
4340 if test "$have_motif" = "yes"; then enable_widgets="motif"
|
|
4341 elif test "$have_xaw" = "yes"; then enable_widgets="athena"
|
|
4342 elif test "$with_msw" = "yes"; then enable_widgets="msw"
|
|
4343 else enable_widgets=no
|
|
4344 fi
|
|
4345 else
|
|
4346 if test "$have_xaw" = "yes"; then enable_widgets="athena"
|
|
4347 elif test "$have_motif" = "yes"; then enable_widgets="motif"
|
|
4348 elif test "$with_msw" = "yes"; then enable_widgets="msw"
|
|
4349 else enable_widgets=no
|
|
4350 fi
|
2651
|
4351 fi ;;
|
|
4352 esac
|
3094
|
4353 dnl this is not in xft reloaded #3
|
|
4354 if test "$with_xft_tabs" != "no" ; then
|
|
4355 if test "$with_xft_emacs" = "yes" -a "$enable_widgets" != "no" ; then
|
|
4356 with_xft_tabs="yes"
|
|
4357 else
|
|
4358 with_xft_tabs="no"
|
|
4359 fi
|
|
4360 fi
|
|
4361 dnl this is not in xft reloaded #3
|
|
4362 if test "$with_xft_gauge" != "no" ; then
|
|
4363 if test "$with_xft_emacs" = "yes" -a "$enable_widgets" != "no" ; then
|
|
4364 with_xft_gauge="yes"
|
|
4365 else
|
|
4366 with_xft_gauge="no"
|
|
4367 fi
|
|
4368 fi
|
2651
|
4369
|
|
4370 all_widgets="$enable_menubars $enable_scrollbars $enable_dialogs $enable_toolbars $enable_widgets"
|
|
4371
|
|
4372 case "$all_widgets" in
|
|
4373 *athena* )
|
|
4374 if test "$have_xaw" != "yes"; then
|
|
4375 XE_DIE("Could not find a suitable Athena library to build with.")
|
|
4376 fi
|
|
4377
|
|
4378 dnl Add the Lucid widget Athena code
|
|
4379 XE_APPEND(lwlib-Xaw.o, lwlib_objs)
|
|
4380
|
|
4381 dnl Add the Athena widget library we located earlier
|
|
4382 XE_PREPEND(-l$athena_lib, libs_x)
|
|
4383
|
|
4384 dnl Tell lwlib where to find the Athena header files.
|
|
4385 dnl Many people have tried to create a `smart' way of doing this,
|
|
4386 dnl but all have failed. Before changing the following ugly definitions,
|
|
4387 dnl consult the veterans of many a battle.
|
|
4388 AC_DEFINE_UNQUOTED(ATHENA_Scrollbar_h_,"$athena_h_path/Scrollbar.h")
|
|
4389 AC_DEFINE_UNQUOTED(ATHENA_Dialog_h_,"$athena_h_path/Dialog.h")
|
|
4390 AC_DEFINE_UNQUOTED(ATHENA_Form_h_,"$athena_h_path/Form.h")
|
|
4391 AC_DEFINE_UNQUOTED(ATHENA_Command_h_,"$athena_h_path/Command.h")
|
|
4392 AC_DEFINE_UNQUOTED(ATHENA_Label_h_,"$athena_h_path/Label.h")
|
|
4393 AC_DEFINE_UNQUOTED(ATHENA_LabelP_h_,"$athena_h_path/LabelP.h")
|
|
4394 AC_DEFINE_UNQUOTED(ATHENA_Toggle_h_,"$athena_h_path/Toggle.h")
|
|
4395 AC_DEFINE_UNQUOTED(ATHENA_ToggleP_h_,"$athena_h_path/ToggleP.h")
|
|
4396 AC_DEFINE_UNQUOTED(ATHENA_AsciiText_h_,"$athena_h_path/AsciiText.h")
|
|
4397 AC_DEFINE_UNQUOTED(ATHENA_XawInit_h_,"$athena_h_path/XawInit.h")
|
|
4398
|
|
4399 AC_DEFINE(LWLIB_USES_ATHENA)
|
|
4400 AC_DEFINE(NEED_ATHENA)
|
|
4401 need_athena="yes"
|
|
4402
|
|
4403 if test "$athena_3d" = "yes"; then
|
|
4404 AC_DEFINE(HAVE_ATHENA_3D)
|
|
4405 fi
|
|
4406 ;;
|
|
4407 esac
|
|
4408
|
|
4409 case "$all_widgets" in *motif* )
|
|
4410 AC_DEFINE(LWLIB_USES_MOTIF)
|
|
4411 AC_DEFINE(NEED_MOTIF)
|
|
4412 XE_APPEND(lwlib-Xm.o, lwlib_objs)
|
|
4413 need_motif=yes ;;
|
|
4414 esac
|
|
4415
|
|
4416 test "$enable_menubars" = "lucid" && XE_APPEND(xlwmenu.o, lwlib_objs)
|
|
4417 test "$enable_menubars" = "motif" && XE_APPEND(xlwmenu.o, lwlib_objs)
|
|
4418 test "$enable_scrollbars" = "lucid" && XE_APPEND(xlwscrollbar.o, lwlib_objs)
|
|
4419 test "$enable_widgets" != "no" && test "$enable_widgets" != "msw" && \
|
|
4420 XE_APPEND(xlwtabs.o xlwgcs.o, lwlib_objs)
|
|
4421 case "$enable_widgets" in athena* )
|
|
4422 XE_APPEND(xlwradio.o xlwcheckbox.o xlwgauge.o, lwlib_objs);;
|
|
4423 esac
|
|
4424 case "$all_widgets" in *lucid* )
|
|
4425 AC_DEFINE(NEED_LUCID)
|
|
4426 XE_APPEND(lwlib-Xlw.o, lwlib_objs) ;;
|
|
4427 esac
|
|
4428
|
|
4429 AC_SUBST(lwlib_objs)
|
|
4430
|
|
4431 test "$enable_scrollbars" = "athena" && AC_DEFINE(LWLIB_SCROLLBARS_ATHENA)
|
|
4432 test "$enable_dialogs" = "athena" && AC_DEFINE(LWLIB_DIALOGS_ATHENA)
|
|
4433
|
|
4434 if test "$athena_3d" = "yes"; then
|
|
4435 test "$enable_scrollbars" = "athena" && AC_DEFINE(LWLIB_SCROLLBARS_ATHENA3D)
|
|
4436 test "$enable_dialogs" = "athena" && AC_DEFINE(LWLIB_DIALOGS_ATHENA3D)
|
|
4437 fi
|
|
4438
|
|
4439 case "$enable_widgets" in athena* ) AC_DEFINE(LWLIB_WIDGETS_ATHENA);; esac
|
|
4440 test "$enable_widgets" != "no" && test "$enable_widgets" != "msw" && \
|
|
4441 AC_DEFINE(LWLIB_TABS_LUCID)
|
|
4442
|
|
4443 test "$enable_menubars" != "no" && AC_DEFINE(HAVE_MENUBARS)
|
|
4444 test "$enable_scrollbars" != "no" && AC_DEFINE(HAVE_SCROLLBARS)
|
|
4445 test "$enable_dialogs" != "no" && AC_DEFINE(HAVE_DIALOGS)
|
|
4446 test "$enable_toolbars" != "no" && AC_DEFINE(HAVE_TOOLBARS)
|
|
4447 test "$enable_widgets" != "no" && AC_DEFINE(HAVE_WIDGETS)
|
|
4448
|
|
4449 test "$enable_menubars" = "lucid" && AC_DEFINE(LWLIB_MENUBARS_LUCID)
|
|
4450 test "$enable_scrollbars" = "lucid" && AC_DEFINE(LWLIB_SCROLLBARS_LUCID)
|
|
4451
|
|
4452 test "$enable_menubars" = "motif" && AC_DEFINE(LWLIB_MENUBARS_MOTIF)
|
|
4453 test "$enable_scrollbars" = "motif" && AC_DEFINE(LWLIB_SCROLLBARS_MOTIF)
|
|
4454 test "$enable_dialogs" = "motif" && AC_DEFINE(LWLIB_DIALOGS_MOTIF)
|
|
4455 test "$enable_widgets" = "motif" && AC_DEFINE(LWLIB_WIDGETS_MOTIF)
|
|
4456
|
3094
|
4457 test "$with_xft_menubars" = "yes" && AC_DEFINE(USE_XFT_MENUBARS)
|
|
4458 test "$with_xft_tabs" = "yes" && AC_DEFINE(USE_XFT_TABS)
|
|
4459 test "$with_xft_gauge" = "yes" && AC_DEFINE(USE_XFT_GAUGE)
|
|
4460
|
2651
|
4461 dnl ----------------------
|
|
4462 dnl Mule-dependent options
|
|
4463 dnl ----------------------
|
|
4464
|
|
4465 test -z "$enable_mule" && enable_mule=no
|
|
4466
|
|
4467 dnl if test "$enable_mule" = "yes" && test ! -d "$srcdir/lisp/mule"; then
|
|
4468 dnl echo "Attempt to Build with Mule without Mule/Lisp"
|
|
4469 dnl echo "Please install the XEmacs/Mule tarball or"
|
|
4470 dnl echo "rerun configure with --with-mule=no"
|
|
4471 dnl exit 1
|
|
4472 dnl fi
|
|
4473
|
|
4474 if test "$enable_default_eol_detection" = "yes"; then
|
|
4475 AC_DEFINE(HAVE_DEFAULT_EOL_DETECTION)
|
|
4476 fi
|
|
4477
|
2973
|
4478 dnl initialize _libs variables for possible modules at top level
|
|
4479 canna_libs=
|
|
4480 wnn_libs=
|
|
4481
|
2651
|
4482 if test "$enable_mule" = "yes" ; then
|
3312
|
4483 AC_MSG_CHECKING([for Mule-related features])
|
2651
|
4484 AC_DEFINE(MULE)
|
|
4485
|
|
4486 dnl Use -lintl to get internationalized strerror for Mule
|
|
4487 AC_CHECK_HEADERS(libintl.h)
|
|
4488 AC_CHECK_LIB(intl, strerror)
|
|
4489
|
3312
|
4490 AC_MSG_CHECKING([for Mule input methods])
|
2651
|
4491 dnl Do we have the XmIm* routines? And if so, do we want to use them?
|
|
4492 case "$with_xim" in "" | "yes" )
|
3312
|
4493 AC_MSG_CHECKING([for XIM])
|
2651
|
4494 AC_CHECK_LIB(X11, XOpenIM, with_xim=xlib, with_xim=no)
|
|
4495 dnl XIM + Lesstif is not (yet?) usable
|
3019
|
4496 dnl Only use Motif if linking Motif anyway, or don't have xlib XIM
|
|
4497 if test "$need_motif $have_lesstif" = "yes no"; then
|
|
4498 AC_CHECK_LIB(Xm, XmImMbLookupString, with_xim=motif)
|
3248
|
4499 dnl #### This is always false.
|
|
4500 dnl Not clear what we want, although "yes no yes" is insufficient.
|
3019
|
4501 elif test "$have_motif $have_lesstif $with_xim" = "yes no no"; then
|
2651
|
4502 AC_CHECK_LIB(Xm, XmImMbLookupString, with_xim=motif)
|
|
4503 fi ;;
|
|
4504 esac
|
|
4505 if test "$with_xim" != "no"; then
|
|
4506 AC_DEFINE(HAVE_XIM)
|
|
4507 if test "$with_xim" = "xlib"; then
|
|
4508 AC_DEFINE(XIM_XLIB)
|
|
4509 XE_ADD_OBJS(input-method-xlib.o)
|
|
4510 fi
|
|
4511 if test "$with_xim" = "motif"; then
|
|
4512 AC_DEFINE(XIM_MOTIF)
|
|
4513 need_motif=yes
|
|
4514 XE_ADD_OBJS(input-method-motif.o)
|
|
4515 fi
|
|
4516 if test "$with_xim" = "motif"; then
|
|
4517 with_xfs=no
|
|
4518 fi
|
|
4519 fi
|
|
4520
|
|
4521 dnl "with_xfs" = "yes"
|
|
4522 if test "$with_xfs" = "yes" ; then
|
3312
|
4523 AC_MSG_CHECKING([for XFontSet])
|
2651
|
4524 AC_CHECK_LIB(X11, XmbDrawString, [:], with_xfs=no)
|
|
4525 if test "$with_xfs" = "yes" && test "$enable_menubars" = "lucid"; then
|
|
4526 AC_DEFINE(USE_XFONTSET)
|
|
4527 if test "$with_xim" = "no" ; then
|
|
4528 XE_ADD_OBJS(input-method-xlib.o)
|
|
4529 fi
|
|
4530 fi
|
|
4531 fi dnl with_xfs
|
|
4532
|
|
4533 dnl Autodetect WNN
|
|
4534 test "$with_wnn6" = "yes" && with_wnn=yes # wnn6 implies wnn support
|
|
4535 test -z "$with_wnn" && { AC_CHECK_HEADER(wnn/jllib.h, ,with_wnn=no) }
|
|
4536 dnl gcc 2.97 fixincludes breaks inclusion of wnn/commonhd.h
|
|
4537 test -z "$with_wnn" && { AC_CHECK_HEADER(wnn/commonhd.h, ,with_wnn=no) }
|
|
4538 dnl Detour to find crypt
|
|
4539 if test "$with_wnn" != "no"; then
|
|
4540 AC_CHECK_FUNCS(crypt)
|
|
4541 test "$ac_cv_func_crypt" != "yes" && { AC_CHECK_LIB(crypt, crypt) }
|
|
4542 fi
|
|
4543 dnl Back to our regularly scheduled wnn hunting
|
|
4544 if test -z "$with_wnn" -o "$with_wnn" = "yes"; then
|
|
4545 AC_CHECK_LIB(wnn,jl_dic_list_e,libwnn=wnn,
|
|
4546 AC_CHECK_LIB(wnn4,jl_dic_list_e,libwnn=wnn4,
|
|
4547 AC_CHECK_LIB(wnn6,jl_dic_list_e,libwnn=wnn6,
|
|
4548 AC_CHECK_LIB(wnn6_fromsrc,dic_list_e,libwnn=wnn6_fromsrc,with_wnn=no))))
|
|
4549 fi
|
|
4550 test -z "$with_wnn" && with_wnn=yes
|
|
4551 if test "$with_wnn" = "yes"; then
|
|
4552 AC_DEFINE(HAVE_WNN)
|
|
4553 XE_PREPEND(-l$libwnn, libs_x)
|
|
4554 if test "$with_wnn6" != "no"; then
|
|
4555 AC_CHECK_LIB($libwnn, jl_fi_dic_list, with_wnn6=yes)
|
|
4556 test "$with_wnn6" = "yes" && AC_DEFINE(WNN6)
|
|
4557 fi
|
|
4558 fi
|
|
4559
|
|
4560 dnl Autodetect canna
|
2973
|
4561 dnl canna_libs variable is initialized at toplevel
|
2651
|
4562 canna_includes_found=no
|
|
4563 if test "$with_canna" != "no"; then
|
|
4564 AC_CHECK_HEADER(canna/jrkanji.h,canna_includes_found=yes)
|
|
4565 fi
|
|
4566 if test "$canna_includes_found" = "no" -a "$with_canna" != "no" -a \
|
|
4567 -d "/usr/local/canna/include"; then
|
|
4568 save_c_switch_site="$c_switch_site"
|
|
4569 c_switch_site="$c_switch_site -I/usr/local/canna/include"
|
|
4570 AC_CHECK_HEADER(canna/jrkanji.h,canna_includes_found=yes)
|
|
4571 if test "$canna_includes_found" != "yes"; then
|
|
4572 c_switch_site="$save_c_switch_site"
|
|
4573 with_canna="no"
|
|
4574 fi
|
|
4575 fi
|
|
4576
|
|
4577 test -z "$with_canna" && { AC_CHECK_HEADER(canna/RK.h, , with_canna=no) }
|
|
4578 test -z "$with_canna" && { AC_CHECK_LIB(RKC, RkBgnBun, [:],with_canna=no) }
|
|
4579 test -z "$with_canna" && { AC_CHECK_LIB(canna,jrKanjiControl,[:],with_canna=no) }
|
|
4580 test -z "$with_canna" && with_canna=yes
|
|
4581 if test "$with_canna" = "yes"; then
|
|
4582 AC_DEFINE(HAVE_CANNA)
|
2973
|
4583 XE_APPEND(modules/canna, MAKE_SUBDIR)
|
|
4584 need_modules_common=yes
|
|
4585 if test "$with_modules" = "yes"; then
|
|
4586 XE_APPEND(modules/canna, INSTALL_ARCH_DEP_SUBDIR)
|
|
4587 fi
|
|
4588 XE_PREPEND(-lcanna -lRKC, canna_libs)
|
2651
|
4589 fi
|
2973
|
4590 AC_SUBST(canna_libs)
|
2651
|
4591
|
|
4592 else dnl "$enable_mule" = "no"
|
|
4593 for feature in xim canna wnn; do
|
|
4594 if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
|
|
4595 AC_MSG_WARN([--with-${feature} ignored: Not valid without Mule support])
|
|
4596 fi
|
|
4597 eval "with_${feature}=no"
|
|
4598 done
|
|
4599 fi dnl with_mule
|
|
4600
|
|
4601
|
|
4602 dnl At this point, we know whether we need the motif lib or not.
|
|
4603 if test "$need_motif" = "yes" ; then
|
|
4604 XE_PREPEND(-lXm, libs_x)
|
|
4605 dnl AIX needs the following library for use with Motif
|
|
4606 AC_CHECK_LIB(i18n, layout_object_getvalue, [XE_PREPEND(-li18n, libs_x)])
|
|
4607 XE_COMPUTE_RUNPATH()
|
|
4608 fi
|
|
4609
|
|
4610 dnl ----------------------------------------------------------------
|
|
4611 dnl Check for POSIX functions.
|
|
4612 dnl ----------------------------------------------------------------
|
|
4613
|
|
4614 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)
|
|
4615
|
|
4616 dnl getaddrinfo() is borked under hpux11
|
|
4617 if test "$ac_cv_func_getaddrinfo" != "no" ; then
|
|
4618 case "$opsys" in
|
|
4619 hpux11 )
|
|
4620 AC_MSG_WARN([Use of getaddrinfo is disabled for HP-UX 11.XX.])
|
|
4621 ac_cv_func_getaddrinfo=no
|
|
4622 ;;
|
|
4623 esac
|
|
4624 fi
|
|
4625
|
3092
|
4626 dnl check for vdb-related stuff
|
|
4627 if test "$check_vdb_posix" = "yes" ; then
|
|
4628 dnl no mprotect, no vdb
|
|
4629 AC_CHECK_FUNC(mprotect,AC_DEFINE(HAVE_MPROTECT) have_vdb_mprotect=yes,)
|
|
4630
|
|
4631 dnl sigaction needs either struct siginfo or siginfo_t
|
|
4632 AC_CHECK_FUNC(sigaction, AC_DEFINE(HAVE_SIGACTION) have_vdb_sigaction=yes,
|
|
4633 have_vdb_sigaction=no)
|
|
4634 AC_CHECK_MEMBER(struct siginfo.si_addr,
|
|
4635 AC_DEFINE(HAVE_STRUCT_SIGINFO_SI_ADDR) have_si_addr=yes,,
|
|
4636 [#include <signal.h>])
|
|
4637 AC_CHECK_MEMBER(siginfo_t.si_addr,
|
|
4638 AC_DEFINE(HAVE_SIGINFO_T_SI_ADDR) have_si_addr=yes,,
|
|
4639 [#include <signal.h>])
|
|
4640 if test "$have_si_addr" != "yes" ; then
|
|
4641 have_vdb_sigaction=no
|
|
4642 fi
|
|
4643
|
|
4644 dnl signal needs struct sigcontext
|
|
4645 AC_CHECK_FUNC(signal, AC_DEFINE(HAVE_SIGNAL) have_vdb_signal=yes,)
|
|
4646 AC_CHECK_MEMBER(struct sigcontext.cr2,
|
|
4647 AC_DEFINE(HAVE_STRUCT_SIGCONTEXT_CR2) have_cr2=yes,,
|
|
4648 [#include <signal.h>])
|
|
4649
|
|
4650 if test "$have_cr2" != "yes" ; then
|
|
4651 have_vdb_signal=no
|
|
4652 fi
|
|
4653
|
|
4654 if test "$have_vdb_mprotect" != "yes" ; then
|
|
4655 have_vdb_sigaction=no
|
|
4656 have_vdb_signal=no
|
|
4657 fi
|
|
4658
|
|
4659 if test "$have_vdb_sigaction" != "yes" -a "$have_vdb_signal" != "yes" ; then
|
|
4660 have_vdb_posix=no
|
|
4661 have_vdb_fake=yes
|
3102
|
4662 XE_DIE("No working write-barrier implementation found for this system.
|
|
4663 Please report this and provide information about your system.")
|
3092
|
4664 else
|
|
4665 have_vdb_posix=yes
|
|
4666 have_vdb_fake=no
|
|
4667 fi
|
|
4668 fi
|
|
4669
|
2651
|
4670 dnl ----------------------------------------------------------------
|
|
4671 dnl Check for Unixoid pty/process support.
|
|
4672 dnl ----------------------------------------------------------------
|
|
4673
|
|
4674 dnl There is no "standard" pty allocation method. Every system is different.
|
|
4675 dnl getpt() is the preferred pty allocation method on glibc systems.
|
|
4676 dnl _getpty() is the preferred pty allocation method on SGI systems.
|
|
4677 dnl grantpt(), unlockpt(), ptsname() are defined by Unix98.
|
|
4678 AC_CHECK_FUNCS(getpt _getpty grantpt unlockpt ptsname killpg tcgetpgrp)
|
|
4679
|
|
4680 dnl openpty() is the preferred pty allocation method on BSD and Tru64 systems.
|
|
4681 dnl openpty() might be declared in:
|
|
4682 dnl - pty.h (Tru64 or Linux)
|
|
4683 dnl - libutil.h (FreeBSD)
|
|
4684 dnl - util.h (NetBSD)
|
|
4685 AC_CHECK_FUNC(openpty, have_openpty=yes, [
|
|
4686 AC_CHECK_LIB(util, openpty, have_openpty=yes need_libutil=yes)])
|
|
4687 if test "$have_openpty" = "yes"; then
|
|
4688 AC_DEFINE(HAVE_OPENPTY)
|
|
4689 AC_CHECK_HEADERS(libutil.h util.h, break)
|
|
4690 test "$need_libutil" = "yes" && XE_APPEND(-lutil, libs_system)
|
|
4691 fi
|
|
4692
|
|
4693 dnl Check for system-specific pty header files
|
|
4694 dnl Often the TIOCSIG* symbols are hiding there.
|
|
4695 case "$opsys" in
|
|
4696 dnl HPUX pty.h #defines TRUE and FALSE, so just use ptyio.h there.
|
|
4697 hpux*) AC_CHECK_HEADERS(sys/ptyio.h) ;;
|
|
4698 *) AC_CHECK_HEADERS(pty.h)
|
|
4699 test "$ac_cv_header_pty_h" = "no" && AC_CHECK_HEADERS(sys/pty.h)
|
|
4700 ;;
|
|
4701 esac
|
|
4702
|
|
4703 dnl Check for STREAM support functions.
|
|
4704 dnl Confusingly, "str" means both "string" and "SysV Streams".
|
|
4705 AC_CHECK_HEADERS(stropts.h)
|
|
4706 if test "$ac_cv_header_stropts_h" = "yes"; then
|
|
4707 AC_CHECK_FUNCS(isastream)
|
|
4708 AC_CHECK_HEADERS(strtio.h) dnl TIOCSIGNAL
|
|
4709 fi
|
|
4710
|
|
4711 dnl Check whether the system provides getloadavg().
|
|
4712 AC_CHECK_FUNCS(getloadavg)
|
|
4713
|
|
4714 if test "$ac_cv_func_getloadavg" = "yes"; then
|
|
4715 dnl Solaris 8 declares getloadavg() in <sys/loadavg.h>.
|
|
4716 dnl glibc 2.2 declares getloadavg() in <stdlib.h>...
|
|
4717 dnl ...if we #define _GNU_SOURCE, which we do.
|
|
4718 AC_CHECK_HEADERS(sys/loadavg.h)
|
|
4719 else
|
|
4720 dnl We define our own getloadavg() using lower level functions.
|
|
4721 XE_ADD_OBJS(getloadavg.o)
|
|
4722
|
|
4723 dnl Used by getloadavg() - does not require root priveleges
|
|
4724 AC_CHECK_LIB(kstat, kstat_open)
|
|
4725 AC_CHECK_HEADERS(kstat.h)
|
|
4726
|
|
4727 dnl Another way to get the load average
|
|
4728 AC_CHECK_LIB(kvm, kvm_read)
|
|
4729 fi
|
|
4730
|
|
4731 dnl If netdb.h does not declare h_errno, we must declare it by hand.
|
|
4732 AC_MSG_CHECKING(whether netdb declares h_errno)
|
3312
|
4733 AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <netdb.h>],
|
|
4734 [return h_errno;])],
|
2651
|
4735 [AC_MSG_RESULT(yes)
|
|
4736 AC_DEFINE(HAVE_H_ERRNO)],
|
|
4737 [AC_MSG_RESULT(no)])
|
|
4738
|
|
4739 AC_MSG_CHECKING(for sigsetjmp)
|
3312
|
4740 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <setjmp.h>],
|
|
4741 [sigjmp_buf bar; sigsetjmp (bar, 0);])],
|
2651
|
4742 [AC_MSG_RESULT(yes)
|
|
4743 AC_DEFINE(HAVE_SIGSETJMP)],
|
|
4744 [AC_MSG_RESULT(no)])
|
|
4745
|
|
4746 AC_MSG_CHECKING(whether localtime caches TZ)
|
|
4747 AC_CACHE_VAL(emacs_cv_localtime_cache,
|
|
4748 [if test "$ac_cv_func_tzset" = "yes"; then
|
|
4749 AC_RUN_IFELSE([AC_LANG_SOURCE([#include <time.h>
|
|
4750 #if STDC_HEADERS
|
|
4751 # include <stdlib.h>
|
|
4752 #endif
|
|
4753 extern char **environ;
|
|
4754 unset_TZ ()
|
|
4755 {
|
|
4756 char **from, **to;
|
|
4757 for (to = from = environ; (*to = *from); from++)
|
|
4758 if (! (to[[0]][[0]] == 'T' && to[[0]][[1]] == 'Z' && to[[0]][[2]] == '='))
|
|
4759 to++;
|
|
4760 }
|
|
4761 char TZ_GMT0[[]] = "TZ=GMT0";
|
|
4762 char TZ_PST8[[]] = "TZ=PST8";
|
|
4763 main()
|
|
4764 {
|
|
4765 time_t now = time ((time_t *) 0);
|
|
4766 int hour_GMT0, hour_unset;
|
|
4767 if (putenv (TZ_GMT0) != 0)
|
|
4768 exit (1);
|
|
4769 hour_GMT0 = localtime (&now)->tm_hour;
|
|
4770 unset_TZ ();
|
|
4771 hour_unset = localtime (&now)->tm_hour;
|
|
4772 if (putenv (TZ_PST8) != 0)
|
|
4773 exit (1);
|
|
4774 if (localtime (&now)->tm_hour == hour_GMT0)
|
|
4775 exit (1);
|
|
4776 unset_TZ ();
|
|
4777 if (localtime (&now)->tm_hour != hour_unset)
|
|
4778 exit (1);
|
|
4779 exit (0);
|
|
4780 }])], emacs_cv_localtime_cache=no, emacs_cv_localtime_cache=yes,
|
|
4781 [# If we have tzset, assume the worst when cross-compiling.
|
|
4782 emacs_cv_localtime_cache=yes])
|
|
4783 else
|
|
4784 # If we lack tzset, report that localtime does not cache TZ,
|
|
4785 # since we can't invalidate the cache if we don't have tzset.
|
|
4786 emacs_cv_localtime_cache=no
|
|
4787 fi],[:])dnl
|
|
4788 AC_MSG_RESULT($emacs_cv_localtime_cache)
|
|
4789 if test $emacs_cv_localtime_cache = yes; then
|
|
4790 AC_DEFINE(LOCALTIME_CACHE)
|
|
4791 fi
|
|
4792
|
|
4793 if test "$HAVE_TIMEVAL" = "yes"; then
|
|
4794 AC_MSG_CHECKING(whether gettimeofday accepts one or two arguments)
|
3312
|
4795 AC_LINK_IFELSE([AC_LANG_PROGRAM([
|
2651
|
4796 #ifdef TIME_WITH_SYS_TIME
|
|
4797 #include <sys/time.h>
|
|
4798 #include <time.h>
|
|
4799 #else
|
|
4800 #ifdef HAVE_SYS_TIME_H
|
|
4801 #include <sys/time.h>
|
|
4802 #else
|
|
4803 #include <time.h>
|
|
4804 #endif
|
|
4805 #endif
|
|
4806 ],
|
|
4807 [
|
|
4808 struct timeval time;
|
|
4809 gettimeofday (&time, 0);
|
3312
|
4810 ])],
|
2651
|
4811 [AC_MSG_RESULT(two)],
|
|
4812 [AC_MSG_RESULT(one)
|
|
4813 AC_DEFINE(GETTIMEOFDAY_ONE_ARGUMENT)])
|
|
4814 fi
|
|
4815
|
|
4816
|
|
4817 AC_C_INLINE
|
|
4818 test "$ac_cv_c_inline" != "no" -a "$GCC" = "yes" && XE_ADD_OBJS(inline.o)
|
|
4819
|
|
4820 dnl check for the typeof extension
|
|
4821 AC_MSG_CHECKING(for typeof)
|
3312
|
4822 AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i; __typeof__(i) j;])],
|
|
4823 typeofname="__typeof__",
|
|
4824 [AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i; typeof(i) j;])],
|
|
4825 typeofname="typeof",
|
2651
|
4826 typeofname=no)])
|
|
4827 AC_MSG_RESULT($typeofname)
|
|
4828 if test "$typeofname" != "no"; then
|
|
4829 AC_DEFINE_UNQUOTED(TYPEOF, $typeofname)
|
|
4830 fi
|
|
4831
|
|
4832 dnl HP-UX has a working alloca in libPW.
|
|
4833 dnl case "${GCC}${opsys}" in hpux* )
|
|
4834 dnl AC_CHECK_FUNC(alloca, [:], [AC_CHECK_LIB(PW, alloca)])
|
|
4835 dnl esac
|
|
4836
|
|
4837 dnl AC_FUNC_ALLOCA doesn't know about DEC C's #pragma intrinsic(alloca)
|
|
4838 if test "$__DECC" != "yes"; then
|
|
4839 AC_FUNC_ALLOCA
|
|
4840 test -n "$ALLOCA" && XE_ADD_OBJS($ALLOCA)
|
|
4841 fi
|
|
4842
|
|
4843 AC_MSG_CHECKING(for working alloca in function calls)
|
|
4844 AC_RUN_IFELSE([AC_LANG_SOURCE([
|
|
4845 #if defined (__CYGWIN__)
|
|
4846 #include <alloca.h>
|
|
4847 #elif defined (__GNUC__)
|
|
4848 #define alloca __builtin_alloca
|
|
4849 #elif defined (__DECC)
|
|
4850 #include <alloca.h>
|
|
4851 #pragma intrinsic(alloca)
|
|
4852 #elif defined (HAVE_ALLOCA_H)
|
|
4853 #include <alloca.h>
|
|
4854 #elif defined (_AIX)
|
|
4855 #pragma alloca
|
|
4856 #elif ! defined (alloca)
|
|
4857 #ifdef C_ALLOCA
|
|
4858 #define alloca xemacs_c_alloca
|
|
4859 #else
|
|
4860 void *alloca ();
|
|
4861 #endif /* C_ALLOCA */
|
|
4862 #endif /* !defined (alloca) */
|
|
4863
|
|
4864 void
|
|
4865 f1 (double a, void *ptr, int b)
|
|
4866 {
|
|
4867 unsigned char *ptr2 = (unsigned char *) ptr;
|
|
4868 if (ptr2[[0]] != 0xBF || ptr2[[1]] != 0xBF || ptr2[[3000]] != 0xBF)
|
|
4869 exit (1);
|
|
4870 if (a != 3.1415 || b != -5490)
|
|
4871 exit (1);
|
|
4872 }
|
|
4873
|
|
4874 int
|
|
4875 f2 (short c, void *ptr, long e)
|
|
4876 {
|
|
4877 unsigned char *ptr2 = (unsigned char *) ptr;
|
|
4878 if (ptr2[[0]] != 0xFB || ptr2[[1]] != 0xFB || ptr2[[1000]] != 0xFB)
|
|
4879 exit (1);
|
|
4880 if (c != 665 || e != 776776776)
|
|
4881 exit (1);
|
|
4882 f1 (3.1415, memset (alloca (3001), 0xBF, 3001), -5490);
|
|
4883 return 42;
|
|
4884 }
|
|
4885
|
|
4886 int
|
|
4887 main (int argc, char *argv[])
|
|
4888 {
|
|
4889 if (f2 (665, memset (alloca (1001), 0xFB, 1001), 776776776) != 42)
|
|
4890 return 1;
|
|
4891 return 0;
|
|
4892 }
|
|
4893 ])], working_alloca_in_function_calls=yes, working_alloca_in_function_calls=no)
|
|
4894 AC_MSG_RESULT($working_alloca_in_function_calls)
|
|
4895 test "$working_alloca_in_function_calls" != "yes" && \
|
|
4896 AC_DEFINE(BROKEN_ALLOCA_IN_FUNCTION_CALLS)
|
|
4897
|
|
4898 AC_MSG_CHECKING([for working scanf])
|
|
4899 AC_RUN_IFELSE([AC_LANG_SOURCE([
|
|
4900 int
|
|
4901 main (int argc, char **argv)
|
|
4902 {
|
|
4903 int ret, cp1, cp2, endcount;
|
|
4904 char *p = "0x7d 0x000E ";
|
|
4905 ret = sscanf (p, "%i %i%n", &cp1, &cp2, &endcount);
|
|
4906 /* endcount should be 13 but it's 11 in Cygwin newlib after 6/04;
|
|
4907 this breaks unicode.c */
|
|
4908 return endcount != 13;
|
|
4909 }
|
|
4910 ])], working_scanf=yes, working_scanf=no)
|
|
4911 AC_MSG_RESULT($working_scanf)
|
|
4912 test "$working_scanf" != "yes" && \
|
|
4913 AC_DEFINE(CYGWIN_SCANF_BUG)
|
|
4914
|
|
4915 dnl Check whether strcoll exists and works correctly. (This does more
|
|
4916 dnl than just check for its existence.) If so, it defines HAVE_STRCOLL.
|
|
4917 AC_FUNC_STRCOLL
|
|
4918
|
|
4919 dnl If `getpgrp' takes no argument (the POSIX.1 version), define
|
|
4920 dnl `GETPGRP_VOID'. Otherwise, it is the BSD version, which takes a
|
|
4921 dnl process ID as an argument.
|
|
4922 AC_CHECK_FUNCS(getpgrp)
|
|
4923 AC_FUNC_GETPGRP
|
|
4924
|
|
4925 dnl We used to call AC_FUNC_MMAP here
|
|
4926 dnl Instead we now use following, suggested by Neal Becker
|
|
4927 AC_MSG_CHECKING(for working mmap)
|
|
4928 case "$opsys" in ultrix* ) have_mmap=no ;; *)
|
|
4929 AC_RUN_IFELSE([AC_LANG_SOURCE([#include <stdio.h>
|
|
4930 #include <unistd.h>
|
|
4931 #include <fcntl.h>
|
|
4932 #include <sys/mman.h>
|
|
4933
|
|
4934 #ifndef MAP_VARIABLE
|
|
4935 #define MAP_VARIABLE 0
|
|
4936 #endif
|
|
4937
|
|
4938 #ifndef MAP_FAILED
|
|
4939 #define MAP_FAILED -1
|
|
4940 #endif
|
|
4941
|
|
4942 int main (int argc, char *argv[])
|
|
4943 {
|
|
4944 int fd = -1;
|
|
4945 caddr_t p;
|
|
4946 #ifndef MAP_ANONYMOUS
|
|
4947 fd = open ("/dev/zero", O_RDWR);
|
|
4948 if (fd < 0)
|
|
4949 return 1;
|
|
4950 #define MAP_ANONYMOUS 0
|
|
4951 #endif
|
|
4952 if (mmap(0, 1024, PROT_READ | PROT_WRITE,
|
|
4953 MAP_PRIVATE | MAP_VARIABLE | MAP_ANONYMOUS,
|
|
4954 fd, 0) != (void *) MAP_FAILED)
|
|
4955 return 0;
|
|
4956 perror ("conftest: mmap failed");
|
|
4957 return 1;
|
|
4958 }])], have_mmap=yes, have_mmap=no) ;;
|
|
4959 esac
|
|
4960 AC_MSG_RESULT($have_mmap)
|
|
4961 test "$have_mmap" = "yes" && AC_DEFINE(HAVE_MMAP)
|
|
4962
|
|
4963 dnl By default we switch off rel-alloc on cygwin as it generally causes us grief
|
|
4964 case "$opsys" in cygwin*)
|
|
4965 test "$with_rel_alloc" = "default" && with_rel_alloc=no ;;
|
|
4966 esac
|
|
4967 dnl rel_alloc requires either GNU malloc or system malloc with mmap
|
|
4968 dnl We only turn rel_alloc on by default if mmap is available.
|
|
4969 test "$GNU_MALLOC" != "yes" -a "$have_mmap" != "yes" && with_rel_alloc=no
|
|
4970 if test "$with_rel_alloc $have_mmap" = "default yes"; then
|
|
4971 if test "$doug_lea_malloc" = "yes"; then
|
|
4972 dnl Check if malloc() calls mmap(), making rel_alloc pointless.
|
|
4973 AC_MSG_CHECKING(for M_MMAP_THRESHOLD)
|
3312
|
4974 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <malloc.h>],[
|
2651
|
4975 #ifndef M_MMAP_THRESHOLD
|
|
4976 #error No M_MMAP_THRESHOLD :-(
|
|
4977 !@+$%^&*_)(_ - unlikely to compile...
|
|
4978 #endif
|
3312
|
4979 ])], [with_rel_alloc=no; AC_MSG_RESULT(yes);],
|
|
4980 [with_rel_alloc=yes; AC_MSG_RESULT(no);])
|
2651
|
4981 else
|
|
4982 with_rel_alloc=yes
|
|
4983 fi
|
|
4984 fi
|
|
4985 test "$with_rel_alloc" = "yes" && AC_DEFINE(REL_ALLOC)
|
|
4986
|
|
4987 dnl Check for terminal I/O variants
|
|
4988 dnl TERMIOS systems may have termio.h, but not vice-versa, I think.
|
|
4989 AC_CHECK_HEADER(termios.h,
|
|
4990 AC_DEFINE(HAVE_TERMIOS)
|
|
4991 AC_DEFINE(SIGNALS_VIA_CHARACTERS)
|
|
4992 AC_DEFINE(NO_TERMIO),
|
|
4993 [AC_CHECK_HEADER(termio.h, [AC_DEFINE(HAVE_TERMIO)])])
|
|
4994
|
|
4995
|
|
4996 dnl Check for Internet sockets.
|
|
4997 AC_CHECK_FUNC(socket,
|
|
4998 [AC_CHECK_HEADER(netinet/in.h,
|
|
4999 [AC_CHECK_HEADER(arpa/inet.h, [
|
|
5000 AC_DEFINE(HAVE_SOCKETS)
|
3312
|
5001 AC_MSG_CHECKING([for sun_len member in struct sockaddr_un])
|
|
5002 AC_LINK_IFELSE([AC_LANG_PROGRAM([
|
2651
|
5003 #include <sys/types.h>
|
|
5004 #include <sys/socket.h>
|
|
5005 #include <sys/un.h>
|
|
5006 ],
|
3312
|
5007 [static struct sockaddr_un x; x.sun_len = 1;])],
|
2651
|
5008 [AC_MSG_RESULT(yes); AC_DEFINE(HAVE_SOCKADDR_SUN_LEN)],
|
|
5009 [AC_MSG_RESULT(no)])
|
3312
|
5010 AC_MSG_CHECKING([for ip_mreq struct in netinet/in.h])
|
|
5011 AC_LINK_IFELSE([AC_LANG_PROGRAM([
|
2651
|
5012 #include <sys/types.h>
|
|
5013 #include <netinet/in.h>
|
|
5014 ],
|
3312
|
5015 [static struct ip_mreq x;])],
|
2651
|
5016 [AC_MSG_RESULT(yes); AC_DEFINE(HAVE_MULTICAST)],
|
|
5017 [AC_MSG_RESULT(no)])])])])
|
|
5018
|
|
5019 dnl Check for SYS V IPC. (Inferior to sockets.)
|
|
5020 AC_CHECK_FUNC(msgget,
|
|
5021 [AC_CHECK_HEADER(sys/ipc.h,
|
|
5022 [AC_CHECK_HEADER(sys/msg.h,
|
|
5023 [AC_DEFINE(HAVE_SYSVIPC)])])])
|
|
5024
|
|
5025 dnl Check for directory variants
|
|
5026 AC_CHECK_HEADER(dirent.h, [AC_DEFINE(SYSV_SYSTEM_DIR)],
|
|
5027 [AC_CHECK_HEADER(sys/dir.h, , [AC_DEFINE(NONSYSTEM_DIR_LIBRARY)])])
|
|
5028
|
|
5029 dnl Check for nlist.h
|
|
5030 AC_CHECK_HEADER(nlist.h, AC_DEFINE(NLIST_STRUCT), )
|
|
5031
|
|
5032 dnl Check for sound of various sorts.
|
3312
|
5033 AC_MSG_CHECKING([for sound support])
|
|
5034 AC_MSG_RESULT()
|
2651
|
5035
|
|
5036 dnl Autodetect native sound
|
|
5037 test -n "$with_native_sound_lib" && enable_sound_native=yes
|
|
5038
|
|
5039 if test "$enable_sound_native" != "no"; then
|
|
5040 dnl Maybe sound is already on include path...
|
|
5041 if test -n "$with_native_sound_lib"; then
|
|
5042 AC_CHECK_HEADER(multimedia/audio_device.h,
|
|
5043 [sound_found=yes sound_cflags=""
|
|
5044 XE_ADD_OBJS(sunplay.o)])
|
|
5045 fi
|
|
5046
|
|
5047 dnl Autodetect Sun native sound from SUNWaudmo package
|
|
5048 if test -z "$sound_found" -a -d "/usr/demo/SOUND"; then
|
|
5049 if test -d "/usr/demo/SOUND/include/multimedia"; then
|
|
5050 sun_sound_cflags="-I/usr/demo/SOUND/include"
|
|
5051 elif test -d "/usr/demo/SOUND/multimedia"; then
|
|
5052 sun_sound_cflags="-I/usr/demo/SOUND"
|
|
5053 fi
|
|
5054
|
|
5055 if test -n "$with_native_sound_lib"; then
|
|
5056 sun_sound_lib="$with_native_sound_lib"
|
|
5057 elif test -r "/usr/demo/SOUND/lib/libaudio.a"; then
|
|
5058 sun_sound_lib="/usr/demo/SOUND/lib/libaudio.a"
|
|
5059 elif test -r "/usr/demo/SOUND/libaudio.a"; then
|
|
5060 sun_sound_lib="/usr/demo/SOUND/libaudio.a"
|
|
5061 fi
|
|
5062
|
|
5063 if test -n "$sun_sound_cflags" -a -n "$sun_sound_lib"; then
|
|
5064 with_native_sound_lib="$sun_sound_lib"
|
|
5065 sound_cflags="$sun_sound_cflags"
|
|
5066 sound_found=yes
|
|
5067 XE_ADD_OBJS(sunplay.o)
|
|
5068 fi
|
|
5069 fi
|
|
5070
|
|
5071 dnl Check for SGI and HP native sound libs
|
|
5072 if test -z "$sound_found"; then
|
|
5073 case "$ac_cv_build" in
|
|
5074 *-sgi-* )
|
|
5075 if test -z "$with_native_sound_lib"; then
|
|
5076 AC_CHECK_LIB(audio, ALopenport, with_native_sound_lib="-laudio")
|
|
5077 fi
|
|
5078 if test -n "$with_native_sound_lib"; then
|
|
5079 sound_found=yes sound_cflags=""
|
|
5080 XE_ADD_OBJS(sgiplay.o)
|
|
5081 fi ;;
|
|
5082 hppa*-hp-hpux* )
|
|
5083 if test -z "$with_native_sound_lib"; then
|
|
5084 AC_CHECK_LIB(Alib, AOpenAudio, with_native_sound_lib="-lAlib")
|
|
5085 fi
|
|
5086 if test -n "$with_native_sound_lib"; then
|
|
5087 sound_found=yes
|
|
5088 XE_ADD_OBJS(hpplay.o)
|
|
5089 if test "$GCC" = "yes" # Kludge city
|
|
5090 then sound_cflags="-Dconst= -Dvolatile= -I/usr/audio/examples"
|
|
5091 else sound_cflags="+e -I/usr/audio/examples"
|
|
5092 fi
|
|
5093 fi ;;
|
|
5094 esac
|
|
5095 fi
|
|
5096
|
3060
|
5097 dnl Win32 uses native sound
|
2651
|
5098 if test -z "$sound_found"; then
|
3060
|
5099 case "$opsys" in cygwin* | mingw* )
|
2651
|
5100 sound_found=yes
|
|
5101 with_native_sound_lib=
|
|
5102 XE_ADD_OBJS(ntplay.o)
|
3060
|
5103 ;;
|
|
5104 esac
|
2651
|
5105 fi
|
|
5106
|
|
5107 dnl Check for Linux/BSD native sound (also on recent Cygwins)
|
|
5108 if test -z "$sound_found"; then
|
|
5109 for dir in "machine" "sys" "linux"; do
|
|
5110 AC_CHECK_HEADER([${dir}/soundcard.h], [
|
|
5111 sound_found=yes
|
2663
|
5112 case "${ac_cv_build}" in
|
2651
|
5113 *netbsd* )
|
|
5114 # #### this is probably not the right way to do this
|
|
5115 # we should port to native NetBSD stuff
|
2663
|
5116
|
|
5117 dnl Aidan says: We have other things to be doing. If some
|
|
5118 dnl energetic NetBSD partisan volunteers, then yeah, cool,
|
|
5119 dnl but as it is, this works, and is unlikely to stop
|
|
5120 dnl working any time soon.
|
|
5121
|
2651
|
5122 AC_CHECK_LIB(ossaudio, _oss_ioctl,
|
2663
|
5123 [with_native_sound_lib=-lossaudio
|
2651
|
5124 AC_MSG_WARN([Using NetBSD-deprecated -lossaudio])],
|
|
5125 [sound_found=no])
|
|
5126 ;;
|
|
5127 dnl Aidan sez: OpenBSD as well can use Linux's sound API, and needs
|
|
5128 dnl the same library. Add here!
|
|
5129 esac
|
|
5130 break])
|
|
5131 done
|
|
5132
|
|
5133 if test "$sound_found" = "yes"; then
|
|
5134 need_miscplay=yes
|
|
5135 XE_ADD_OBJS(linuxplay.o)
|
|
5136 AC_DEFINE_UNQUOTED(SOUNDCARD_H_FILE, ["${dir}/soundcard.h"])
|
|
5137 fi
|
|
5138 fi
|
|
5139
|
|
5140 if test "$sound_found" = "yes"; then
|
|
5141 enable_sound_native=yes
|
|
5142 else
|
|
5143 if test "$enable_sound_native" = "yes" ; then
|
|
5144 AC_MSG_WARN([No native libraries found. Disabling native sound support.])
|
|
5145 fi
|
|
5146 enable_sound_native=no
|
|
5147 fi
|
|
5148 fi
|
|
5149
|
|
5150 if test "$enable_sound_native" = "yes"; then
|
|
5151 AC_DEFINE(HAVE_NATIVE_SOUND)
|
|
5152 test -n "$with_native_sound_lib" && XE_PREPEND($with_native_sound_lib, LIBS)
|
|
5153 fi
|
|
5154
|
3308
|
5155 dnl ALSA sound support
|
|
5156 if test "$enable_sound_alsa" != "no"; then
|
3309
|
5157 AC_CHECK_HEADER([alsa/input.h], [
|
3308
|
5158 AC_CHECK_LIB(asound, snd_pcm_open, have_alsa_sound=yes)])
|
|
5159 if test "$have_alsa_sound" = "yes"; then
|
|
5160 enable_sound_alsa=yes
|
|
5161 AC_DEFINE(HAVE_ALSA_SOUND)
|
|
5162 XE_ADD_OBJS(alsaplay.o)
|
|
5163 XE_PREPEND(-lasound, LIBS)
|
|
5164 else
|
|
5165 test "$enable_sound_alsa" = "yes" && \
|
|
5166 XE_DIE("Required ALSA sound support cannot be provided.")
|
|
5167 enable_sound_alsa=no
|
|
5168 fi
|
|
5169 fi
|
|
5170
|
2651
|
5171 dnl NAS Sound support
|
|
5172 if test "$enable_sound_nas" != "no"; then
|
|
5173 AC_CHECK_HEADER(audio/audiolib.h, [
|
|
5174 AC_CHECK_LIB(audio, AuOpenServer, have_nas_sound=yes)])
|
|
5175 if test "$have_nas_sound" = "yes"; then
|
|
5176 enable_sound_nas=yes
|
|
5177 AC_DEFINE(HAVE_NAS_SOUND)
|
|
5178 XE_ADD_OBJS(nas.o)
|
|
5179 XE_PREPEND(-laudio, libs_x)
|
|
5180 dnl If the nas library does not contain the error jump point,
|
|
5181 dnl then we force safer behavior.
|
|
5182 AC_EGREP_HEADER(AuXtErrorJump,audio/Xtutil.h,,[old_nas=yes; AC_DEFINE(NAS_NO_ERROR_JUMP)])
|
|
5183 else
|
|
5184 test "$enable_sound_nas" = "yes" && \
|
|
5185 XE_DIE("Required NAS sound support cannot be provided.")
|
|
5186 enable_sound_nas=no
|
|
5187 fi
|
|
5188 fi
|
|
5189
|
|
5190 dnl ESD Sound support
|
|
5191 if test "$enable_sound_esd" != "no"; then
|
|
5192 AC_CHECK_PROG(have_esd_config, esd-config, yes, no)
|
|
5193 if test "$have_esd_config" = "yes"; then
|
|
5194 save_c_switch_site="$c_switch_site" save_LIBS="$LIBS"
|
|
5195 XE_APPEND(`esd-config --cflags`, c_switch_site)
|
|
5196 XE_PREPEND(`esd-config --libs`, LIBS)
|
|
5197 AC_CHECK_FUNC(esd_play_stream,
|
|
5198 have_esd_sound=yes,
|
|
5199 c_switch_site="$save_c_switch_site" LIBS="$save_LIBS")
|
|
5200 fi
|
|
5201
|
|
5202 if test "$have_esd_sound" = "yes"; then
|
|
5203 enable_sound_esd=yes
|
|
5204 need_miscplay=yes
|
|
5205 XE_ADD_OBJS(esd.o)
|
|
5206 AC_DEFINE(HAVE_ESD_SOUND)
|
|
5207 else
|
|
5208 test "$enable_sound_esd" = "yes" && \
|
|
5209 XE_DIE("Required ESD sound support cannot be provided.")
|
|
5210 enable_sound_esd=no
|
|
5211 fi
|
|
5212 fi
|
|
5213
|
|
5214 test "$need_miscplay" = "yes" && XE_ADD_OBJS(miscplay.o)
|
|
5215
|
|
5216 dnl ---------------------
|
|
5217 dnl TTY-dependent options
|
|
5218 dnl ---------------------
|
|
5219
|
|
5220 test -z "$with_tty" && with_tty=yes
|
|
5221
|
|
5222 if test "$with_tty" = "yes" ; then
|
3312
|
5223 AC_MSG_CHECKING([for TTY-related features])
|
|
5224 AC_MSG_RESULT()
|
2651
|
5225 AC_DEFINE(HAVE_TTY)
|
|
5226
|
|
5227 dnl Autodetect ncurses.
|
|
5228 if test -z "$with_ncurses"; then
|
|
5229 AC_CHECK_LIB(ncurses, tgetent, with_ncurses=yes, with_ncurses=no)
|
|
5230 fi
|
|
5231 if test "$with_ncurses" = "yes"; then
|
|
5232 AC_DEFINE(HAVE_NCURSES)
|
|
5233 AC_CHECK_HEADER(ncurses/curses.h, curses_h_file=ncurses/curses.h)
|
|
5234 AC_CHECK_HEADER(ncurses/term.h, term_h_file=ncurses/term.h)
|
|
5235 XE_ADD_OBJS(terminfo.o)
|
|
5236 XE_PREPEND(-lncurses, LIBS)
|
|
5237
|
|
5238 if test "$ac_cv_header_ncurses_curses_h" != "yes" ; then
|
|
5239 dnl Try again, and check for the bogus ncurses/ include bug.
|
|
5240 dnl (i.e. ncurses/curses.h bogusly includes <unctrl.h> instead of
|
|
5241 dnl <ncurses/unctrl.h>)
|
|
5242 save_c_switch_site="$c_switch_site"
|
|
5243 c_switch_site="$c_switch_site -I/usr/include/ncurses"
|
|
5244 AC_CHECK_HEADER(ncurses/curses.h, curses_h_file=ncurses/curses.h)
|
|
5245 if test "$ac_cv_header_ncurses_curses_h" = "yes"
|
|
5246 then AC_MSG_WARN([Your system has the bogus ncurses include bug.])
|
|
5247 else c_switch_site="$save_c_switch_site"
|
|
5248 fi
|
|
5249 fi
|
|
5250 else dnl "$with_ncurses" = "no"
|
|
5251 dnl Autodetect terminfo/-lcurses/-ltermlib/-ltermcap
|
|
5252 if test "$have_terminfo" = "yes"; then
|
|
5253 XE_ADD_OBJS(terminfo.o)
|
|
5254 if test -n "$libs_termcap"; then
|
|
5255 XE_PREPEND($libs_termcap, LIBS)
|
|
5256 else
|
|
5257 for lib in curses termlib termcap; do
|
|
5258 AC_CHECK_LIB($lib, tgetent, XE_PREPEND(-l${lib}, LIBS); break)
|
|
5259 done
|
|
5260 fi
|
|
5261 else dnl "$have_terminfo" = "no" && "with_ncurses" = "no"
|
|
5262 XE_ADD_OBJS(tparam.o)
|
|
5263 dnl The HP-UX curses library seems to have a badly broken version of select(2)
|
|
5264 dnl that makes "poll: interrupted system call" messages to appear and
|
|
5265 dnl Emacs subprocesses to hang (e.g. TeX compilation w/ AUCTeX) */
|
|
5266 case "$opsys" in *-hp-hpux* ) libs_termcap="-ltermcap" ;; esac
|
|
5267 if test -n "$libs_termcap"; then
|
|
5268 XE_PREPEND($libs_termcap, LIBS)
|
|
5269 else
|
|
5270 AC_CHECK_LIB(curses, tgetent, XE_PREPEND(-lcurses, LIBS),
|
|
5271 AC_CHECK_LIB(termcap, tgetent, XE_PREPEND(-ltermcap, LIBS),
|
|
5272 XE_ADD_OBJS(termcap.o)))
|
|
5273 fi
|
|
5274 fi
|
|
5275 fi
|
|
5276 AC_DEFINE_UNQUOTED(CURSES_H_FILE, "${curses_h_file-curses.h}")
|
|
5277 AC_DEFINE_UNQUOTED(TERM_H_FILE, "${term_h_file-term.h}")
|
|
5278
|
|
5279 dnl General Purpose Mouse (libgpm) support
|
|
5280 if test "$with_gpm" != "no"; then
|
|
5281 AC_CHECK_HEADER(gpm.h, [
|
|
5282 AC_CHECK_LIB(gpm, Gpm_Open, have_gpm=yes)])
|
|
5283 if test "$have_gpm" = "yes"; then
|
|
5284 with_gpm=yes
|
|
5285 AC_DEFINE(HAVE_GPM)
|
|
5286 XE_PREPEND(-lgpm, LIBS)
|
|
5287 elif test "$with_gpm" = "yes"; then
|
|
5288 XE_DIE(["GPM requested, but gpm.h or libgpm seems to be missing."])
|
|
5289 else
|
|
5290 with_gpm=no
|
|
5291 fi
|
|
5292 fi
|
|
5293
|
|
5294 else dnl "$with_tty" = "no"
|
|
5295 for feature in ncurses gpm; do
|
|
5296 if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
|
|
5297 AC_MSG_WARN([--with-${feature} ignored: Not valid without TTY support])
|
|
5298 fi
|
|
5299 eval "with_${feature}=no"
|
|
5300 done
|
|
5301 fi dnl with_tty
|
|
5302
|
|
5303 dnl Database support
|
|
5304 dnl We do not necessarily have to have libdb/lib(g)dbm for DB/(G)DBM support.
|
|
5305 dnl On FreeBSD, both DB and DBM are part of libc.
|
|
5306 dnl By default, we check for DBM support in libgdbm, then libc, then libdbm.
|
|
5307
|
|
5308 test "$enable_database_gdbm $enable_database_dbm $enable_database_berkdb" \
|
3312
|
5309 != "no no no" && AC_MSG_CHECKING([for database support]) && \
|
|
5310 AC_MSG_RESULT()
|
2651
|
5311
|
|
5312 dnl Check for ndbm.h, required for either kind of DBM support.
|
|
5313 if test "$enable_database_gdbm $enable_database_dbm" != "no no"; then
|
|
5314 AC_CHECK_HEADER(ndbm.h, [:], [
|
|
5315 test "$enable_database_gdbm" = "yes" -o \
|
|
5316 "$enable_database_dbm" = "yes" && \
|
|
5317 XE_DIE("Required DBM support cannot be provided.")
|
|
5318 enable_database_gdbm=no enable_database_dbm=no])
|
|
5319 fi
|
|
5320
|
|
5321 dnl Check for DBM support in libgdbm.
|
|
5322 if test "$enable_database_gdbm" != "no"; then
|
|
5323 AC_CHECK_LIB(gdbm, dbm_open, [
|
|
5324 enable_database_gdbm=yes enable_database_dbm=no libdbm=-lgdbm], [
|
|
5325 if test "$enable_database_gdbm" = "yes"; then
|
|
5326 XE_DIE("Required GNU DBM support cannot be provided.")
|
|
5327 fi
|
|
5328 enable_database_gdbm=no])
|
|
5329 fi
|
|
5330
|
|
5331 dnl Check for DBM support in libc and libdbm.
|
|
5332 if test "$enable_database_dbm" != "no"; then
|
|
5333 AC_CHECK_FUNC(dbm_open, [enable_database_dbm=yes libdbm=], [
|
|
5334 AC_CHECK_LIB(dbm, dbm_open, [enable_database_dbm=yes libdbm=-ldbm], [
|
|
5335 test "$enable_database_dbm" = "yes" && \
|
|
5336 XE_DIE("Required DBM support cannot be provided.")
|
|
5337 enable_database_dbm=no])])
|
|
5338 fi
|
|
5339
|
|
5340 dnl Tell make about the DBM support we detected.
|
|
5341 test -n "$libdbm" && XE_PREPEND("$libdbm", LIBS)
|
|
5342 test "$enable_database_gdbm" = "yes" -o \
|
|
5343 "$enable_database_dbm" = "yes" && \
|
|
5344 AC_DEFINE(HAVE_DBM)
|
|
5345
|
|
5346 dnl Check for Berkeley DB.
|
|
5347 if test "$enable_database_berkdb" != "no"; then
|
|
5348 AC_MSG_CHECKING(for Berkeley db.h)
|
|
5349 for header in "db/db.h" "db.h"; do
|
3312
|
5350 AC_COMPILE_IFELSE([AC_LANG_SOURCE([
|
2651
|
5351 #include <stdlib.h>
|
|
5352 #if !(defined __GLIBC__ && __GLIBC_MINOR__ >= 1)
|
|
5353 #ifdef HAVE_INTTYPES_H
|
|
5354 #define __BIT_TYPES_DEFINED__
|
|
5355 #include <inttypes.h>
|
|
5356 typedef uint8_t u_int8_t;
|
|
5357 typedef uint16_t u_int16_t;
|
|
5358 typedef uint32_t u_int32_t;
|
|
5359 #ifdef WE_DONT_NEED_QUADS
|
|
5360 typedef uint64_t u_int64_t;
|
|
5361 #endif
|
|
5362 #endif
|
|
5363 #endif
|
|
5364 #include <$header>
|
3312
|
5365 ])], db_h_file="$header"; break)
|
2651
|
5366 done
|
|
5367 if test -z "$db_h_file"
|
|
5368 then AC_MSG_RESULT(no); enable_database_berkdb=no
|
|
5369 else AC_MSG_RESULT($db_h_file)
|
|
5370 fi
|
|
5371
|
|
5372 if test "$enable_database_berkdb" != "no"; then
|
|
5373 AC_MSG_CHECKING(for Berkeley DB version)
|
|
5374 AC_EGREP_CPP(yes,
|
|
5375 [#include <$db_h_file>
|
|
5376 #if DB_VERSION_MAJOR > 1
|
|
5377 yes
|
|
5378 #endif
|
|
5379 ], [AC_EGREP_CPP(yes,
|
|
5380 [#include <$db_h_file>
|
|
5381 #if DB_VERSION_MAJOR > 2
|
|
5382 yes
|
|
5383 #endif
|
|
5384 ], [AC_EGREP_CPP(yes,
|
|
5385 [#include <$db_h_file>
|
|
5386 #if DB_VERSION_MAJOR > 3
|
|
5387 yes
|
|
5388 #endif
|
|
5389 ], [AC_MSG_RESULT(4); dbfunc=db_create; dbver=4],[
|
|
5390 AC_MSG_RESULT(3); dbfunc=db_create; dbver=3])],[
|
|
5391 AC_MSG_RESULT(2); dbfunc=db_open; dbver=2])],[
|
|
5392 AC_MSG_RESULT(1); dbfunc=dbopen; dbver=1])
|
|
5393 AC_CHECK_FUNC($dbfunc, enable_database_berkdb=yes need_libdb=no, [
|
|
5394 AC_CHECK_LIB(db, $dbfunc, enable_database_berkdb=yes need_libdb=yes)])
|
|
5395 fi
|
|
5396
|
|
5397 dnl Berk db 4.1 decorates public functions with version information
|
|
5398 if test "$enable_database_berkdb" != "yes" -a "$dbver" = "4"; then
|
|
5399 rm -f $tempcname
|
|
5400 echo "#include <$db_h_file>" > $tempcname
|
|
5401 echo "configure___ dbfunc=db_create" >> $tempcname
|
|
5402 define(TAB, [ ])dnl
|
|
5403 eval `$CPP -Isrc $tempcname \
|
|
5404 | sed -n -e "s/[[ TAB]]*=[[ TAB\"]]*/='/" -e "s/[[ TAB\"]]*\$/'/" -e "s/^configure___//p"`
|
|
5405 rm -f $tempcname
|
|
5406 AC_MSG_WARN("db_create is really $dbfunc")
|
|
5407 AC_CHECK_LIB(db, $dbfunc, enable_database_berkdb=yes need_libdb=yes)
|
|
5408 fi
|
|
5409
|
|
5410 if test "$enable_database_berkdb" = "yes"; then
|
|
5411 AC_DEFINE_UNQUOTED(DB_H_FILE, "$db_h_file")
|
|
5412 AC_DEFINE(HAVE_BERKELEY_DB)
|
|
5413 test "$need_libdb" = "yes" && XE_PREPEND(-ldb, LIBS)
|
|
5414 else enable_database_berkdb=no
|
|
5415 fi
|
|
5416 fi
|
|
5417
|
|
5418 if test "$enable_database_gdbm $enable_database_dbm $enable_database_berkdb" \
|
|
5419 != "no no no"; then
|
|
5420 AC_DEFINE(HAVE_DATABASE)
|
|
5421 fi
|
|
5422
|
|
5423 dnl Socks support
|
|
5424 if test "$with_socks" = "yes"; then
|
|
5425 AC_CHECK_LIB(socks, SOCKSinit)
|
|
5426 test -n "$ac_cv_lib_socks_SOCKSinit" && AC_DEFINE(HAVE_SOCKS)
|
|
5427 fi
|
|
5428
|
|
5429 dnl Usage tracking (undocumented and likely unused option)
|
|
5430 if test "$usage_tracking" = "yes"; then
|
|
5431 AC_DEFINE(USAGE_TRACKING)
|
|
5432 XE_PREPEND(-Bstatic -lut -Bdynamic, LIBS)
|
|
5433 fi
|
|
5434
|
|
5435 dnl Enhanced number support
|
|
5436 if test "$enable_bignum" = "gmp"; then
|
|
5437 AC_CHECK_HEADER(gmp.h, [
|
|
5438 AC_CHECK_LIB(gmp, __gmpz_init, have_mpz_init=yes)])
|
|
5439 if test "$have_mpz_init" = "yes"; then
|
|
5440 AC_DEFINE(WITH_NUMBER_TYPES)
|
|
5441 AC_DEFINE(WITH_GMP)
|
|
5442 XE_PREPEND(-lgmp, LIBS)
|
|
5443 else
|
|
5444 XE_DIE("Required GMP numeric support cannot be provided.")
|
|
5445 fi
|
|
5446 elif test "$enable_bignum" = "mp"; then
|
|
5447 for library in "" "-lcrypto"; do
|
|
5448 AC_CHECK_HEADER(mp.h, [
|
|
5449 AC_CHECK_LIB(mp, mp_mfree, have_mp_mfree=yes; break, [
|
|
5450 AC_CHECK_LIB(mp, mfree, have_mfree=yes; break, , $library)],
|
|
5451 $library)])
|
|
5452 done
|
|
5453 if test "$have_mp_mfree" = "yes"; then
|
|
5454 AC_DEFINE(MP_PREFIX)
|
|
5455 XE_APPEND(-lmp, LIBS)
|
|
5456 if test "$library" != ""; then
|
|
5457 XE_APPEND($library, LIBS)
|
|
5458 fi
|
|
5459 AC_CHECK_FUNC(mp_move, [AC_DEFINE(HAVE_MP_MOVE)])
|
|
5460 elif test "$have_mfree" = "yes"; then
|
|
5461 XE_APPEND(-lmp, LIBS)
|
|
5462 if test "$library" != ""; then
|
|
5463 XE_APPEND($library, LIBS)
|
|
5464 fi
|
|
5465 AC_CHECK_FUNC(move, [AC_DEFINE(HAVE_MP_MOVE)])
|
|
5466 else
|
|
5467 XE_DIE("Required MP numeric support cannot be provided.")
|
|
5468 fi
|
|
5469 AC_DEFINE(WITH_NUMBER_TYPES)
|
|
5470 AC_DEFINE(WITH_MP)
|
|
5471 fi
|
|
5472
|
|
5473 dnl Unfortunately, just because we can link doesn't mean we can run.
|
|
5474 dnl One of the above link tests may have succeeded but caused resulting
|
|
5475 dnl executables to fail to run. Also any tests using AC_RUN_IFELSE will
|
|
5476 dnl have reported incorrect results.
|
|
5477 AC_RUN_IFELSE([AC_LANG_SOURCE([int main(int c,char *v[]){return 0;}])],[:],[
|
|
5478 echo ""
|
|
5479 echo "*** PANIC *** The C compiler can no longer build working executables."
|
|
5480 echo "*** PANIC *** Please examine the tail of config.log for runtime errors."
|
|
5481 echo "*** PANIC *** The most likely reason for this problem is that configure"
|
|
5482 echo "*** PANIC *** links with shared libraries, but those libraries cannot be"
|
|
5483 echo "*** PANIC *** found at run time."
|
|
5484 echo "*** PANIC ***"
|
|
5485 echo "*** PANIC *** On a Linux system, edit /etc/ld.so.conf and re-run ldconfig."
|
|
5486 echo "*** PANIC *** On other systems, try telling configure where to find the"
|
|
5487 echo "*** PANIC *** shared libraries using the --with-site-runtime-libraries option"
|
|
5488 echo "*** PANIC ***"
|
|
5489 echo "*** PANIC *** Another way to shoot yourself in the foot is to specify"
|
|
5490 echo "*** PANIC *** --with-FEATURE when FEATURE is not actually installed"
|
|
5491 echo "*** PANIC *** on your system. Don't do that."
|
|
5492 exit 1])
|
|
5493
|
|
5494 dnl Process support
|
|
5495 if test "$win32_processes" != "yes"; then
|
|
5496 AC_DEFINE(HAVE_UNIX_PROCESSES)
|
|
5497 fi
|
|
5498
|
|
5499 dnl --------------------------------
|
|
5500 dnl Compute SUBST-itutable variables
|
|
5501 dnl --------------------------------
|
|
5502
|
|
5503 dnl We ignore (C|LD)_SWITCH_X_(MACHINE|SYSTEM)
|
|
5504 dnl Use XE_SPACE instead of plain assignment statements to remove extraneous blanks
|
|
5505 if test "$enable_modules" = "yes"; then
|
|
5506 ld_libs_module=
|
|
5507 else
|
2973
|
5508 XE_SPACE(ld_libs_module, $ldap_libs $postgresql_libs $canna_libs)
|
2651
|
5509 fi
|
|
5510
|
|
5511 XE_SPACE(CFLAGS, $CFLAGS)
|
|
5512 XE_SPACE(extra_objs, $extra_objs)
|
|
5513 XE_SPACE(c_switch_general, -DHAVE_CONFIG_H $c_switch_site $c_switch_machine $c_switch_system)
|
|
5514 XE_SPACE(c_switch_window_system, $c_switch_x_site $c_switch_gtk $X_CFLAGS)
|
|
5515 XE_SPACE(c_switch_all, $c_switch_general $c_switch_window_system)
|
|
5516 XE_SPACE(ld_switch_general, $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_run)
|
|
5517 XE_SPACE(ld_switch_window_system, $ld_switch_x_site)
|
|
5518 XE_SPACE(ld_switch_all, $ld_switch_general $ld_switch_window_system)
|
|
5519 XE_SPACE(ld_libs_general, $LIBS $libs_machine $libs_system $libs_standard)
|
|
5520 XE_SPACE(ld_libs_window_system, $X_EXTRA_LIBS $libs_x $libs_gtk $X_PRE_LIBS)
|
|
5521 XE_SPACE(ld_libs_all, $ld_libs_window_system $ld_libs_general $ld_libs_module)
|
|
5522
|
|
5523 dnl For no-module builds, make the src dir last
|
|
5524 if test "$enable_modules" = "no"; then
|
|
5525 XE_APPEND(src, MAKE_SUBDIR)
|
|
5526 fi
|
|
5527
|
|
5528 dnl Compute lists of Makefiles and subdirs
|
|
5529 AC_SUBST(SRC_SUBDIR_DEPS)
|
|
5530 internal_makefile_list="Makefile.in"
|
|
5531 SUBDIR_MAKEFILES=''
|
|
5532 test -d lock || mkdir lock
|
|
5533 for dir in $MAKE_SUBDIR; do
|
|
5534 case "$dir" in */* ) dnl Implement mkdir -p
|
|
5535 ( for d in `echo $dir | sed 's:/: :g'` ; do
|
|
5536 test -d "$d" || mkdir "$d"; cd "$d"
|
|
5537 done ) ;;
|
|
5538 * ) test -d "$dir" || mkdir "$dir" ;;
|
|
5539 esac
|
|
5540 XE_SPACE(SUBDIR_MAKEFILES, $SUBDIR_MAKEFILES $dir/Makefile $dir/GNUmakefile)
|
|
5541 XE_SPACE(internal_makefile_list, $internal_makefile_list $dir/Makefile.in)
|
|
5542 done
|
|
5543 AC_SUBST(INSTALL_ARCH_DEP_SUBDIR)
|
|
5544 AC_SUBST(MAKE_SUBDIR)
|
|
5545 AC_SUBST(SUBDIR_MAKEFILES)
|
|
5546
|
|
5547 dnl Make s&m symlinks in the src directory, for config.h.
|
|
5548 for dir in src/s src/m; do
|
|
5549 if test ! -d "$dir" ; then
|
|
5550 echo Making symbolic link to "$srcdir/$dir"
|
|
5551 ${LN_S} "$srcdir/$dir" "$dir"
|
|
5552 fi
|
|
5553 done
|
|
5554
|
|
5555 dnl Also make modules/common link if needed for the module Makefiles.
|
|
5556 if test "$need_modules_common" = "yes"; then
|
|
5557 for dir in modules/common; do
|
|
5558 if test ! -d "$dir" ; then
|
|
5559 echo Making symbolic link to "$srcdir/$dir"
|
|
5560 ${LN_S} "$srcdir/$dir" "$dir"
|
|
5561 fi
|
|
5562 done
|
|
5563 fi
|
|
5564
|
|
5565 if test "$verbose" = "yes"; then
|
|
5566 echo ""
|
|
5567 PRINT_VAR(extra_objs
|
|
5568 c_switch_general c_switch_window_system c_switch_all
|
|
5569 ld_switch_general ld_switch_window_system ld_switch_all
|
|
5570 ld_libs_general ld_libs_window_system ld_libs_all)
|
|
5571 echo ""
|
|
5572 fi
|
|
5573
|
|
5574 dnl ----------------------------------------------
|
|
5575 dnl Create some auxiliary files for developers.
|
|
5576 dnl ----------------------------------------------
|
|
5577
|
3418
|
5578 dnl Unlike TAGS, debugger init files depend on config.h.
|
|
5579 dnl Regenerate them locally on every configure.
|
2651
|
5580 dnl Create a .gdbinit useful for debugging XEmacs
|
3418
|
5581 if test -f "$srcdir/etc/gdbinit.in"; then
|
3092
|
5582 test "$verbose" = "yes" && echo "creating src/.gdbinit.in"
|
3418
|
5583 cp $srcdir/etc/gdbinit.in src/.gdbinit.in
|
2651
|
5584 fi
|
|
5585
|
|
5586 dnl Create a .dbxrc useful for debugging XEmacs
|
3418
|
5587 if test -f "$srcdir/etc/dbxrc.in"; then
|
3092
|
5588 test "$verbose" = "yes" && echo "creating src/.dbxrc.in"
|
3418
|
5589 echo ". $srcdir/etc/dbxrc.in" > "src/.dbxrc.in"
|
2651
|
5590 fi
|
|
5591
|
|
5592 dnl Create a useful TAGS file
|
|
5593 if test -f "$srcdir/TAGS" -a ! -f "TAGS"; then
|
|
5594 test "$verbose" = "yes" && echo "creating TAGS"
|
|
5595 echo "
|
|
5596 $srcdir/TAGS,include" > "TAGS"
|
|
5597 fi
|
|
5598
|
|
5599 dnl Create top level .sbinit for Sun compilers
|
|
5600 if test "$__SUNPRO_C" = "yes"; then
|
|
5601 test "$verbose" = "yes" && echo "creating .sbinit"
|
|
5602 ( echo "# For use with Sun WorkShop's Source browser."
|
|
5603 echo "# See sbquery(1) and sbinit(4) for more information"
|
|
5604 for dir in $MAKE_SUBDIR; do echo "import $dir"; done
|
|
5605 ) > .sbinit
|
|
5606 fi
|
|
5607
|
|
5608 dnl There are no more compile tests; remove the core they created.
|
|
5609 rm -f core
|
|
5610
|
|
5611 dnl ----------------------------------------------
|
|
5612 dnl Substitute into Makefile, config.h and paths.h
|
|
5613 dnl ----------------------------------------------
|
|
5614
|
|
5615 dnl what sort of things to edit into Makefile, config.h and paths.h
|
|
5616 dnl configuration here uncanonicalized to avoid exceeding size limits.
|
|
5617
|
|
5618 AC_SUBST(PROGNAME)
|
|
5619 AC_SUBST(version)
|
|
5620 AC_SUBST(inststaticdir)
|
|
5621 AC_SUBST(instvardir)
|
|
5622 AC_SUBST(srcdir)
|
|
5623 AC_SUBST(bindir)
|
|
5624 AC_SUBST(datadir)
|
|
5625 AC_SUBST(statedir)
|
|
5626 AC_SUBST(libdir)
|
|
5627 AC_SUBST(mandir)
|
|
5628 AC_SUBST(extra_includes)
|
|
5629
|
|
5630 AC_SUBST(prefix)
|
|
5631 AC_SUBST(PREFIX_USER_DEFINED)
|
|
5632 dnl Yo, Stephen Bourne! I want to marry you!
|
|
5633 PREFIX=$prefix
|
|
5634 while true; do
|
|
5635 case "$PREFIX" in
|
|
5636 *\$* ) eval "PREFIX=$PREFIX" ;;
|
|
5637 *) break ;;
|
|
5638 esac
|
|
5639 done
|
|
5640 AC_SUBST(PREFIX)
|
|
5641
|
|
5642 AC_SUBST(exec_prefix)
|
|
5643 AC_SUBST(EXEC_PREFIX_USER_DEFINED)
|
|
5644 EXEC_PREFIX=$exec_prefix
|
|
5645 while true; do
|
|
5646 case "$EXEC_PREFIX" in
|
|
5647 *\$* ) eval "EXEC_PREFIX=$EXEC_PREFIX" ;;
|
|
5648 *) break ;;
|
|
5649 esac
|
|
5650 done
|
|
5651 AC_SUBST(EXEC_PREFIX)
|
|
5652
|
|
5653 AC_SUBST(infodir)
|
|
5654 AC_SUBST(INFODIR_USER_DEFINED)
|
|
5655 INFODIR=$infodir
|
|
5656 while true; do
|
|
5657 case "$INFODIR" in
|
|
5658 *\$* ) eval "INFODIR=$INFODIR" ;;
|
|
5659 *) break ;;
|
|
5660 esac
|
|
5661 done
|
|
5662 AC_SUBST(INFODIR)
|
|
5663
|
|
5664 AC_SUBST(infopath,$with_infopath)
|
|
5665 AC_SUBST(INFOPATH_USER_DEFINED)
|
|
5666 INFOPATH=$with_infopath
|
|
5667 while true; do
|
|
5668 case "$INFOPATH" in
|
|
5669 *\$* ) eval "INFOPATH=$INFOPATH" ;;
|
|
5670 *) break ;;
|
|
5671 esac
|
|
5672 done
|
|
5673 AC_SUBST(INFOPATH)
|
|
5674
|
3179
|
5675 test -n "$with_user_packages" && with_early_packages=$with_user_packages
|
|
5676 AC_SUBST(early_packages,$with_early_packages)
|
|
5677 AC_SUBST(EARLY_PACKAGE_DIRECTORIES_USER_DEFINED)
|
|
5678 EARLY_PACKAGE_DIRECTORIES=$with_early_packages
|
|
5679 while true; do
|
|
5680 case "$EARLY_PACKAGE_DIRECTORIES" in
|
|
5681 *\$* ) eval "EARLY_PACKAGE_DIRECTORIES=$EARLY_PACKAGE_DIRECTORIES" ;;
|
|
5682 *) break ;;
|
|
5683 esac
|
|
5684 done
|
|
5685 AC_SUBST(EARLY_PACKAGE_DIRECTORIES)
|
|
5686
|
|
5687 test -n "$with_system_packages" && with_late_packages=$with_system_packages
|
|
5688 AC_SUBST(late_packages,$with_late_packages)
|
|
5689 AC_SUBST(LATE_PACKAGE_DIRECTORIES_USER_DEFINED)
|
|
5690 LATE_PACKAGE_DIRECTORIES=$with_late_packages
|
|
5691 while true; do
|
|
5692 case "$LATE_PACKAGE_DIRECTORIES" in
|
|
5693 *\$* ) eval "LATE_PACKAGE_DIRECTORIES=$LATE_PACKAGE_DIRECTORIES" ;;
|
|
5694 *) break ;;
|
|
5695 esac
|
|
5696 done
|
|
5697 AC_SUBST(LATE_PACKAGE_DIRECTORIES)
|
|
5698
|
|
5699 test -n "$with_legacy_packages" && with_last_packages=$with_legacy_packages
|
|
5700 AC_SUBST(last_packages,$with_last_packages)
|
|
5701 AC_SUBST(LAST_PACKAGE_DIRECTORIES_USER_DEFINED)
|
|
5702 LAST_PACKAGE_DIRECTORIES=$with_last_packages
|
|
5703 while true; do
|
|
5704 case "$LAST_PACKAGE_DIRECTORIES" in
|
|
5705 *\$* ) eval "LAST_PACKAGE_DIRECTORIES=$LAST_PACKAGE_DIRECTORIES" ;;
|
|
5706 *) break ;;
|
|
5707 esac
|
|
5708 done
|
|
5709 AC_SUBST(LAST_PACKAGE_DIRECTORIES)
|
2651
|
5710
|
|
5711 AC_SUBST(package_path,$with_package_path)
|
|
5712 AC_SUBST(PACKAGE_PATH_USER_DEFINED)
|
|
5713 PACKAGE_PATH=$with_package_path
|
|
5714 while true; do
|
|
5715 case "$PACKAGE_PATH" in
|
|
5716 *\$* ) eval "PACKAGE_PATH=$PACKAGE_PATH" ;;
|
|
5717 *) break ;;
|
|
5718 esac
|
|
5719 done
|
|
5720 AC_SUBST(PACKAGE_PATH)
|
|
5721
|
|
5722 AC_SUBST(lispdir, $with_lispdir)
|
|
5723 AC_SUBST(LISPDIR_USER_DEFINED)
|
|
5724 LISPDIR=$with_lispdir
|
|
5725 while true; do
|
|
5726 case "$LISPDIR" in
|
|
5727 *\$* ) eval "LISPDIR=$LISPDIR" ;;
|
|
5728 *) break ;;
|
|
5729 esac
|
|
5730 done
|
|
5731 AC_SUBST(LISPDIR)
|
|
5732
|
|
5733 AC_SUBST(moduledir,$with_moduledir)
|
|
5734 AC_SUBST(MODULEDIR_USER_DEFINED)
|
|
5735 MODULEDIR=$with_moduledir
|
|
5736 while true; do
|
|
5737 case "$MODULEDIR" in
|
|
5738 *\$* ) eval "MODULEDIR=$MODULEDIR" ;;
|
|
5739 *) break ;;
|
|
5740 esac
|
|
5741 done
|
|
5742 AC_SUBST(MODULEDIR)
|
|
5743
|
|
5744 AC_SUBST(sitelispdir,$with_sitelispdir)
|
|
5745 AC_SUBST(SITELISPDIR_USER_DEFINED)
|
|
5746 SITELISPDIR=$sitelispdir
|
|
5747 while true; do
|
|
5748 case "$SITELISPDIR" in
|
|
5749 *\$* ) eval "SITELISPDIR=$SITELISPDIR" ;;
|
|
5750 *) break ;;
|
|
5751 esac
|
|
5752 done
|
|
5753 AC_SUBST(SITELISPDIR)
|
|
5754
|
|
5755 AC_SUBST(sitemoduledir)
|
|
5756 AC_SUBST(SITEMODULEDIR_USER_DEFINED)
|
|
5757 SITEMODULEDIR=$sitemoduledir
|
|
5758 while true; do
|
|
5759 case "$SITEMODULEDIR" in
|
|
5760 *\$* ) eval "SITEMODULEDIR=$SITEMODULEDIR" ;;
|
|
5761 *) break ;;
|
|
5762 esac
|
|
5763 done
|
|
5764 AC_SUBST(SITEMODULEDIR)
|
|
5765
|
|
5766 AC_SUBST(etcdir,$with_etcdir)
|
|
5767 AC_SUBST(ETCDIR_USER_DEFINED)
|
|
5768 ETCDIR=$with_etcdir
|
|
5769 while true; do
|
|
5770 case "$ETCDIR" in
|
|
5771 *\$* ) eval "ETCDIR=$ETCDIR" ;;
|
|
5772 *) break ;;
|
|
5773 esac
|
|
5774 done
|
|
5775 AC_SUBST(ETCDIR)
|
|
5776
|
|
5777 AC_SUBST(archlibdir,$with_archlibdir)
|
|
5778 AC_SUBST(ARCHLIBDIR_USER_DEFINED)
|
|
5779 ARCHLIBDIR=$with_archlibdir
|
|
5780 while true; do
|
|
5781 case "$ARCHLIBDIR" in
|
|
5782 *\$* ) eval "ARCHLIBDIR=$ARCHLIBDIR" ;;
|
|
5783 *) break ;;
|
|
5784 esac
|
|
5785 done
|
|
5786 AC_SUBST(ARCHLIBDIR)
|
|
5787
|
|
5788 AC_SUBST(docdir,$with_docdir)
|
|
5789 AC_SUBST(DOCDIR_USER_DEFINED)
|
|
5790 DOCDIR=$with_docdir
|
|
5791 while true; do
|
|
5792 case "$DOCDIR" in
|
|
5793 *\$* ) eval "DOCDIR=$DOCDIR" ;;
|
|
5794 *) break ;;
|
|
5795 esac
|
|
5796 done
|
|
5797 AC_SUBST(DOCDIR)
|
|
5798
|
|
5799 AC_SUBST(docdir)
|
|
5800 AC_SUBST(bitmapdir)
|
|
5801 AC_SUBST(extra_objs)
|
|
5802
|
|
5803 dnl The following flags combine all the information from:
|
|
5804 dnl - command line options (user always gets priority)
|
|
5805 dnl - user environment variables
|
|
5806 dnl - determined by configure
|
|
5807 dnl - the s&m header files (required for ellcc)
|
|
5808 AC_SUBST(machfile)
|
|
5809 AC_SUBST(opsysfile)
|
|
5810 AC_SUBST(c_switch_general)
|
|
5811 AC_SUBST(c_switch_window_system)
|
|
5812 AC_SUBST(c_switch_all)
|
|
5813 AC_SUBST(ld_switch_general)
|
|
5814 AC_SUBST(ld_switch_window_system)
|
|
5815 AC_SUBST(ld_switch_all)
|
|
5816 AC_SUBST(ld_libs_general)
|
|
5817 AC_SUBST(ld_libs_window_system)
|
|
5818 AC_SUBST(ld_libs_all)
|
|
5819 AC_SUBST(CFLAGS)
|
|
5820 AC_SUBST(CPPFLAGS)
|
|
5821 AC_SUBST(LDFLAGS)
|
|
5822 RECURSIVE_MAKE_ARGS="\$(MFLAGS) CC='\$(CC)' CFLAGS='\$(CFLAGS)' LDFLAGS='\$(LDFLAGS)' CPPFLAGS='\$(CPPFLAGS)'"
|
|
5823 AC_SUBST(RECURSIVE_MAKE_ARGS)
|
|
5824
|
|
5825 AC_SUBST(native_sound_lib,$with_native_sound_lib)
|
|
5826 AC_SUBST(sound_cflags)
|
|
5827 AC_SUBST(RANLIB)
|
|
5828 AC_SUBST(dynodump_arch)
|
|
5829
|
|
5830 AC_SUBST(XEMACS_CC)
|
|
5831 AC_SUBST(XE_CFLAGS)
|
|
5832
|
|
5833 dnl The default is yes
|
|
5834 if test "$with_prefix" = "yes"; then
|
|
5835 AC_DEFINE(PREFIX_USER_DEFINED)
|
|
5836 fi
|
|
5837
|
|
5838 dnl The default is no
|
|
5839 if test "$with_site_lisp" = "no"; then
|
|
5840 AC_DEFINE(INHIBIT_SITE_LISP)
|
|
5841 fi
|
|
5842 dnl The default is yes
|
|
5843 if test "$with_site_modules" = "no"; then
|
|
5844 AC_DEFINE(INHIBIT_SITE_MODULES)
|
|
5845 fi
|
|
5846
|
|
5847 XE_SPACE(ac_configure_args, $ac_configure_args)
|
|
5848 AC_DEFINE_UNQUOTED(EMACS_CONFIGURATION, "$ac_cv_build")
|
|
5849 AC_DEFINE_UNQUOTED(EMACS_CONFIG_OPTIONS, "$ac_configure_args")
|
|
5850
|
|
5851 dnl Following are deprecated
|
|
5852
|
|
5853 null_string=""
|
|
5854 AC_DEFINE_UNQUOTED(LD_SWITCH_X_SITE, $null_string)
|
|
5855 AC_DEFINE_UNQUOTED(LD_SWITCH_X_SITE_AUX, $null_string)
|
|
5856 AC_DEFINE_UNQUOTED(C_SWITCH_X_SITE, $null_string)
|
|
5857 AC_DEFINE_UNQUOTED(LD_SWITCH_SITE, $null_string)
|
|
5858 AC_DEFINE_UNQUOTED(C_SWITCH_SITE, $null_string)
|
|
5859
|
|
5860 dnl Note: as a general rule, *only* define things here that are not
|
|
5861 dnl autodetected. For things that are autodetected, define them
|
|
5862 dnl at the point where the autodetection occurs or would occur,
|
|
5863 dnl so that the user gets immediate feedback on the results of the
|
|
5864 dnl autodetection.
|
|
5865
|
|
5866 if test "$GNU_MALLOC" = "yes"; then AC_DEFINE(GNU_MALLOC)
|
|
5867 elif test "$with_system_malloc" = "yes"; then AC_DEFINE(USE_SYSTEM_MALLOC)
|
|
5868 elif test "$with_debug_malloc" = "yes"; then AC_DEFINE(USE_DEBUG_MALLOC)
|
|
5869 AC_DEFINE(USE_SYSTEM_MALLOC)
|
|
5870 fi
|
|
5871 test "$GCC" = "yes" && AC_DEFINE(USE_GCC)
|
|
5872 test "$enable_external_widget" = "yes" && AC_DEFINE(EXTERNAL_WIDGET)
|
|
5873 test "$enable_kkcc" = "yes" && AC_DEFINE(USE_KKCC)
|
3092
|
5874 test "$enable_newgc" = "yes" && AC_DEFINE(NEW_GC)
|
|
5875 test "$have_vdb_posix" = "yes" && AC_DEFINE(VDB_POSIX)
|
|
5876 test "$have_vdb_fake" = "yes" && AC_DEFINE(VDB_FAKE)
|
2651
|
5877 test "$enable_quick_build" = "yes" && AC_DEFINE(QUICK_BUILD)
|
|
5878 test "$with_purify" = "yes" && AC_DEFINE(PURIFY)
|
|
5879 test "$with_quantify" = "yes" && AC_DEFINE(QUANTIFY)
|
|
5880 test "$with_pop" = "yes" && AC_DEFINE(MAIL_USE_POP)
|
|
5881 test "$with_kerberos" = "yes" && AC_DEFINE(KERBEROS)
|
|
5882 test "$with_hesiod" = "yes" && AC_DEFINE(HESIOD)
|
|
5883 test "$enable_union_type" = "yes" && AC_DEFINE(USE_UNION_TYPE)
|
|
5884 test "$enable_pdump" = "yes" && AC_DEFINE(PDUMP)
|
2720
|
5885 test "$enable_dump_in_exec" = "yes" && AC_DEFINE(DUMP_IN_EXEC)
|
2651
|
5886 test "$with_ipv6_cname" = "yes" && AC_DEFINE(IPV6_CANONICALIZE)
|
|
5887
|
|
5888
|
|
5889
|
|
5890 dnl -------------------------------------------------------------------------
|
|
5891 dnl -------------------------------
|
|
5892 dnl Report on what we decided to do
|
|
5893 dnl -------------------------------
|
|
5894
|
|
5895 dnl #### We should tag this as the _build_ environment.
|
|
5896 dnl Before doing that, though, must check if tools care about line 1.
|
|
5897
|
|
5898 (
|
|
5899 dnl /etc/osversion is on SONY NEWS-OS
|
|
5900 if test -f /etc/osversion; then dnl SONY NEWS-OS
|
|
5901 echo "osversion: `cat /etc/osversion`"
|
|
5902 else
|
|
5903 echo "uname -a: `uname -a`"
|
|
5904 fi
|
|
5905 echo ""
|
|
5906 echo "$progname $ac_configure_args"
|
|
5907 ) > Installation
|
|
5908
|
|
5909 if test ! -z ${emacs_beta_version} ; then
|
|
5910 if test -z "${emacs_is_beta}" ; then
|
|
5911 xemacs_betaname=".${emacs_beta_version}"
|
|
5912 else
|
|
5913 xemacs_betaname="-b${emacs_beta_version}"
|
|
5914 fi
|
|
5915 else
|
|
5916 xemacs_betaname=""
|
|
5917 fi
|
|
5918
|
|
5919 dnl Start stdout redirection to '| tee -a Installation'
|
|
5920 (
|
|
5921 echo "
|
|
5922
|
2938
|
5923 XEmacs ${emacs_major_version}.${emacs_minor_version}${xemacs_betaname} \"$xemacs_codename\" $xemacs_extra_name configured for \`$ac_cv_build'."
|
2651
|
5924
|
|
5925 echo "
|
|
5926 Compilation Environment and Installation Defaults:"
|
|
5927 echo " Source code location: $srcdir"
|
|
5928 echo " Installation prefix: $prefix"
|
|
5929 if test -n "$with_site_includes"; then
|
|
5930 echo " Additional header files: $with_site_includes"
|
|
5931 fi
|
|
5932 if test -n "$with_site_libraries"; then
|
|
5933 echo " Additional libraries: $with_site_libraries"
|
|
5934 fi
|
|
5935 if test -n "$with_site_prefixes"; then
|
|
5936 echo " Additional prefixes: $with_site_prefixes"
|
|
5937 fi
|
|
5938 if test -n "$runpath"; then
|
|
5939 echo " Runtime library search path: $runpath"
|
|
5940 fi
|
|
5941
|
|
5942 if test -n "$opsysfile"
|
|
5943 then echo " Operating system description file: \`$opsysfile'"
|
|
5944 else echo " Not using any operating system description file"
|
|
5945 fi
|
|
5946 if test -n "$machfile"
|
|
5947 then echo " Machine description file: \`$machfile'"
|
|
5948 else echo " Not using any machine description file"
|
|
5949 fi
|
|
5950
|
|
5951 echo " Compiler version: $compiler_version"
|
|
5952 if test -n "$gcc_compiler_specs"; then
|
|
5953 echo " - GCC specs file: $gcc_compiler_specs"
|
|
5954 fi
|
|
5955 echo " - Compiler command: $XEMACS_CC $XE_CFLAGS"
|
|
5956 if test "$CC" != "$XEMACS_CC"; then
|
|
5957 echo " Compiler version for lib-src: (detection code unimplemented)"
|
|
5958 echo " - Compiler command for lib-src: $CC $CFLAGS"
|
|
5959 if test "$xemacs_cc_cc_mismatch" = "yes"; then
|
|
5960 echo " WARNING: CC and XEMACS_CC mismatched; check CFLAGS carefully."
|
|
5961 fi
|
|
5962 fi
|
|
5963 echo " libc version: $libc_version"
|
|
5964 echo " Relocating allocator for buffers: $with_rel_alloc"
|
|
5965 echo " GNU version of malloc: ${GNU_MALLOC}${GNU_MALLOC_reason}"
|
|
5966 case "$ld_switch_site" in
|
|
5967 *nocombreloc*) echo " Linking with \`-z nocombreloc'.
|
|
5968 - Consider configuring with --enable-pdump." ;;
|
|
5969 esac
|
|
5970
|
|
5971 echo "
|
|
5972 Window System:"
|
|
5973 if test "$with_msw" = "yes"; then
|
|
5974 echo " Compiling in support for the Microsoft window system."
|
|
5975 fi
|
|
5976 if test "$with_x11" = "yes"; then
|
|
5977 echo " Compiling in support for the X window system:"
|
|
5978 echo " - X Windows headers location: $x_includes"
|
|
5979 echo " - X Windows libraries location: $x_libraries"
|
|
5980 if test "$with_xauth" != yes; then
|
|
5981 echo " - Xau (X authority) not available."
|
|
5982 fi
|
|
5983 if test "$with_xmu" != yes; then
|
|
5984 echo " - Xmu library not available; substituting equivalent routines."
|
|
5985 fi
|
|
5986 if test "$with_wmcommand" != no; then
|
|
5987 echo " - Handling WM_COMMAND properly."
|
|
5988 fi
|
3354
|
5989 if test "$with_fontconfig" = "yes"; then
|
|
5990 echo " - Using fontconfig to manage fonts."
|
|
5991 fi
|
3166
|
5992 if test "$with_xft_emacs" = "yes"; then
|
3094
|
5993 echo " - Compiling in support for Xft antialiased fonts (EXPERIMENTAL)."
|
|
5994 fi
|
2651
|
5995 fi
|
3019
|
5996 if test "$need_motif" = "yes" ; then
|
|
5997 echo " Compiling in support for Motif."
|
|
5998 if test "$have_lesstif" = "yes"; then
|
|
5999 echo " - Using LessTif implementation."
|
|
6000 fi
|
|
6001 echo " *WARNING* Many versions of Motif are buggy, requiring workarounds."
|
|
6002 echo " You are likely to experience slow redisplay."
|
|
6003 echo " You may need to install vendor patches to Motif."
|
|
6004 echo " See PROBLEMS for more information."
|
|
6005 fi
|
2651
|
6006 if test "$need_athena" = "yes"; then
|
|
6007 echo " Compiling in support for the Athena widget set:"
|
|
6008 echo " - Athena headers location: $athena_h_path"
|
|
6009 echo " - Athena library to link: $athena_lib"
|
|
6010 fi
|
|
6011 case "$enable_menubars" in
|
|
6012 gtk ) echo " Using GTK menubars." ;;
|
|
6013 lucid ) echo " Using Lucid menubars." ;;
|
|
6014 motif ) echo " Using Motif menubars."
|
|
6015 echo " *WARNING* The Motif menubar implementation is currently buggy."
|
|
6016 echo " We recommend using the Lucid menubar instead."
|
|
6017 echo " Re-run configure with --enable-menubars='lucid'." ;;
|
|
6018 msw ) echo " Using MS-Windows menubars." ;;
|
|
6019 esac
|
3094
|
6020 if test "$with_xft_menubars" = "yes"; then
|
|
6021 echo " - Using Xft to render antialiased fonts in menubars."
|
|
6022 echo " WARNING: This feature will be replaced with a face."
|
|
6023 fi
|
2651
|
6024 case "$enable_scrollbars" in
|
|
6025 gtk ) echo " Using GTK scrollbars." ;;
|
|
6026 lucid ) echo " Using Lucid scrollbars." ;;
|
|
6027 motif ) echo " Using Motif scrollbars." ;;
|
|
6028 athena ) echo " Using Athena scrollbars." ;;
|
|
6029 msw ) echo " Using MS-Windows scrollbars." ;;
|
|
6030 esac
|
|
6031 case "$enable_dialogs" in
|
|
6032 gtk ) echo " Using GTK dialog boxes." ;;
|
|
6033 motif ) echo " Using Motif dialog boxes."
|
|
6034 if test "$unexec" = "unexaix.o"; then if test "`uname -v`" = 4 -a "`uname -r`" -ge 3; then
|
|
6035 echo " *WARNING* The Motif dialog boxes cause problems on AIX 4.3 and higher."
|
|
6036 echo " We recommend using the Athena dialog boxes instead."
|
|
6037 echo " Install libXaw and re-run configure with --enable-dialogs='athena'."
|
|
6038 echo " Read the PROBLEMS file for more information."
|
|
6039 fi; fi ;;
|
|
6040 athena ) echo " Using Athena dialog boxes." ;;
|
|
6041 msw ) echo " Using MS-Windows dialog boxes." ;;
|
|
6042 esac
|
|
6043 case "$enable_widgets" in
|
|
6044 gtk ) echo " Using GTK native widgets." ;;
|
|
6045 motif ) echo " Using Motif native widgets." ;;
|
|
6046 athena ) echo " Using Athena native widgets." ;;
|
|
6047 msw ) echo " Using MS-Windows native widgets." ;;
|
|
6048 esac
|
3094
|
6049 if test "$with_xft_tabs" = "yes"; then
|
|
6050 echo " - Using Xft to render antialiased fonts in tab controls."
|
|
6051 echo " WARNING: This feature will be replaced with a face."
|
|
6052 fi
|
|
6053 if test "$with_xft_gauge" = "yes"; then
|
|
6054 echo " - Using Xft to render antialiased fonts in progress bars."
|
|
6055 echo " WARNING: This feature will be replaced with a face."
|
|
6056 echo " WARNING: This feature not yet implemented; setting ignored."
|
|
6057 fi
|
2651
|
6058 if test "$with_dragndrop" = yes; then
|
|
6059 echo " Compiling in support for Drag'n'Drop (EXPERIMENTAL)."
|
|
6060 echo " - Drag'n'Drop prototype: $dragndrop_proto."
|
|
6061 fi
|
|
6062
|
|
6063 echo "
|
|
6064 TTY:"
|
|
6065 test "$with_ncurses" = yes && echo " Compiling in support for ncurses."
|
|
6066 test "$with_gpm" = yes && echo " Compiling in support for GPM (General Purpose Mouse)."
|
|
6067
|
|
6068 echo "
|
|
6069 Images:"
|
|
6070 test "$with_gif" = yes && echo " Compiling in support for GIF images (builtin)."
|
|
6071 if test "$with_xpm" = yes; then
|
|
6072 echo " Compiling in support for XPM images."
|
|
6073 elif test "$with_x11" = yes; then
|
|
6074 echo " WARNING: -----------------------------------------------------------"
|
|
6075 echo " WARNING: Compiling without XPM image support."
|
|
6076 if test "$xpm_problem" != ""; then
|
|
6077 echo " Reason: $xpm_problem"
|
|
6078 fi
|
|
6079 echo " WARNING: You should strongly consider installing XPM."
|
|
6080 echo " WARNING: Otherwise toolbars and other graphics will look suboptimal."
|
|
6081 echo " WARNING: (a copy may be found in ftp://ftp.xemacs.org/pub/xemacs/aux)"
|
|
6082 echo " WARNING: -----------------------------------------------------------"
|
|
6083 fi
|
|
6084 if test "$with_png" = yes; then
|
|
6085 echo " Compiling in support for PNG images."
|
|
6086 elif test "$window_system" != "none"; then
|
|
6087 echo " WARNING: -----------------------------------------------------------"
|
|
6088 echo " WARNING: Compiling without PNG image support."
|
|
6089 if test "$png_problem" != ""; then
|
|
6090 echo " Reason: $png_problem"
|
|
6091 fi
|
|
6092 echo " WARNING: You should strongly consider installing the PNG libraries."
|
|
6093 echo " WARNING: Otherwise certain images and glyphs may not display."
|
|
6094 echo " WARNING: (a copy may be found in ftp://ftp.xemacs.org/pub/xemacs/aux)"
|
|
6095 echo " WARNING: -----------------------------------------------------------"
|
|
6096 fi
|
|
6097 test "$with_jpeg" = yes && echo " Compiling in support for JPEG images."
|
|
6098 test "$with_tiff" = yes && echo " Compiling in support for TIFF images."
|
|
6099 test "$with_xface" = yes && echo " Compiling in support for X-Face message headers."
|
|
6100
|
|
6101 echo "
|
|
6102 Sound:"
|
|
6103 test "$enable_sound_native" = yes && echo " Compiling in support for sound (native)."
|
3308
|
6104 test "$enable_sound_alsa" = yes && echo " Compiling in support for ALSA (Advanced Linux Sound Architecture)."
|
2651
|
6105 test "$enable_sound_nas" = yes && echo " Compiling in support for NAS (network audio system)."
|
|
6106 test "$old_nas" = yes && echo " - NAS library lacks error trapping; will play synchronously."
|
|
6107 test "$enable_sound_esd" = yes && echo " Compiling in support for ESD (Enlightened Sound Daemon)."
|
|
6108
|
|
6109 echo "
|
|
6110 Databases:"
|
|
6111 test "$enable_database_berkdb" = yes && echo " Compiling in support for Berkeley database."
|
|
6112 test "$enable_database_dbm" = yes && echo " Compiling in support for DBM."
|
|
6113 test "$enable_database_gdbm" = yes && echo " Compiling in support for GNU DBM."
|
|
6114 test "$with_ldap" = yes && echo " Compiling in support for LDAP."
|
|
6115 if test "$with_postgresql" = yes; then
|
|
6116 echo " Compiling in support for PostgreSQL."
|
|
6117 echo " - Using PostgreSQL header file: $libpq_fe_h_file"
|
|
6118 test "$with_postgresqlv7" = yes && echo " - Using PostgreSQL V7 bindings."
|
|
6119 fi
|
|
6120
|
|
6121 echo "
|
|
6122 Internationalization:"
|
|
6123 test "$enable_mule" = yes && echo " Compiling in support for Mule (multi-lingual Emacs)."
|
|
6124 test "$with_xim" != no && echo " Compiling in support for XIM (X11R5+ I18N input method)."
|
|
6125 test "$with_xim" = motif && echo " - Using Motif to provide XIM support."
|
|
6126 test "$with_xim" = xlib && echo " - Using raw Xlib to provide XIM support."
|
|
6127 test "$with_xfs" = yes && echo " - Using XFontSet to provide bilingual menubar."
|
|
6128 test "$with_canna" = yes && echo " Compiling in support for Canna on Mule."
|
|
6129 if test "$with_wnn" = yes; then
|
|
6130 echo " Compiling in support for the WNN input method on Mule."
|
|
6131 test "$with_wnn6" = yes && echo " - Using WNN version 6."
|
|
6132 fi
|
|
6133
|
|
6134 echo "
|
|
6135 Mail:"
|
|
6136 test "$with_pop" = yes && echo " Compiling in support for POP mail retrieval."
|
|
6137 test "$with_kerberos" = yes && echo " Compiling in support for Kerberos POP authentication."
|
|
6138 test "$with_hesiod" = yes && echo " Compiling in support for Hesiod POP server access."
|
|
6139 test -n "$with_mail_locking" && echo " Compiling in support for \"$with_mail_locking\" mail spool file locking method."
|
|
6140
|
|
6141 echo "
|
|
6142 Other Features:"
|
|
6143 test "$with_ipv6_cname" = no && echo " Inhibiting IPv6 canonicalization at startup."
|
|
6144 test "$with_tooltalk" = yes && echo " Compiling in support for ToolTalk."
|
|
6145 test "$with_workshop" = yes && echo " Compiling in support for Sun WorkShop."
|
|
6146 test "$with_socks" = yes && echo " Compiling in support for SOCKS."
|
|
6147 test "$with_dnet" = yes && echo " Compiling in support for DNET."
|
|
6148 test "$enable_modules" = "yes" && echo " Compiling in support for dynamic shared object modules."
|
|
6149 test "$enable_bignum" = "gmp" && echo " Compiling in support for more number types using the GNU MP library."
|
|
6150 test "$enable_bignum" = "mp" && echo " Compiling in support for more number types using the BSD MP library."
|
|
6151 if test "$enable_union_type" = yes ; then
|
|
6152 echo " Using the union type for Lisp_Objects."
|
|
6153 echo " WARNING: ---------------------------------------------------------"
|
|
6154 echo " WARNING: This tends to trigger compiler bugs, especially when"
|
|
6155 echo " WARNING: combined with MULE and ERROR_CHECKING. Crashes have"
|
|
6156 echo " WARNING: been seen with various versions of GCC (up to about 2.95),"
|
|
6157 echo " WARNING: and recently with Visual C++ as well (mid-2003)."
|
|
6158 echo " WARNING: More recent versions may be safer, or not."
|
|
6159 echo " WARNING: ---------------------------------------------------------"
|
|
6160 fi
|
2790
|
6161 if test "$enable_kkcc" = yes ; then
|
3263
|
6162 echo " Using the new GC mark algorithms (KKCC)."
|
2790
|
6163 echo " WARNING: ---------------------------------------------------------"
|
|
6164 echo " WARNING: The new algorithms are experimental. They are enabled by"
|
|
6165 echo " WARNING: default for this release. Use \`--disable-kkcc' to"
|
|
6166 echo " WARNING: turn it off."
|
|
6167 echo " WARNING: ---------------------------------------------------------"
|
|
6168 fi
|
3263
|
6169 test "$enable_newgc" = yes && echo " Using the new incremental garbage collector and the new allocator."
|
3092
|
6170 if test "$have_vdb_posix" = yes ; then
|
|
6171 if test "$have_vdb_sigaction" = yes ; then
|
|
6172 echo " Using POSIX sigaction() to install fault handler."
|
|
6173 else
|
|
6174 echo " Using POSIX signal() to install vdb fault handler."
|
|
6175 fi
|
|
6176 fi
|
|
6177 if test "$have_vdb_win32" = yes ; then
|
|
6178 echo " Using special WIN32 vdb fault handler."
|
|
6179 fi
|
|
6180 if test "$have_vdb_mach" = yes ; then
|
|
6181 echo " Using mach exception mechanism as vdb fault handler."
|
|
6182 fi
|
|
6183 if test "$have_vdb_fake" = yes && test "$enable_vdb" == fake; then
|
|
6184 echo " Virtual dirty bit write barrier manually disabled."
|
|
6185 fi
|
2651
|
6186 test "$enable_pdump" = yes && echo " Using the new portable dumper."
|
2720
|
6187 test "$enable_dump_in_exec" = yes && echo " Dumping into executable."
|
2651
|
6188 test "$enable_debug" = yes && echo " Compiling in support for extra debugging code."
|
|
6189 test "$usage_tracking" = yes && echo " Compiling in support for active usage tracking (Sun internal)."
|
|
6190 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" \
|
|
6191 != "no no no no no no no no no"; then
|
|
6192 echo " Compiling in support for runtime error checking."
|
|
6193 echo " WARNING: ---------------------------------------------------------"
|
|
6194 echo " WARNING: XEmacs will run noticeably more slowly as a result."
|
|
6195 echo " WARNING: Error checking is on by default for XEmacs beta releases."
|
|
6196 echo " WARNING: ---------------------------------------------------------"
|
|
6197 fi
|
|
6198 echo ""
|
|
6199 ) | tee -a Installation
|
|
6200 dnl echo "The above configure report is appended to \"Installation\" file."
|
|
6201 echo ""
|
|
6202
|
|
6203 dnl -----------------------------------
|
|
6204 dnl Now generate config.h and Makefiles
|
|
6205 dnl -----------------------------------
|
|
6206 AC_CONFIG_HEADER(src/config.h lwlib/config.h)
|
|
6207
|
|
6208 dnl This has to be called in order for this variable to get into config.status
|
|
6209 AC_SUBST(internal_makefile_list)
|
|
6210 # Remove any trailing slashes in these variables.
|
|
6211 test -n "$prefix" &&
|
|
6212 prefix=`echo '' "$prefix" | sed -e 's:^ ::' -e 's,\([[^/]]\)/*$,\1,'`
|
|
6213 test -n "$exec_prefix" &&
|
|
6214 exec_prefix=`echo '' "$exec_prefix" | sed -e 's:^ ::' -e 's,\([[^/]]\)/*$,\1,'`
|
|
6215
|
|
6216 dnl Build Makefile.in's from Makefile.in.in's
|
|
6217 dnl except ./Makefile from $srcdir/Makefile.in
|
|
6218 dnl src/Makefile.in will have src/depend appended to it;
|
|
6219 dnl module Makefiles will have the common text in
|
|
6220 dnl modules/common/Makefile.common appended.
|
|
6221
|
3481
|
6222 dnl this actually should be conditional on having perl (ie, effectively
|
|
6223 dnl unconditional on sane systems)
|
|
6224 if test -r $srcdir/src/depend; then :;
|
|
6225 else
|
|
6226 echo "creating $srcdir/src/depend"
|
|
6227 perl $srcdir/src/make-src-depend > $srcdir/src/depend
|
|
6228 fi
|
|
6229
|
2651
|
6230 for file in $internal_makefile_list; do
|
|
6231 case $file in
|
|
6232 src/Makefile.in ) file="src/Makefile.in:src/Makefile.in.in:src/depend" ;;
|
|
6233 modules/* ) file="${file}:${file}.in:modules/common/Makefile.common" ;;
|
|
6234 esac
|
|
6235 AC_CONFIG_FILES($file)
|
|
6236 done
|
|
6237 AC_CONFIG_FILES(src/paths.h src/xemacs.def.in lib-src/config.values)
|
|
6238 test "$enable_modules" = "yes" && AC_CONFIG_FILES(lib-src/ellcc.h)
|
|
6239
|
|
6240
|
|
6241 dnl Normally []'s are used for quoting but this will cause problems
|
|
6242 dnl since we use brackets in sed. When not inside of a macro definition,
|
|
6243 dnl two brackets become one, but inside of a macro definition you need
|
|
6244 dnl more, or something -- I don't understand, but Martin probably does.
|
|
6245 dnl We put the brackets back later.
|
|
6246 dnl [ben]
|
3418
|
6247 dnl To insert comments that will remain in the generated file, we use the
|
|
6248 dnl imake XCOMM convention. Lines beginning with "XCOMM " exactly (no
|
|
6249 dnl leading whitespace, one trailing ASCII space, case sensitive) will be
|
|
6250 dnl transformed to shell/make/gdb comments in the generated file.
|
|
6251 dnl [sjt]
|
2651
|
6252
|
|
6253 dnl MAKE_JUNK_C(filename):
|
|
6254 dnl Copy a .in file to junk.c in preparation for passing through the
|
|
6255 dnl C preprocessor. Delete comment lines, pass lines that will be
|
|
6256 dnl interpreted by cpp through directly, and put quotes around remaining
|
|
6257 dnl lines, to avoid problems from overly helpful preprocessors that
|
|
6258 dnl "helpfully" put extra quotes in various places for later use by the
|
|
6259 dnl compiler. Later, the quotes will be removed.
|
|
6260
|
|
6261 m4_define([MAKE_JUNK_C],
|
|
6262 [ rm -f junk.c
|
|
6263 < $1 \
|
|
6264 sed -e '/^# Generated/d' \
|
|
6265 -e 's%/\*\*/#.*%%' \
|
|
6266 -e 's/^ *# */#/' \
|
|
6267 dnl Delete Makefile.in.in comment lines
|
|
6268 -e '/^##/d' \
|
|
6269 dnl Pass through CPP directives unchanged
|
|
6270 -e '/^#/ {
|
|
6271 p
|
|
6272 d
|
|
6273 }' \
|
|
6274 dnl Quote other lines to protect from CPP substitution
|
|
6275 -e '/./ {
|
|
6276 s/\([[\"]]\)/\\\1/g
|
|
6277 s/^/"/
|
|
6278 s/$/"/
|
|
6279 }' > junk.c;
|
|
6280 ])dnl MAKE_JUNK_C
|
|
6281
|
|
6282 dnl CPP_MAKEFILE(CPPFLAGS,filename):
|
|
6283 dnl Pass junk.c through the preprocessor and put the result in FILENAME.
|
|
6284
|
|
6285 m4_define([CPP_MAKEFILE],
|
|
6286 [echo creating $dir/$2
|
|
6287 $CPP -I. -I${srcdir}/src $1 junk.c \
|
|
6288 dnl Delete line directives inserted by $CPP
|
|
6289 | sed -e 's/^\#.*//' \
|
|
6290 dnl Delete spurious blanks inserted by $CPP
|
|
6291 -e 's/^[[ TAB]][[ TAB]]*$//'\
|
|
6292 -e 's/^ /TAB/' \
|
|
6293 dnl Delete blank lines
|
|
6294 -e '/^[[ ]]*$/d' \
|
|
6295 dnl Restore lines quoted above to original contents.
|
|
6296 -e '/^\"/ {
|
|
6297 s/\\\([[\"]]\)/\1/g
|
|
6298 s/^[[ TAB]]*\"//
|
|
6299 s/\"[[ TAB]]*$//
|
3418
|
6300 }' \
|
|
6301 dnl Convert comments -- must come after the unquoting operations
|
|
6302 -e 's/^XCOMM /\# /' > Makefile.new
|
2651
|
6303 chmod 444 Makefile.new
|
|
6304 mv -f Makefile.new $2
|
|
6305 ])dnl CPP_MAKEFILE
|
|
6306
|
|
6307 AC_CONFIG_COMMANDS([default],
|
|
6308 [for dir in . $MAKE_SUBDIR; do
|
|
6309 (
|
|
6310 cd $dir
|
|
6311
|
|
6312 dnl Create a GNUmakefile and Makefile from Makefile.in.
|
|
6313 dnl Create xemacs.def from xemacs.def.in in the same fashion,
|
3418
|
6314 dnl if it exists (i.e. in the src/ directory). Ditto for the
|
|
6315 dnl debugger init files (in the src/ directory).
|
2651
|
6316 MAKE_JUNK_C(Makefile.in)
|
|
6317 CPP_MAKEFILE(,Makefile)
|
|
6318 CPP_MAKEFILE(-DUSE_GNU_MAKE,GNUmakefile)
|
3092
|
6319 if test -r ".gdbinit.in"; then
|
|
6320 MAKE_JUNK_C(.gdbinit.in)
|
|
6321 CPP_MAKEFILE(,.gdbinit)
|
|
6322 fi
|
|
6323 if test -r ".dbxrc.in"; then
|
|
6324 MAKE_JUNK_C(.dbxrc.in)
|
|
6325 CPP_MAKEFILE(,.dbxrc)
|
|
6326 fi
|
2651
|
6327 if test -r "xemacs.def.in"; then
|
|
6328 dnl #### We should be using MAKE_JUNK_C instead of the next two lines.
|
|
6329 dnl #### But the comments in xemacs.def.in need to be converted from C-style
|
|
6330 dnl #### to lines beginning with ##.
|
|
6331 rm -f junk.c
|
|
6332 cp xemacs.def.in junk.c
|
|
6333 CPP_MAKEFILE(,xemacs.def)
|
|
6334 fi
|
|
6335 rm -f junk.c
|
|
6336 )
|
|
6337 done
|
|
6338
|
|
6339 dnl Append AC_DEFINE information to lib-src/config.values
|
|
6340 dnl (AC_SUBST information is already there (see config.values.sh).
|
|
6341 sed < config.status >> lib-src/config.values \
|
|
6342 -e '/{ac_dA}.*{ac_dB}.*{ac_dC}.*{ac_dD}$/!d' \
|
|
6343 -e 's/\${ac_dA}\(.*\)\${ac_dB}.*\${ac_dC}\(.*\)\${ac_dD}/\1 \2/' \
|
|
6344 -e 's/^\([[^ ]]*\) $/\1 ""/' \
|
|
6345 -e 's/ 1$/ t/'
|
|
6346
|
|
6347 ],
|
|
6348 [CPP="$CPP"
|
|
6349 MAKE_SUBDIR="$MAKE_SUBDIR"
|
|
6350 ])dnl
|
|
6351
|
|
6352 AC_OUTPUT()dnl
|
|
6353
|