3 # Patch managed by http://www.mn-logistik.de/unsupported/pxa250/patcher
6 Index: dialog-1.0-20050306/acinclude.m4
7 ===================================================================
8 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
9 +++ dialog-1.0-20050306/acinclude.m4 2005-05-16 01:32:07.000000000 +0200
11 +dnl ---------------------------------------------------------------------------
12 +dnl CF_AC_PREREQ version: 2 updated: 1997/09/06 13:24:56
14 +dnl Conditionally generate script according to whether we're using the release
15 +dnl version of autoconf, or a patched version (using the ternary component as
16 +dnl the patch-version).
19 +AC_PREREQ_CANON(AC_PREREQ_SPLIT(AC_ACVERSION)),
20 +AC_PREREQ_CANON(AC_PREREQ_SPLIT([$1])), [$1], [$2], [$3])])dnl
21 +dnl ---------------------------------------------------------------------------
22 +dnl CF_ADD_INCDIR version: 4 updated: 2002/12/21 14:25:52
24 +dnl Add an include-directory to $CPPFLAGS. Don't add /usr/include, since it's
25 +dnl redundant. We don't normally need to add -I/usr/local/include for gcc,
26 +dnl but old versions (and some misinstalled ones) need that. To make things
27 +dnl worse, gcc 3.x gives error messages if -I/usr/local/include is added to
28 +dnl the include-path).
29 +AC_DEFUN([CF_ADD_INCDIR],
31 +for cf_add_incdir in $1
35 + case $cf_add_incdir in
38 + /usr/local/include) # (vi
39 + if test "$GCC" = yes
41 + cf_save_CPPFLAGS="$CPPFLAGS"
42 + CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
43 + AC_TRY_COMPILE([#include <stdio.h>],
46 + [CPPFLAGS="$cf_save_CPPFLAGS"])
50 + CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
53 + cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
54 + test "$cf_top_incdir" = "$cf_add_incdir" && break
55 + cf_add_incdir="$cf_top_incdir"
59 +dnl ---------------------------------------------------------------------------
60 +dnl CF_ARG_DISABLE version: 3 updated: 1999/03/30 17:24:31
62 +dnl Allow user to disable a normally-on option.
63 +AC_DEFUN([CF_ARG_DISABLE],
64 +[CF_ARG_OPTION($1,[$2],[$3],[$4],yes)])dnl
65 +dnl ---------------------------------------------------------------------------
66 +dnl CF_ARG_ENABLE version: 3 updated: 1999/03/30 17:24:31
68 +dnl Allow user to enable a normally-off option.
69 +AC_DEFUN([CF_ARG_ENABLE],
70 +[CF_ARG_OPTION($1,[$2],[$3],[$4],no)])dnl
71 +dnl ---------------------------------------------------------------------------
72 +dnl CF_ARG_MSG_ENABLE version: 2 updated: 2000/07/29 19:32:03
73 +dnl -----------------
74 +dnl Verbose form of AC_ARG_ENABLE:
80 +dnl $4 = action to perform if option is enabled
81 +dnl $5 = action if perform if option is disabled
82 +dnl $6 = default option value (either 'yes' or 'no')
83 +AC_DEFUN([CF_ARG_MSG_ENABLE],[
85 +AC_ARG_ENABLE($2,[$3],,enableval=ifelse($6,,no,$6))
86 +AC_MSG_RESULT($enableval)
87 +if test "$enableval" != no ; then
93 +dnl ---------------------------------------------------------------------------
94 +dnl CF_ARG_OPTION version: 3 updated: 1997/10/18 14:42:41
96 +dnl Restricted form of AC_ARG_ENABLE that ensures user doesn't give bogus
100 +dnl $1 = option name
101 +dnl $2 = help-string
102 +dnl $3 = action to perform if option is not default
103 +dnl $4 = action if perform if option is default
104 +dnl $5 = default option value (either 'yes' or 'no')
105 +AC_DEFUN([CF_ARG_OPTION],
106 +[AC_ARG_ENABLE($1,[$2],[test "$enableval" != ifelse($5,no,yes,no) && enableval=ifelse($5,no,no,yes)
107 + if test "$enableval" != "$5" ; then
109 +,[ $3]) ifelse($4,,,[
112 + fi],[enableval=$5 ifelse($4,,,[
116 +dnl ---------------------------------------------------------------------------
117 +dnl CF_BUNDLED_INTL version: 10 updated: 2003/09/14 18:49:13
119 +dnl Top-level macro for configuring an application with a bundled copy of
120 +dnl the intl and po directories for gettext.
122 +dnl $1 specifies either Makefile or makefile, defaulting to the former.
123 +dnl $2 if nonempty sets the option to --enable-nls rather than to --disable-nls
125 +dnl Sets variables which can be used to substitute in makefiles:
126 +dnl INTLDIR_MAKE - to make ./intl directory
127 +dnl MSG_DIR_MAKE - to make ./po directory
128 +dnl SUB_MAKEFILE - list of makefiles in ./intl, ./po directories
130 +dnl HAVE_LIBGETTEXT_H if we're using ./intl
133 +dnl ALL_LINGUAS if set, lists the root names of the ".po" files.
134 +dnl CONFIG_H assumed to be "config.h"
135 +dnl VERSION may be set, otherwise extract from "VERSION" file.
137 +AH_TEMPLATE([HAVE_LIBGETTEXT_H], [Define if we're using ./intl.])
138 +AC_DEFUN([CF_BUNDLED_INTL],[
139 +cf_makefile=ifelse($1,,Makefile,$1)
141 +dnl Set of available languages (based on source distribution). Note that
142 +dnl setting $LINGUAS overrides $ALL_LINGUAS. Some environments set $LINGUAS
143 +dnl rather than $LC_ALL
144 +test -z "$ALL_LINGUAS" && ALL_LINGUAS=`test -d $srcdir/po && cd $srcdir/po && echo *.po|sed -e 's/\.po//g' -e 's/*//'`
146 +# Allow override of "config.h" definition:
147 +: ${CONFIG_H=config.h}
150 +if test -z "$VERSION" ; then
151 +if test -f $srcdir/VERSION ; then
152 + VERSION=`sed -e '2,$d' $srcdir/VERSION|cut -f1`
159 +AM_GNU_GETTEXT(,,,[$2])
165 +dnl this updates SUB_MAKEFILE and MSG_DIR_MAKE:
168 +if test "$USE_INCLUDED_LIBINTL" = yes ; then
169 + if test "$nls_cv_force_use_gnu_gettext" = yes ; then
171 + elif test "$nls_cv_use_gnu_gettext" = yes ; then
176 + if test -z "$INTLDIR_MAKE"; then
177 + AC_DEFINE(HAVE_LIBGETTEXT_H)
178 + for cf_makefile in \
179 + $srcdir/intl/Makefile.in \
180 + $srcdir/intl/makefile.in
182 + if test -f "$cf_makefile" ; then
183 + SUB_MAKEFILE="$SUB_MAKEFILE `echo ${cf_makefile}|sed -e 's/\.in$//'`:${cf_makefile}"
190 + if test "$USE_NLS" = yes ; then
191 + AC_CHECK_HEADERS(libintl.h)
195 +if test -z "$INTLDIR_MAKE" ; then
196 + CPPFLAGS="-I../intl $CPPFLAGS"
199 +dnl FIXME: we use this in lynx (the alternative is a spurious dependency upon
201 +if test "$BUILD_INCLUDED_LIBINTL" = yes ; then
209 +AC_SUBST(INTLDIR_MAKE)
210 +AC_SUBST(MSG_DIR_MAKE)
214 +dnl FIXME: the underlying AM_GNU_GETTEXT macro either needs some fixes or a
215 +dnl little documentation. It doesn't define anything so that we can ifdef our
216 +dnl own code, except ENABLE_NLS, which is too vague to be of any use.
218 +if test "$USE_INCLUDED_LIBINTL" = yes ; then
219 + if test "$nls_cv_force_use_gnu_gettext" = yes ; then
220 + AC_DEFINE(HAVE_GETTEXT)
221 + elif test "$nls_cv_use_gnu_gettext" = yes ; then
222 + AC_DEFINE(HAVE_GETTEXT)
224 + if test -n "$nls_cv_header_intl" ; then
225 + AC_DEFINE(HAVE_LIBINTL_H)
229 +dnl ---------------------------------------------------------------------------
230 +dnl CF_CHECK_CACHE version: 7 updated: 2001/12/19 00:50:10
232 +dnl Check if we're accidentally using a cache from a different machine.
233 +dnl Derive the system name, as a check for reusing the autoconf cache.
235 +dnl If we've packaged config.guess and config.sub, run that (since it does a
236 +dnl better job than uname). Normally we'll use AC_CANONICAL_HOST, but allow
237 +dnl an extra parameter that we may override, e.g., for AC_CANONICAL_SYSTEM
238 +dnl which is useful in cross-compiles.
239 +AC_DEFUN([CF_CHECK_CACHE],
241 +if test -f $srcdir/config.guess ; then
242 + ifelse([$1],,[AC_CANONICAL_HOST],[$1])
243 + system_name="$host_os"
245 + system_name="`(uname -s -r) 2>/dev/null`"
246 + if test -z "$system_name" ; then
247 + system_name="`(hostname) 2>/dev/null`"
250 +AH_TEMPLATE([SYSTEM_NAME], [Set to the system name])
251 +test -n "$system_name" && AC_DEFINE_UNQUOTED(SYSTEM_NAME,"$system_name")
252 +AC_CACHE_VAL(cf_cv_system_name,[cf_cv_system_name="$system_name"])
254 +test -z "$system_name" && system_name="$cf_cv_system_name"
255 +test -n "$cf_cv_system_name" && AC_MSG_RESULT(Configuring for $cf_cv_system_name)
257 +if test ".$system_name" != ".$cf_cv_system_name" ; then
258 + AC_MSG_RESULT(Cached system name ($system_name) does not agree with actual ($cf_cv_system_name))
259 + AC_ERROR("Please remove config.cache and try again.")
262 +dnl ---------------------------------------------------------------------------
263 +dnl CF_CURSES_CHTYPE version: 6 updated: 2003/11/06 19:59:57
264 +dnl ----------------
265 +dnl Test if curses defines 'chtype' (usually a 'long' type for SysV curses).
266 +AH_TEMPLATE([HAVE_TYPE_CHTYPE], [Define if curses defines 'chtype'.])
267 +AH_TEMPLATE([TYPE_CHTYPE_IS_SCALAR], [Define if chtype is scalar rather than a struct.])
268 +AC_DEFUN([CF_CURSES_CHTYPE],
270 +AC_REQUIRE([CF_CURSES_CPPFLAGS])dnl
271 +AC_CACHE_CHECK(for chtype typedef,cf_cv_chtype_decl,[
272 + AC_TRY_COMPILE([#include <${cf_cv_ncurses_header-curses.h}>],
274 + [cf_cv_chtype_decl=yes],
275 + [cf_cv_chtype_decl=no])])
276 +if test $cf_cv_chtype_decl = yes ; then
277 + AC_DEFINE(HAVE_TYPE_CHTYPE)
278 + AC_CACHE_CHECK(if chtype is scalar or struct,cf_cv_chtype_type,[
279 + AC_TRY_COMPILE([#include <${cf_cv_ncurses_header-curses.h}>],
280 + [chtype foo; long x = foo],
281 + [cf_cv_chtype_type=scalar],
282 + [cf_cv_chtype_type=struct])])
283 + if test $cf_cv_chtype_type = scalar ; then
284 + AC_DEFINE(TYPE_CHTYPE_IS_SCALAR)
288 +dnl ---------------------------------------------------------------------------
289 +dnl CF_CURSES_CPPFLAGS version: 7 updated: 2003/06/06 00:48:41
290 +dnl ------------------
291 +dnl Look for the curses headers.
292 +AC_DEFUN([CF_CURSES_CPPFLAGS],[
294 +AC_CACHE_CHECK(for extra include directories,cf_cv_curses_incdir,[
295 +cf_cv_curses_incdir=no
296 +case $host_os in #(vi
297 +hpux10.*|hpux11.*) #(vi
298 + test -d /usr/include/curses_colr && \
299 + cf_cv_curses_incdir="-I/usr/include/curses_colr"
302 + test -d /usr/5lib && \
303 + test -d /usr/5include && \
304 + cf_cv_curses_incdir="-I/usr/5include"
308 +test "$cf_cv_curses_incdir" != no && CPPFLAGS="$cf_cv_curses_incdir $CPPFLAGS"
310 +AC_CACHE_CHECK(if we have identified curses headers,cf_cv_ncurses_header,[
311 +cf_cv_ncurses_header=none
318 +AC_TRY_COMPILE([#include <${cf_header}>],
319 + [initscr(); tgoto("?", 0,0)],
320 + [cf_cv_ncurses_header=$cf_header; break],[])
324 +if test "$cf_cv_ncurses_header" = none ; then
325 + AC_MSG_ERROR(No curses header-files found)
328 +# cheat, to get the right #define's for HAVE_NCURSES_H, etc.
329 +AC_CHECK_HEADERS($cf_cv_ncurses_header)
332 +dnl ---------------------------------------------------------------------------
333 +dnl CF_CURSES_FUNCS version: 12 updated: 2003/11/06 19:59:57
335 +dnl Curses-functions are a little complicated, since a lot of them are macros.
336 +AC_DEFUN([CF_CURSES_FUNCS],
338 +AC_REQUIRE([CF_CURSES_CPPFLAGS])dnl
339 +AC_REQUIRE([CF_XOPEN_CURSES])
340 +AC_REQUIRE([CF_CURSES_TERM_H])
343 + CF_UPPER(cf_tr_func,$cf_func)
344 + AC_MSG_CHECKING(for ${cf_func})
345 + CF_MSG_LOG(${cf_func})
346 + AC_CACHE_VAL(cf_cv_func_$cf_func,[
347 + eval cf_result='$ac_cv_func_'$cf_func
348 + if test ".$cf_result" != ".no"; then
351 +#include <xcurses.h>
352 +char * XCursesProgramName = "test";
354 +#include <${cf_cv_ncurses_header-curses.h}>
355 +#if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
356 +#include <ncursesw/term.h>
358 +#if defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
359 +#include <ncurses/term.h>
369 +long foo = (long)(&${cf_func});
376 + eval 'cf_cv_func_'$cf_func'=$cf_result'
378 + # use the computed/retrieved cache-value:
379 + eval 'cf_result=$cf_cv_func_'$cf_func
380 + AC_MSG_RESULT($cf_result)
381 + if test $cf_result != no; then
382 + AC_DEFINE_UNQUOTED(HAVE_${cf_tr_func})
386 +dnl ---------------------------------------------------------------------------
387 +dnl CF_CURSES_LIBS version: 23 updated: 2003/11/06 19:59:57
389 +dnl Look for the curses libraries. Older curses implementations may require
390 +dnl termcap/termlib to be linked as well. Call CF_CURSES_CPPFLAGS first.
391 +AC_DEFUN([CF_CURSES_LIBS],[
393 +AC_REQUIRE([CF_CURSES_CPPFLAGS])dnl
394 +AC_MSG_CHECKING(if we have identified curses libraries)
395 +AC_TRY_LINK([#include <${cf_cv_ncurses_header-curses.h}>],
396 + [initscr(); tgoto("?", 0,0)],
399 +AC_MSG_RESULT($cf_result)
401 +if test "$cf_result" = no ; then
402 +case $host_os in #(vi
404 + AC_CHECK_LIB(mytinfo,tgoto,[LIBS="-lmytinfo $LIBS"])
406 +hpux10.*|hpux11.*) #(vi
407 + AC_CHECK_LIB(cur_colr,initscr,[
408 + LIBS="-lcur_colr $LIBS"
409 + ac_cv_func_initscr=yes
411 + AC_CHECK_LIB(Hcurses,initscr,[
412 + # HP's header uses __HP_CURSES, but user claims _HP_CURSES.
413 + LIBS="-lHcurses $LIBS"
414 + CPPFLAGS="-D__HP_CURSES -D_HP_CURSES $CPPFLAGS"
415 + ac_cv_func_initscr=yes
418 +linux*) # Suse Linux does not follow /usr/lib convention
419 + LIBS="$LIBS -L/lib"
422 + test -d /usr/5lib && \
423 + LIBS="$LIBS -L/usr/5lib -lcurses -ltermcap"
424 + ac_cv_func_initscr=yes
428 +if test ".$ac_cv_func_initscr" != .yes ; then
429 + cf_save_LIBS="$LIBS"
433 + if test ".${cf_cv_ncurses_version-no}" != .no
435 + cf_check_list="ncurses curses cursesX"
437 + cf_check_list="cursesX curses ncurses"
440 + # Check for library containing tgoto. Do this before curses library
441 + # because it may be needed to link the test-case for initscr.
442 + AC_CHECK_FUNC(tgoto,[cf_term_lib=predefined],[
443 + for cf_term_lib in $cf_check_list termcap termlib unknown
445 + AC_CHECK_LIB($cf_term_lib,tgoto,[break])
449 + # Check for library containing initscr
450 + test "$cf_term_lib" != predefined && test "$cf_term_lib" != unknown && LIBS="-l$cf_term_lib $cf_save_LIBS"
451 + for cf_curs_lib in $cf_check_list xcurses jcurses unknown
453 + AC_CHECK_LIB($cf_curs_lib,initscr,[break])
455 + test $cf_curs_lib = unknown && AC_ERROR(no curses library found)
457 + LIBS="-l$cf_curs_lib $cf_save_LIBS"
458 + if test "$cf_term_lib" = unknown ; then
459 + AC_MSG_CHECKING(if we can link with $cf_curs_lib library)
460 + AC_TRY_LINK([#include <${cf_cv_ncurses_header-curses.h}>],
464 + AC_MSG_RESULT($cf_result)
465 + test $cf_result = no && AC_ERROR(Cannot link curses library)
466 + elif test "$cf_curs_lib" = "$cf_term_lib" ; then
468 + elif test "$cf_term_lib" != predefined ; then
469 + AC_MSG_CHECKING(if we need both $cf_curs_lib and $cf_term_lib libraries)
470 + AC_TRY_LINK([#include <${cf_cv_ncurses_header-curses.h}>],
471 + [initscr(); tgoto((char *)0, 0, 0);],
474 + LIBS="-l$cf_curs_lib -l$cf_term_lib $cf_save_LIBS"
475 + AC_TRY_LINK([#include <${cf_cv_ncurses_header-curses.h}>],
480 + AC_MSG_RESULT($cf_result)
486 +dnl ---------------------------------------------------------------------------
487 +dnl CF_CURSES_TERM_H version: 6 updated: 2003/11/06 19:59:57
488 +dnl ----------------
489 +dnl SVr4 curses should have term.h as well (where it puts the definitions of
490 +dnl the low-level interface). This may not be true in old/broken implementations,
491 +dnl as well as in misconfigured systems (e.g., gcc configured for Solaris 2.4
492 +dnl running with Solaris 2.5.1).
493 +AC_DEFUN([CF_CURSES_TERM_H],
495 +AC_CACHE_CHECK(for term.h, cf_cv_term_header,[
497 +AC_REQUIRE([CF_CURSES_CPPFLAGS])dnl
498 +# If we found <ncurses/curses.h>, look for <ncurses/term.h>, but always look
499 +# for <term.h> if we do not find the variant.
501 + `echo ${cf_cv_ncurses_header-curses.h} | sed -e 's%/.*%/%'`term.h \
505 +#include <${cf_cv_ncurses_header-curses.h}>
506 +#include <${cf_header}>],
508 + [cf_cv_term_header=$cf_header
510 + [cf_cv_term_header=no])
514 +AH_TEMPLATE([HAVE_TERM_H], [define if you have term.h])
515 +AH_TEMPLATE([HAVE_NCURSES_TERM_H], [define if you have ncurses/term.h])
516 +AH_TEMPLATE([HAVE_NCURSESW_TERM_H], [define if you have ncursesw/term.h])
517 +case $cf_cv_term_header in #(vi
519 + AC_DEFINE(HAVE_TERM_H)
522 + AC_DEFINE(HAVE_NCURSES_TERM_H)
525 + AC_DEFINE(HAVE_NCURSESW_TERM_H)
529 +dnl ---------------------------------------------------------------------------
530 +dnl CF_DIRNAME version: 4 updated: 2002/12/21 19:25:52
532 +dnl "dirname" is not portable, so we fake it with a shell script.
533 +AC_DEFUN([CF_DIRNAME],[$1=`echo $2 | sed -e 's%/[[^/]]*$%%'`])dnl
534 +dnl ---------------------------------------------------------------------------
535 +dnl CF_DISABLE_ECHO version: 10 updated: 2003/04/17 22:27:11
537 +dnl You can always use "make -n" to see the actual options, but it's hard to
538 +dnl pick out/analyze warning messages when the compile-line is long.
541 +dnl ECHO_LT - symbol to control if libtool is verbose
542 +dnl ECHO_LD - symbol to prefix "cc -o" lines
543 +dnl RULE_CC - symbol to put before implicit "cc -c" lines (e.g., .c.o)
544 +dnl SHOW_CC - symbol to put before explicit "cc -c" lines
545 +dnl ECHO_CC - symbol to put before any "cc" line
547 +AC_DEFUN([CF_DISABLE_ECHO],[
548 +AC_MSG_CHECKING(if you want to see long compiling messages)
549 +CF_ARG_DISABLE(echo,
550 + [ --disable-echo display "compiling" commands],
553 + ECHO_LD='@echo linking [$]@;'
554 + RULE_CC=' @echo compiling [$]<'
555 + SHOW_CC=' @echo compiling [$]@'
560 + RULE_CC='# compiling'
561 + SHOW_CC='# compiling'
564 +AC_MSG_RESULT($enableval)
571 +dnl ---------------------------------------------------------------------------
572 +dnl CF_FIND_LIBRARY version: 7 updated: 2000/04/13 21:38:04
574 +dnl Look for a non-standard library, given parameters for AC_TRY_LINK. We
575 +dnl prefer a standard location, and use -L options only if we do not find the
576 +dnl library in the standard library location(s).
577 +dnl $1 = library name
578 +dnl $2 = library class, usually the same as library name
580 +dnl $4 = code fragment to compile/link
581 +dnl $5 = corresponding function-name
582 +dnl $6 = flag, nonnull if failure causes an error-exit
584 +dnl Sets the variable "$cf_libdir" as a side-effect, so we can see if we had
585 +dnl to use a -L option.
586 +AC_DEFUN([CF_FIND_LIBRARY],
588 + eval 'cf_cv_have_lib_'$1'=no'
591 + eval 'cf_cv_have_lib_'$1'=yes',[
592 + cf_save_LIBS="$LIBS"
593 + AC_MSG_CHECKING(for $5 in -l$1)
595 + AC_TRY_LINK([$3],[$4],
596 + [AC_MSG_RESULT(yes)
597 + eval 'cf_cv_have_lib_'$1'=yes'
600 + CF_LIBRARY_PATH(cf_search,$2)
601 + for cf_libdir in $cf_search
603 + AC_MSG_CHECKING(for -l$1 in $cf_libdir)
604 + LIBS="-L$cf_libdir -l$1 $cf_save_LIBS"
605 + AC_TRY_LINK([$3],[$4],
606 + [AC_MSG_RESULT(yes)
607 + eval 'cf_cv_have_lib_'$1'=yes'
610 + LIBS="$cf_save_LIBS"])
614 +eval 'cf_found_library=[$]cf_cv_have_lib_'$1
616 +if test $cf_found_library = no ; then
617 + AC_ERROR(Cannot link $1 library)
621 +dnl ---------------------------------------------------------------------------
622 +dnl CF_FUNC_WAIT version: 2 updated: 1997/10/21 19:45:33
624 +dnl Test for the presence of <sys/wait.h>, 'union wait', arg-type of 'wait()'
625 +dnl and/or 'waitpid()'.
627 +dnl Note that we cannot simply grep for 'union wait' in the wait.h file,
628 +dnl because some Posix systems turn this on only when a BSD variable is
631 +dnl I don't use AC_HEADER_SYS_WAIT, because it defines HAVE_SYS_WAIT_H, which
632 +dnl would conflict with an attempt to test that header directly.
634 +AH_TEMPLATE([WAIT_USES_UNION], [Define if wait uses union])
635 +AH_TEMPLATE([WAITPID_USES_UNION], [Define if waitpid uses union])
636 +AC_DEFUN([CF_FUNC_WAIT],
638 +AC_REQUIRE([CF_UNION_WAIT])
639 +if test $cf_cv_type_unionwait = yes; then
641 + AC_MSG_CHECKING(if union wait can be used as wait-arg)
642 + AC_CACHE_VAL(cf_cv_arg_union_wait,[
643 + AC_TRY_COMPILE($cf_wait_headers,
644 + [union wait x; wait(&x)],
645 + [cf_cv_arg_union_wait=yes],
646 + [cf_cv_arg_union_wait=no])
648 + AC_MSG_RESULT($cf_cv_arg_union_wait)
649 + test $cf_cv_arg_union_wait = yes && AC_DEFINE(WAIT_USES_UNION)
651 + AC_MSG_CHECKING(if union wait can be used as waitpid-arg)
652 + AC_CACHE_VAL(cf_cv_arg_union_waitpid,[
653 + AC_TRY_COMPILE($cf_wait_headers,
654 + [union wait x; waitpid(0, &x, 0)],
655 + [cf_cv_arg_union_waitpid=yes],
656 + [cf_cv_arg_union_waitpid=no])
658 + AC_MSG_RESULT($cf_cv_arg_union_waitpid)
659 + test $cf_cv_arg_union_waitpid = yes && AC_DEFINE(WAITPID_USES_UNION)
663 +dnl ---------------------------------------------------------------------------
664 +dnl CF_GCC_ATTRIBUTES version: 9 updated: 2002/12/21 19:25:52
665 +dnl -----------------
666 +dnl Test for availability of useful gcc __attribute__ directives to quiet
667 +dnl compiler warnings. Though useful, not all are supported -- and contrary
668 +dnl to documentation, unrecognized directives cause older compilers to barf.
669 +AC_DEFUN([CF_GCC_ATTRIBUTES],
671 +if test "$GCC" = yes
673 +cat > conftest.i <<EOF
675 +#define GCC_PRINTF 0
680 +#ifndef GCC_NORETURN
681 +#define GCC_NORETURN /* nothing */
684 +#define GCC_UNUSED /* nothing */
687 +if test "$GCC" = yes
689 + AC_CHECKING([for $CC __attribute__ directives])
690 +cat > conftest.$ac_ext <<EOF
691 +#line __oline__ "configure"
692 +#include "confdefs.h"
693 +#include "conftest.h"
694 +#include "conftest.i"
696 +#define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
698 +#define GCC_PRINTFLIKE(fmt,var) /*nothing*/
701 +#define GCC_SCANFLIKE(fmt,var) __attribute__((format(scanf,fmt,var)))
703 +#define GCC_SCANFLIKE(fmt,var) /*nothing*/
705 +extern void wow(char *,...) GCC_SCANFLIKE(1,2);
706 +extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
707 +extern void foo(void) GCC_NORETURN;
708 +int main(int argc GCC_UNUSED, char *argv[[]] GCC_UNUSED) { return 0; }
710 + for cf_attribute in scanf printf unused noreturn
712 + CF_UPPER(CF_ATTRIBUTE,$cf_attribute)
713 + cf_directive="__attribute__(($cf_attribute))"
714 + echo "checking for $CC $cf_directive" 1>&AC_FD_CC
715 + case $cf_attribute in
717 + cat >conftest.h <<EOF
718 +#define GCC_$CF_ATTRIBUTE 1
722 + cat >conftest.h <<EOF
723 +#define GCC_$CF_ATTRIBUTE $cf_directive
727 + if AC_TRY_EVAL(ac_compile); then
728 + test -n "$verbose" && AC_MSG_RESULT(... $cf_attribute)
729 + cat conftest.h >>confdefs.h
733 + fgrep define conftest.i >>confdefs.h
738 +dnl ---------------------------------------------------------------------------
739 +dnl CF_GCC_VERSION version: 3 updated: 2003/09/06 19:16:57
741 +dnl Find version of gcc
742 +AC_DEFUN([CF_GCC_VERSION],[
743 +AC_REQUIRE([AC_PROG_CC])
745 +if test "$GCC" = yes ; then
746 + AC_MSG_CHECKING(version of $CC)
747 + GCC_VERSION="`${CC} --version|sed -e '2,$d' -e 's/^[[^0-9.]]*//' -e 's/[[^0-9.]].*//'`"
748 + test -z "$GCC_VERSION" && GCC_VERSION=unknown
749 + AC_MSG_RESULT($GCC_VERSION)
752 +dnl ---------------------------------------------------------------------------
753 +dnl CF_GCC_WARNINGS version: 15 updated: 2003/07/05 18:42:30
755 +dnl Check if the compiler supports useful warning options. There's a few that
756 +dnl we don't use, simply because they're too noisy:
758 +dnl -Wconversion (useful in older versions of gcc, but not in gcc 2.7.x)
759 +dnl -Wredundant-decls (system headers make this too noisy)
760 +dnl -Wtraditional (combines too many unrelated messages, only a few useful)
761 +dnl -Wwrite-strings (too noisy, but should review occasionally). This
762 +dnl is enabled for ncurses using "--enable-const".
765 +AC_DEFUN([CF_GCC_WARNINGS],
767 +AC_REQUIRE([CF_GCC_VERSION])
768 +if test "$GCC" = yes
770 + cat > conftest.$ac_ext <<EOF
771 +#line __oline__ "configure"
772 +int main(int argc, char *argv[[]]) { return (argv[[argc-1]] == 0) ; }
774 + AC_CHECKING([for $CC warning options])
775 + cf_save_CFLAGS="$CFLAGS"
776 + EXTRA_CFLAGS="-W -Wall"
778 + test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
780 + Wbad-function-cast \
784 + Wmissing-declarations \
785 + Wmissing-prototypes \
789 + Wstrict-prototypes \
790 + Wundef $cf_warn_CONST
792 + CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
793 + if AC_TRY_EVAL(ac_compile); then
794 + test -n "$verbose" && AC_MSG_RESULT(... -$cf_opt)
795 + case $cf_opt in #(vi
797 + CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
800 + case $GCC_VERSION in
802 + CF_VERBOSE(feature is broken in gcc $GCC_VERSION)
807 + EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
811 + CFLAGS="$cf_save_CFLAGS"
813 +AC_SUBST(EXTRA_CFLAGS)
815 +dnl ---------------------------------------------------------------------------
816 +dnl CF_GNU_SOURCE version: 3 updated: 2000/10/29 23:30:53
818 +dnl Check if we must define _GNU_SOURCE to get a reasonable value for
819 +dnl _XOPEN_SOURCE, upon which many POSIX definitions depend. This is a defect
820 +dnl (or misfeature) of glibc2, which breaks portability of many applications,
821 +dnl since it is interwoven with GNU extensions.
823 +dnl Well, yes we could work around it...
824 +AC_DEFUN([CF_GNU_SOURCE],
826 +AC_CACHE_CHECK(if we must define _GNU_SOURCE,cf_cv_gnu_source,[
827 +AC_TRY_COMPILE([#include <sys/types.h>],[
828 +#ifndef _XOPEN_SOURCE
831 + [cf_cv_gnu_source=no],
832 + [cf_save="$CPPFLAGS"
833 + CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
834 + AC_TRY_COMPILE([#include <sys/types.h>],[
835 +#ifdef _XOPEN_SOURCE
838 + [cf_cv_gnu_source=no],
839 + [cf_cv_gnu_source=yes])
840 + CPPFLAGS="$cf_save"
843 +test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
845 +dnl ---------------------------------------------------------------------------
846 +dnl CF_HEADER_PATH version: 8 updated: 2002/11/10 14:46:59
848 +dnl Construct a search-list for a nonstandard header-file
849 +AC_DEFUN([CF_HEADER_PATH],
850 +[CF_SUBDIR_PATH($1,$2,include)
851 +test "$includedir" != NONE && \
852 +test "$includedir" != "/usr/include" && \
853 +test -d "$includedir" && {
854 + test -d $includedir && $1="[$]$1 $includedir"
855 + test -d $includedir/$2 && $1="[$]$1 $includedir/$2"
858 +test "$oldincludedir" != NONE && \
859 +test "$oldincludedir" != "/usr/include" && \
860 +test -d "$oldincludedir" && {
861 + test -d $oldincludedir && $1="[$]$1 $oldincludedir"
862 + test -d $oldincludedir/$2 && $1="[$]$1 $oldincludedir/$2"
866 +dnl ---------------------------------------------------------------------------
867 +dnl CF_HELP_MESSAGE version: 3 updated: 1998/01/14 10:56:23
869 +dnl Insert text into the help-message, for readability, from AC_ARG_WITH.
870 +AC_DEFUN([CF_HELP_MESSAGE],
871 +[AC_DIVERT_HELP([$1])dnl
873 +dnl ---------------------------------------------------------------------------
874 +dnl CF_INCLUDE_DIRS version: 4 updated: 2002/12/01 00:12:15
876 +dnl Construct the list of include-options according to whether we're building
877 +dnl in the source directory or using '--srcdir=DIR' option. If we're building
878 +dnl with gcc, don't append the includedir if it happens to be /usr/include,
879 +dnl since that usually breaks gcc's shadow-includes.
880 +AC_DEFUN([CF_INCLUDE_DIRS],
882 +CPPFLAGS="-I. -I../include $CPPFLAGS"
883 +if test "$srcdir" != "."; then
884 + CPPFLAGS="-I\$(srcdir)/../include $CPPFLAGS"
886 +if test "$GCC" != yes; then
887 + CPPFLAGS="$CPPFLAGS -I\$(includedir)"
888 +elif test "$includedir" != "/usr/include"; then
889 + if test "$includedir" = '${prefix}/include' ; then
890 + if test $prefix != /usr ; then
891 + CPPFLAGS="$CPPFLAGS -I\$(includedir)"
894 + CPPFLAGS="$CPPFLAGS -I\$(includedir)"
899 +dnl ---------------------------------------------------------------------------
900 +dnl CF_INCLUDE_PATH version: 4 updated: 2001/04/15 21:21:45
902 +dnl Adds to the include-path
904 +dnl Autoconf 1.11 should have provided a way to add include path options to
907 +AC_DEFUN([CF_INCLUDE_PATH],
912 + AC_MSG_CHECKING(for directory $cf_path)
913 + if test -d $cf_path
915 + INCLUDES="$INCLUDES -I$cf_path"
916 + ac_cpp="${ac_cpp} -I$cf_path"
917 + CFLAGS="$CFLAGS -I$cf_path"
920 + /usr/include|/usr/include/*)
923 + CF_DIRNAME(cf_temp,$cf_path)
926 + INCLUDES="$INCLUDES -I$cf_temp"
927 + ac_cpp="${ac_cpp} -I$cf_temp"
928 + CFLAGS="$CFLAGS -I$cf_temp"
933 + AC_MSG_RESULT($cf_result)
936 +dnl ---------------------------------------------------------------------------
937 +dnl CF_LIBRARY_PATH version: 7 updated: 2002/11/10 14:46:59
939 +dnl Construct a search-list for a nonstandard library-file
940 +AC_DEFUN([CF_LIBRARY_PATH],
941 +[CF_SUBDIR_PATH($1,$2,lib)])dnl
942 +dnl ---------------------------------------------------------------------------
943 +dnl CF_LIB_PREFIX version: 7 updated: 2001/01/12 01:23:48
945 +dnl Compute the library-prefix for the given host system
946 +dnl $1 = variable to set
947 +AC_DEFUN([CF_LIB_PREFIX],
949 + case $cf_cv_system_name in
950 + OS/2*) LIB_PREFIX='' ;;
951 + os2*) LIB_PREFIX='' ;;
952 + *) LIB_PREFIX='lib' ;;
954 +ifelse($1,,,[$1=$LIB_PREFIX])
955 + AC_SUBST(LIB_PREFIX)
957 +dnl ---------------------------------------------------------------------------
958 +dnl CF_MAKEFLAGS version: 9 updated: 2001/12/30 18:17:27
960 +dnl Some 'make' programs support $(MAKEFLAGS), some $(MFLAGS), to pass 'make'
961 +dnl options to lower-levels. It's very useful for "make -n" -- if we have it.
962 +dnl (GNU 'make' does both, something POSIX 'make', which happens to make the
963 +dnl $(MAKEFLAGS) variable incompatible because it adds the assignments :-)
964 +AC_DEFUN([CF_MAKEFLAGS],
966 +AC_CACHE_CHECK(for makeflags variable, cf_cv_makeflags,[
968 + for cf_option in '-$(MAKEFLAGS)' '$(MFLAGS)'
970 + cat >cf_makeflags.tmp <<CF_EOF
973 + @ echo '.$cf_option'
975 + cf_result=`${MAKE-make} -k -f cf_makeflags.tmp 2>/dev/null`
976 + case "$cf_result" in
978 + cf_result=`${MAKE-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`
979 + case "$cf_result" in
980 + .*CC=*) cf_cv_makeflags=
982 + *) cf_cv_makeflags=$cf_option
987 + *) echo no match "$cf_result"
991 + rm -f cf_makeflags.tmp
994 +AC_SUBST(cf_cv_makeflags)
996 +dnl ---------------------------------------------------------------------------
997 +dnl CF_MAKE_TAGS version: 2 updated: 2000/10/04 09:18:40
999 +dnl Generate tags/TAGS targets for makefiles. Do not generate TAGS if we have
1000 +dnl a monocase filesystem.
1001 +AC_DEFUN([CF_MAKE_TAGS],[
1002 +AC_REQUIRE([CF_MIXEDCASE_FILENAMES])
1003 +AC_CHECK_PROG(MAKE_LOWER_TAGS, ctags, yes, no)
1005 +if test "$cf_cv_mixedcase" = yes ; then
1006 + AC_CHECK_PROG(MAKE_UPPER_TAGS, etags, yes, no)
1008 + MAKE_UPPER_TAGS=no
1011 +if test "$MAKE_UPPER_TAGS" = yes ; then
1014 + MAKE_UPPER_TAGS="#"
1016 +AC_SUBST(MAKE_UPPER_TAGS)
1018 +if test "$MAKE_LOWER_TAGS" = yes ; then
1021 + MAKE_LOWER_TAGS="#"
1023 +AC_SUBST(MAKE_LOWER_TAGS)
1025 +dnl ---------------------------------------------------------------------------
1026 +dnl CF_MATH_LIB version: 5 updated: 2000/05/28 01:39:10
1028 +dnl Checks for libraries. At least one UNIX system, Apple Macintosh
1029 +dnl Rhapsody 5.5, does not have -lm. We cannot use the simpler
1030 +dnl AC_CHECK_LIB(m,sin), because that fails for C++.
1031 +AC_DEFUN([CF_MATH_LIB],
1033 +AC_CACHE_CHECK(if -lm needed for math functions,
1036 + #include <stdio.h>
1039 + [double x = rand(); printf("result = %g\n", ]ifelse($2,,sin(x),$2)[)],
1040 + [cf_cv_need_libm=no],
1041 + [cf_cv_need_libm=yes])])
1042 +if test "$cf_cv_need_libm" = yes
1049 +dnl ---------------------------------------------------------------------------
1050 +dnl CF_MIXEDCASE_FILENAMES version: 3 updated: 2003/09/20 17:07:55
1051 +dnl ----------------------
1052 +dnl Check if the file-system supports mixed-case filenames. If we're able to
1053 +dnl create a lowercase name and see it as uppercase, it doesn't support that.
1054 +AH_TEMPLATE([MIXEDCASE_FILENAMES],[Define if the file-system supports mixed-case filenames.])
1055 +AC_DEFUN([CF_MIXEDCASE_FILENAMES],
1057 +AC_CACHE_CHECK(if filesystem supports mixed-case filenames,cf_cv_mixedcase,[
1058 +if test "$cross_compiling" = yes ; then
1059 + case $target_alias in #(vi
1060 + *-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-mingw32*|*-uwin*) #(vi
1061 + cf_cv_mixedcase=no
1064 + cf_cv_mixedcase=yes
1068 + rm -f conftest CONFTEST
1069 + echo test >conftest
1070 + if test -f CONFTEST ; then
1071 + cf_cv_mixedcase=no
1073 + cf_cv_mixedcase=yes
1075 + rm -f conftest CONFTEST
1078 +test "$cf_cv_mixedcase" = yes && AC_DEFINE(MIXEDCASE_FILENAMES)
1080 +dnl ---------------------------------------------------------------------------
1081 +dnl CF_MSG_LOG version: 3 updated: 1997/09/07 14:05:52
1083 +dnl Write a debug message to config.log, along with the line number in the
1084 +dnl configure script.
1085 +AC_DEFUN([CF_MSG_LOG],[
1086 +echo "(line __oline__) testing $* ..." 1>&AC_FD_CC
1088 +dnl ---------------------------------------------------------------------------
1089 +dnl CF_NCURSES_CC_CHECK version: 3 updated: 2003/01/12 18:59:28
1090 +dnl -------------------
1091 +dnl Check if we can compile with ncurses' header file
1092 +dnl $1 is the cache variable to set
1093 +dnl $2 is the header-file to include
1094 +dnl $3 is the root name (ncurses or ncursesw)
1095 +AC_DEFUN([CF_NCURSES_CC_CHECK],[
1097 +]ifelse($3,ncursesw,[
1098 +#define _XOPEN_SOURCE_EXTENDED
1099 +#undef HAVE_LIBUTF8_H /* in case we used CF_UTF8_LIB */
1100 +#define HAVE_LIBUTF8_H /* to force ncurses' header file to use cchar_t */
1103 +#ifdef NCURSES_VERSION
1104 +]ifelse($3,ncursesw,[
1109 +printf("%s\n", NCURSES_VERSION);
1121 +dnl ---------------------------------------------------------------------------
1122 +dnl CF_NCURSES_CPPFLAGS version: 17 updated: 2003/11/06 19:59:57
1123 +dnl -------------------
1124 +dnl Look for the SVr4 curses clone 'ncurses' in the standard places, adjusting
1125 +dnl the CPPFLAGS variable so we can include its header.
1127 +dnl The header files may be installed as either curses.h, or ncurses.h (would
1128 +dnl be obsolete, except that some packagers prefer this name to distinguish it
1129 +dnl from a "native" curses implementation). If not installed for overwrite,
1130 +dnl the curses.h file would be in an ncurses subdirectory (e.g.,
1131 +dnl /usr/include/ncurses), but someone may have installed overwriting the
1132 +dnl vendor's curses. Only very old versions (pre-1.9.2d, the first autoconf'd
1133 +dnl version) of ncurses don't define either __NCURSES_H or NCURSES_VERSION in
1136 +dnl If the installer has set $CFLAGS or $CPPFLAGS so that the ncurses header
1137 +dnl is already in the include-path, don't even bother with this, since we cannot
1138 +dnl easily determine which file it is. In this case, it has to be <curses.h>.
1140 +dnl The optional parameter gives the root name of the library, in case it is
1141 +dnl not installed as the default curses library. That is how the
1142 +dnl wide-character version of ncurses is installed.
1143 +AC_DEFUN([CF_NCURSES_CPPFLAGS],
1144 +[AC_REQUIRE([CF_WITH_CURSES_DIR])
1146 +AC_PROVIDE([CF_CURSES_CPPFLAGS])dnl
1147 +cf_ncuhdr_root=ifelse($1,,ncurses,$1)
1149 +test -n "$cf_cv_curses_dir" && \
1150 +test "$cf_cv_curses_dir" != "no" && \
1151 +CPPFLAGS="-I$cf_cv_curses_dir/include -I$cf_cv_curses_dir/include/$cf_ncuhdr_root $CPPFLAGS"
1153 +AC_CACHE_CHECK(for $cf_ncuhdr_root header in include-path, cf_cv_ncurses_h,[
1154 + cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
1155 + ( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
1156 + for cf_header in $cf_header_list
1158 + CF_NCURSES_CC_CHECK(cf_cv_ncurses_h,$cf_header,$1)
1159 + test "$cf_cv_ncurses_h" != no && break
1163 +if test "$cf_cv_ncurses_h" != no ; then
1164 + cf_cv_ncurses_header=$cf_cv_ncurses_h
1166 +AC_CACHE_CHECK(for $cf_ncuhdr_root include-path, cf_cv_ncurses_h2,[
1167 + test -n "$verbose" && echo
1168 + CF_HEADER_PATH(cf_search,$cf_ncuhdr_root)
1169 + test -n "$verbose" && echo search path $cf_search
1170 + cf_save2_CPPFLAGS="$CPPFLAGS"
1171 + for cf_incdir in $cf_search
1173 + CF_ADD_INCDIR($cf_incdir)
1174 + for cf_header in \
1178 + CF_NCURSES_CC_CHECK(cf_cv_ncurses_h2,$cf_header,$1)
1179 + if test "$cf_cv_ncurses_h2" != no ; then
1180 + cf_cv_ncurses_h2=$cf_incdir/$cf_header
1181 + test -n "$verbose" && echo $ac_n " ... found $ac_c" 1>&AC_FD_MSG
1184 + test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&AC_FD_MSG
1186 + CPPFLAGS="$cf_save2_CPPFLAGS"
1187 + test "$cf_cv_ncurses_h2" != no && break
1189 + test "$cf_cv_ncurses_h2" = no && AC_ERROR(not found)
1192 + CF_DIRNAME(cf_1st_incdir,$cf_cv_ncurses_h2)
1193 + cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
1194 + if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
1195 + cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
1197 + CF_ADD_INCDIR($cf_1st_incdir)
1202 +AH_TEMPLATE([NCURSES],[Define if you have ncurses])
1203 +AH_TEMPLATE([HAVE_NCURSES_H],[Define if you have ncurses.h])
1204 +AH_TEMPLATE([HAVE_NCURSES_NCURSES_H],[Define if you have ncurses/ncurses.h])
1205 +AH_TEMPLATE([HAVE_NCURSESW_NCURSES_H],[Define if you have ncursesw/ncurses.h])
1208 +case $cf_cv_ncurses_header in # (vi
1210 + AC_DEFINE(HAVE_NCURSES_H)
1214 +case $cf_cv_ncurses_header in # (vi
1215 +ncurses/curses.h|ncurses/ncurses.h)
1216 + AC_DEFINE(HAVE_NCURSES_NCURSES_H)
1218 +ncursesw/curses.h|ncursesw/ncurses.h)
1219 + AC_DEFINE(HAVE_NCURSESW_NCURSES_H)
1225 +dnl ---------------------------------------------------------------------------
1226 +dnl CF_NCURSES_LIBS version: 11 updated: 2002/12/22 14:22:25
1227 +dnl ---------------
1228 +dnl Look for the ncurses library. This is a little complicated on Linux,
1229 +dnl because it may be linked with the gpm (general purpose mouse) library.
1230 +dnl Some distributions have gpm linked with (bsd) curses, which makes it
1231 +dnl unusable with ncurses. However, we don't want to link with gpm unless
1232 +dnl ncurses has a dependency, since gpm is normally set up as a shared library,
1233 +dnl and the linker will record a dependency.
1235 +dnl The optional parameter gives the root name of the library, in case it is
1236 +dnl not installed as the default curses library. That is how the
1237 +dnl wide-character version of ncurses is installed.
1238 +AC_DEFUN([CF_NCURSES_LIBS],
1239 +[AC_REQUIRE([CF_NCURSES_CPPFLAGS])
1241 +cf_nculib_root=ifelse($1,,ncurses,$1)
1242 + # This works, except for the special case where we find gpm, but
1243 + # ncurses is in a nonstandard location via $LIBS, and we really want
1246 +cf_ncurses_SAVE="$LIBS"
1247 +AC_CHECK_LIB(gpm,Gpm_Open,
1248 + [AC_CHECK_LIB(gpm,initscr,
1249 + [LIBS="$cf_ncurses_SAVE"],
1250 + [cf_ncurses_LIBS="-lgpm"])])
1252 +case $host_os in #(vi
1254 + # This is only necessary if you are linking against an obsolete
1255 + # version of ncurses (but it should do no harm, since it's static).
1256 + AC_CHECK_LIB(mytinfo,tgoto,[cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"])
1260 +LIBS="$cf_ncurses_LIBS $LIBS"
1262 +if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
1264 + LIBS="-L$cf_cv_curses_dir/lib -l$cf_nculib_root $LIBS"
1266 + CF_FIND_LIBRARY($cf_nculib_root,$cf_nculib_root,
1267 + [#include <${cf_cv_ncurses_header-curses.h}>],
1272 +if test -n "$cf_ncurses_LIBS" ; then
1273 + AC_MSG_CHECKING(if we can link $cf_nculib_root without $cf_ncurses_LIBS)
1274 + cf_ncurses_SAVE="$LIBS"
1275 + for p in $cf_ncurses_LIBS ; do
1276 + q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
1277 + if test "$q" != "$LIBS" ; then
1281 + AC_TRY_LINK([#include <${cf_cv_ncurses_header-curses.h}>],
1282 + [initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);],
1283 + [AC_MSG_RESULT(yes)],
1284 + [AC_MSG_RESULT(no)
1285 + LIBS="$cf_ncurses_SAVE"])
1288 +CF_UPPER(cf_nculib_ROOT,HAVE_LIB$cf_nculib_root)
1289 +AC_DEFINE_UNQUOTED($cf_nculib_ROOT)
1291 +dnl ---------------------------------------------------------------------------
1292 +dnl CF_NCURSES_VERSION version: 11 updated: 2003/11/06 19:59:57
1293 +dnl ------------------
1294 +dnl Check for the version of ncurses, to aid in reporting bugs, etc.
1295 +dnl Call CF_CURSES_CPPFLAGS first, or CF_NCURSES_CPPFLAGS. We don't use
1296 +dnl AC_REQUIRE since that does not work with the shell's if/then/else/fi.
1297 +AC_DEFUN([CF_NCURSES_VERSION],
1299 +AC_REQUIRE([CF_CURSES_CPPFLAGS])dnl
1300 +AC_CACHE_CHECK(for ncurses version, cf_cv_ncurses_version,[
1301 + cf_cv_ncurses_version=no
1303 + rm -f $cf_tempfile
1305 +#include <${cf_cv_ncurses_header-curses.h}>
1309 + FILE *fp = fopen("$cf_tempfile", "w");
1310 +#ifdef NCURSES_VERSION
1311 +# ifdef NCURSES_VERSION_PATCH
1312 + fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
1314 + fprintf(fp, "%s\n", NCURSES_VERSION);
1317 +# ifdef __NCURSES_H
1318 + fprintf(fp, "old\n");
1325 + cf_cv_ncurses_version=`cat $cf_tempfile`],,[
1327 + # This will not work if the preprocessor splits the line after the
1328 + # Autoconf token. The 'unproto' program does that.
1329 + cat > conftest.$ac_ext <<EOF
1330 +#include <${cf_cv_ncurses_header-curses.h}>
1332 +#ifdef NCURSES_VERSION
1333 +Autoconf NCURSES_VERSION
1341 + cf_try="$ac_cpp conftest.$ac_ext 2>&AC_FD_CC | grep '^Autoconf ' >conftest.out"
1342 + AC_TRY_EVAL(cf_try)
1343 + if test -f conftest.out ; then
1344 + cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[[^"]]*"%%' -e 's%".*%%'`
1345 + test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
1346 + rm -f conftest.out
1349 + rm -f $cf_tempfile
1351 +test "$cf_cv_ncurses_version" = no || AC_DEFINE(NCURSES)
1353 +dnl ---------------------------------------------------------------------------
1354 +dnl CF_OUR_MESSAGES version: 5 updated: 2003/06/16 20:33:11
1355 +dnl ---------------
1356 +dnl Check if we use the messages included with this program
1358 +dnl $1 specifies either Makefile or makefile, defaulting to the former.
1360 +dnl Sets variables which can be used to substitute in makefiles:
1361 +dnl MSG_DIR_MAKE - to make ./po directory
1362 +dnl SUB_MAKEFILE - makefile in ./po directory (see CF_BUNDLED_INTL)
1364 +AC_DEFUN([CF_OUR_MESSAGES],
1366 +cf_makefile=ifelse($1,,Makefile,$1)
1368 +use_our_messages=no
1369 +if test "$USE_NLS" = yes ; then
1370 +if test -d $srcdir/po ; then
1371 +AC_MSG_CHECKING(if we should use included message-library)
1372 + AC_ARG_ENABLE(included-msgs,
1373 + [ --enable-included-msgs use included messages, for i18n support],
1374 + [use_our_messages=$enableval],
1375 + [use_our_messages=yes])
1377 +AC_MSG_RESULT($use_our_messages)
1381 +if test "$use_our_messages" = yes
1383 + SUB_MAKEFILE="$SUB_MAKEFILE $srcdir/po/$cf_makefile.in:$srcdir/po/$cf_makefile.inn"
1387 +AC_SUBST(MSG_DIR_MAKE)
1388 +AC_SUBST(SUB_MAKEFILE)
1390 +dnl ---------------------------------------------------------------------------
1391 +dnl CF_PATHSEP version: 3 updated: 2001/01/12 01:23:53
1393 +dnl Provide a value for the $PATH and similar separator
1394 +AC_DEFUN([CF_PATHSEP],
1396 + case $cf_cv_system_name in
1397 + os2*) PATHSEP=';' ;;
1400 +ifelse($1,,,[$1=$PATHSEP])
1403 +dnl ---------------------------------------------------------------------------
1404 +dnl CF_PATH_SYNTAX version: 9 updated: 2002/09/17 23:03:38
1406 +dnl Check the argument to see that it looks like a pathname. Rewrite it if it
1407 +dnl begins with one of the prefix/exec_prefix variables, and then again if the
1408 +dnl result begins with 'NONE'. This is necessary to work around autoconf's
1409 +dnl delayed evaluation of those symbols.
1410 +AC_DEFUN([CF_PATH_SYNTAX],[
1411 +case ".[$]$1" in #(vi
1412 +.\[$]\(*\)*|.\'*\'*) #(vi
1416 +.[[a-zA-Z]]:[[\\/]]*) #(vi OS/2 EMX
1418 +.\[$]{*prefix}*) #(vi
1420 + case ".[$]$1" in #(vi
1422 + $1=`echo [$]$1 | sed -e s%NONE%$ac_default_prefix%`
1427 + $1=`echo [$]$1 | sed -e s%NONE%$ac_default_prefix%`
1430 + ifelse($2,,[AC_ERROR([expected a pathname, not \"[$]$1\"])],$2)
1434 +dnl ---------------------------------------------------------------------------
1435 +dnl CF_PROG_EXT version: 9 updated: 2003/10/18 16:36:22
1437 +dnl Compute $PROG_EXT, used for non-Unix ports, such as OS/2 EMX.
1438 +AH_TEMPLATE([PROG_EXT],[Set to prog extension])
1439 +AC_DEFUN([CF_PROG_EXT],
1441 +AC_REQUIRE([CF_CHECK_CACHE])
1442 +case $cf_cv_system_name in
1444 + # We make sure -Zexe is not used -- it would interfere with @PROG_EXT@
1445 + CFLAGS="$CFLAGS -Zmt"
1446 + CPPFLAGS="$CPPFLAGS -D__ST_MT_ERRNO__"
1447 + CXXFLAGS="$CXXFLAGS -Zmt"
1448 + LDFLAGS=`echo "$LDFLAGS -Zmt -Zcrtdll" | sed -e "s%-Zexe%%g"`
1457 +test -n "$PROG_EXT" && AC_DEFINE_UNQUOTED(PROG_EXT,"$PROG_EXT")
1459 +dnl ---------------------------------------------------------------------------
1460 +dnl CF_SUBDIR_PATH version: 3 updated: 2002/12/29 18:30:46
1462 +dnl Construct a search-list for a nonstandard header/lib-file
1463 +dnl $1 = the variable to return as result
1464 +dnl $2 = the package name
1465 +dnl $3 = the subdirectory, e.g., bin, include or lib
1466 +AC_DEFUN([CF_SUBDIR_PATH],
1469 +test -d [$]HOME && {
1470 + test -n "$verbose" && echo " ... testing $3-directories under [$]HOME"
1471 + test -d [$]HOME/$3 && $1="[$]$1 [$]HOME/$3"
1472 + test -d [$]HOME/$3/$2 && $1="[$]$1 [$]HOME/$3/$2"
1473 + test -d [$]HOME/$3/$2/$3 && $1="[$]$1 [$]HOME/$3/$2/$3"
1476 +# For other stuff under the home directory, it should be sufficient to put
1477 +# a symbolic link for $HOME/$2 to the actual package location:
1478 +test -d [$]HOME/$2 && {
1479 + test -n "$verbose" && echo " ... testing $3-directories under [$]HOME/$2"
1480 + test -d [$]HOME/$2/$3 && $1="[$]$1 [$]HOME/$2/$3"
1481 + test -d [$]HOME/$2/$3/$2 && $1="[$]$1 [$]HOME/$2/$3/$2"
1484 +test "$prefix" != /usr/local && \
1485 +test -d /usr/local && {
1486 + test -n "$verbose" && echo " ... testing $3-directories under /usr/local"
1487 + test -d /usr/local/$3 && $1="[$]$1 /usr/local/$3"
1488 + test -d /usr/local/$3/$2 && $1="[$]$1 /usr/local/$3/$2"
1489 + test -d /usr/local/$3/$2/$3 && $1="[$]$1 /usr/local/$3/$2/$3"
1490 + test -d /usr/local/$2/$3 && $1="[$]$1 /usr/local/$2/$3"
1491 + test -d /usr/local/$2/$3/$2 && $1="[$]$1 /usr/local/$2/$3/$2"
1494 +test "$prefix" != NONE && \
1495 +test -d $prefix && {
1496 + test -n "$verbose" && echo " ... testing $3-directories under $prefix"
1497 + test -d $prefix/$3 && $1="[$]$1 $prefix/$3"
1498 + test -d $prefix/$3/$2 && $1="[$]$1 $prefix/$3/$2"
1499 + test -d $prefix/$3/$2/$3 && $1="[$]$1 $prefix/$3/$2/$3"
1500 + test -d $prefix/$2/$3 && $1="[$]$1 $prefix/$2/$3"
1501 + test -d $prefix/$2/$3/$2 && $1="[$]$1 $prefix/$2/$3/$2"
1504 +test "$prefix" != /opt && \
1506 + test -n "$verbose" && echo " ... testing $3-directories under /opt"
1507 + test -d /opt/$3 && $1="[$]$1 /opt/$3"
1508 + test -d /opt/$3/$2 && $1="[$]$1 /opt/$3/$2"
1509 + test -d /opt/$3/$2/$3 && $1="[$]$1 /opt/$3/$2/$3"
1510 + test -d /opt/$2/$3 && $1="[$]$1 /opt/$2/$3"
1511 + test -d /opt/$2/$3/$2 && $1="[$]$1 /opt/$2/$3/$2"
1514 +test "$prefix" != /usr && \
1516 + test -n "$verbose" && echo " ... testing $3-directories under /usr"
1517 + test -d /usr/$3 && $1="[$]$1 /usr/$3"
1518 + test -d /usr/$3/$2 && $1="[$]$1 /usr/$3/$2"
1519 + test -d /usr/$3/$2/$3 && $1="[$]$1 /usr/$3/$2/$3"
1520 + test -d /usr/$2/$3 && $1="[$]$1 /usr/$2/$3"
1523 +dnl ---------------------------------------------------------------------------
1524 +dnl CF_SUBST version: 2 updated: 1997/09/06 23:41:28
1526 +dnl Shorthand macro for substituting things that the user may override
1527 +dnl with an environment variable.
1529 +dnl $1 = long/descriptive name
1530 +dnl $2 = environment variable
1531 +dnl $3 = default value
1532 +AC_DEFUN([CF_SUBST],
1533 +[AC_CACHE_VAL(cf_cv_subst_$2,[
1534 +AC_MSG_CHECKING(for $1 (symbol $2))
1535 +test -z "[$]$2" && $2=$3
1536 +AC_MSG_RESULT([$]$2)
1538 +cf_cv_subst_$2=[$]$2])
1539 +$2=${cf_cv_subst_$2}
1541 +dnl ---------------------------------------------------------------------------
1542 +dnl CF_SYSTYPE version: 3 updated: 2001/02/03 00:14:59
1544 +dnl Derive the system-type (our main clue to the method of building shared
1546 +AC_DEFUN([CF_SYSTYPE],
1548 +AC_MSG_CHECKING(for system type)
1549 +AC_CACHE_VAL(cf_cv_systype,[
1550 +AC_ARG_WITH(system-type,
1551 +[ --with-system-type=XXX test: override derived host system-type],
1552 +[cf_cv_systype=$withval],
1554 +cf_cv_systype="`(uname -s || hostname || echo unknown) 2>/dev/null |sed -e s'/[[:\/.-]]/_/'g | sed 1q`"
1555 +if test -z "$cf_cv_systype"; then cf_cv_systype=unknown;fi
1557 +AC_MSG_RESULT($cf_cv_systype)
1559 +dnl ---------------------------------------------------------------------------
1560 +dnl CF_SYS_NAME version: 2 updated: 1997/08/28 23:57:55
1562 +dnl Derive the system name, as a check for reusing the autoconf cache
1563 +AC_DEFUN([CF_SYS_NAME],
1565 +SYS_NAME=`(uname -s -r || uname -a || hostname) 2>/dev/null | sed 1q`
1566 +test -z "$SYS_NAME" && SYS_NAME=unknown
1567 +AC_DEFINE_UNQUOTED(SYS_NAME,"$SYS_NAME")
1569 +AC_CACHE_VAL(cf_cv_system_name,[cf_cv_system_name="$SYS_NAME"])
1571 +if test ".$SYS_NAME" != ".$cf_cv_system_name" ; then
1572 + AC_MSG_RESULT("Cached system name does not agree with actual")
1573 + AC_ERROR("Please remove config.cache and try again.")
1575 +dnl ---------------------------------------------------------------------------
1576 +dnl CF_UNION_WAIT version: 5 updated: 1997/11/23 14:49:44
1578 +dnl Check to see if the BSD-style union wait is declared. Some platforms may
1579 +dnl use this, though it is deprecated in favor of the 'int' type in Posix.
1580 +dnl Some vendors provide a bogus implementation that declares union wait, but
1581 +dnl uses the 'int' type instead; we try to spot these by checking for the
1582 +dnl associated macros.
1584 +dnl Ahem. Some implementers cast the status value to an int*, as an attempt to
1585 +dnl use the macros for either union wait or int. So we do a check compile to
1586 +dnl see if the macros are defined and apply to an int.
1588 +dnl Sets: $cf_cv_type_unionwait
1589 +dnl Defines: HAVE_TYPE_UNIONWAIT
1590 +AH_TEMPLATE([HAVE_TYPE_UNIONWAIT], [Define if BSD-style union wait is declared.])
1591 +AC_DEFUN([CF_UNION_WAIT],
1593 +AC_REQUIRE([CF_WAIT_HEADERS])
1594 +AC_MSG_CHECKING([for union wait])
1595 +AC_CACHE_VAL(cf_cv_type_unionwait,[
1596 + AC_TRY_LINK($cf_wait_headers,
1598 + int y = WEXITSTATUS(x);
1599 + int z = WTERMSIG(x);
1602 + [cf_cv_type_unionwait=no
1603 + echo compiles ok w/o union wait 1>&AC_FD_CC
1605 + AC_TRY_LINK($cf_wait_headers,
1608 + int y = WEXITSTATUS(x);
1611 + int z = WTERMSIG(x);
1615 + [cf_cv_type_unionwait=yes
1616 + echo compiles ok with union wait and possibly macros too 1>&AC_FD_CC
1618 + [cf_cv_type_unionwait=no])])])
1619 +AC_MSG_RESULT($cf_cv_type_unionwait)
1620 +test $cf_cv_type_unionwait = yes && AC_DEFINE(HAVE_TYPE_UNIONWAIT)
1622 +dnl ---------------------------------------------------------------------------
1623 +dnl CF_UPPER version: 5 updated: 2001/01/29 23:40:59
1625 +dnl Make an uppercase version of a variable
1626 +dnl $1=uppercase($2)
1627 +AC_DEFUN([CF_UPPER],
1629 +$1=`echo "$2" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
1631 +dnl ---------------------------------------------------------------------------
1632 +dnl CF_UTF8_LIB version: 4 updated: 2003/03/01 18:36:42
1634 +dnl Check for multibyte support, and if not found, utf8 compatibility library
1635 +AH_TEMPLATE([HAVE_LIBUTF8_H],[Define if we have libutf8.h])
1636 +AC_DEFUN([CF_UTF8_LIB],
1638 +AC_CACHE_CHECK(for multibyte character support,cf_cv_utf8_lib,[
1639 + cf_save_LIBS="$LIBS"
1641 +#include <stdlib.h>],[putwc(0,0);],
1642 + [cf_cv_utf8_lib=yes],
1643 + [LIBS="-lutf8 $LIBS"
1645 +#include <libutf8.h>],[putwc(0,0);],
1646 + [cf_cv_utf8_lib=add-on],
1647 + [cf_cv_utf8_lib=no])
1648 + LIBS="$cf_save_LIBS"
1651 +# HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
1652 +# ncurses/ncursesw:
1653 +if test "$cf_cv_utf8_lib" = "add-on" ; then
1654 + AC_DEFINE(HAVE_LIBUTF8_H)
1655 + LIBS="-lutf8 $LIBS"
1658 +dnl ---------------------------------------------------------------------------
1659 +dnl CF_VERBOSE version: 2 updated: 1997/09/05 10:45:14
1661 +dnl Use AC_VERBOSE w/o the warnings
1662 +AC_DEFUN([CF_VERBOSE],
1663 +[test -n "$verbose" && echo " $1" 1>&AC_FD_MSG
1665 +dnl ---------------------------------------------------------------------------
1666 +dnl CF_VERSION_INFO version: 3 updated: 2003/11/22 12:22:45
1667 +dnl ---------------
1668 +dnl Define several useful symbols derived from the VERSION file. A separate
1669 +dnl file is preferred to embedding the version numbers in various scripts.
1670 +dnl (automake is a textbook-example of why the latter is a bad idea, but there
1673 +dnl The file contents are:
1674 +dnl libtool-version release-version patch-version
1676 +dnl release-version
1678 +dnl libtool-version (see ?) consists of 3 integers separated by '.'
1679 +dnl release-version consists of a major version and minor version
1680 +dnl separated by '.', optionally followed by a patch-version
1681 +dnl separated by '-'. The minor version need not be an
1682 +dnl integer (but it is preferred).
1683 +dnl patch-version is an integer in the form yyyymmdd, so ifdef's and
1684 +dnl scripts can easily compare versions.
1686 +dnl If libtool is used, the first form is required, since CF_WITH_LIBTOOL
1687 +dnl simply extracts the first field using 'cut -f1'.
1688 +AC_DEFUN([CF_VERSION_INFO],
1690 +if test -f $srcdir/VERSION ; then
1691 + AC_MSG_CHECKING(for package version)
1693 + # if there are not enough fields, cut returns the last one...
1694 + cf_field1=`sed -e '2,$d' $srcdir/VERSION|cut -f1`
1695 + cf_field2=`sed -e '2,$d' $srcdir/VERSION|cut -f2`
1696 + cf_field3=`sed -e '2,$d' $srcdir/VERSION|cut -f3`
1698 + # this is how CF_BUNDLED_INTL uses $VERSION:
1699 + VERSION="$cf_field1"
1701 + VERSION_MAJOR=`echo "$cf_field2" | sed -e 's/\..*//'`
1702 + test -z "$VERSION_MAJOR" && AC_MSG_ERROR(missing major-version)
1704 + VERSION_MINOR=`echo "$cf_field2" | sed -e 's/^[[^.]]*\.//' -e 's/-.*//'`
1705 + test -z "$VERSION_MINOR" && AC_MSG_ERROR(missing minor-version)
1707 + AC_MSG_RESULT(${VERSION_MAJOR}.${VERSION_MINOR})
1709 + AC_MSG_CHECKING(for package patch date)
1710 + VERSION_PATCH=`echo "$cf_field3" | sed -e 's/^[[^-]]*-//'`
1711 + case .$VERSION_PATCH in
1713 + AC_MSG_ERROR(missing patch-date $VERSION_PATCH)
1715 + .[[0-9]][[0-9]][[0-9]][[0-9]][[0-9]][[0-9]][[0-9]][[0-9]])
1718 + AC_MSG_ERROR(illegal patch-date $VERSION_PATCH)
1721 + AC_MSG_RESULT($VERSION_PATCH)
1723 + AC_MSG_ERROR(did not find $srcdir/VERSION)
1726 +# show the actual data that we have for versions:
1727 +CF_VERBOSE(VERSION $VERSION)
1728 +CF_VERBOSE(VERSION_MAJOR $VERSION_MAJOR)
1729 +CF_VERBOSE(VERSION_MINOR $VERSION_MINOR)
1730 +CF_VERBOSE(VERSION_PATCH $VERSION_PATCH)
1733 +AC_SUBST(VERSION_MAJOR)
1734 +AC_SUBST(VERSION_MINOR)
1735 +AC_SUBST(VERSION_PATCH)
1737 +dnl if a package name is given, define its corresponding version info. We
1738 +dnl need the package name to ensure that the defined symbols are unique.
1741 + AH_TEMPLATE([PACKAGE],[Define to package name])
1742 + AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE")
1744 + CF_UPPER(cf_PACKAGE,$PACKAGE)
1745 + AC_DEFINE_UNQUOTED(${cf_PACKAGE}_VERSION,"${VERSION_MAJOR}.${VERSION_MINOR}")
1746 + AC_DEFINE_UNQUOTED(${cf_PACKAGE}_PATCHDATE,${VERSION_PATCH})
1749 +dnl ---------------------------------------------------------------------------
1750 +dnl CF_WAIT_HEADERS version: 2 updated: 1997/10/21 19:45:33
1751 +dnl ---------------
1752 +dnl Build up an expression $cf_wait_headers with the header files needed to
1753 +dnl compile against the prototypes for 'wait()', 'waitpid()', etc. Assume it's
1754 +dnl Posix, which uses <sys/types.h> and <sys/wait.h>, but allow SVr4 variation
1756 +AC_DEFUN([CF_WAIT_HEADERS],
1758 +AC_HAVE_HEADERS(sys/wait.h)
1759 +cf_wait_headers="#include <sys/types.h>
1761 +if test $ac_cv_header_sys_wait_h = yes; then
1762 +cf_wait_headers="$cf_wait_headers
1763 +#include <sys/wait.h>
1766 +AC_HAVE_HEADERS(wait.h)
1767 +AC_HAVE_HEADERS(waitstatus.h)
1768 +if test $ac_cv_header_wait_h = yes; then
1769 +cf_wait_headers="$cf_wait_headers
1773 +if test $ac_cv_header_waitstatus_h = yes; then
1774 +cf_wait_headers="$cf_wait_headers
1775 +#include <waitstatus.h>
1780 +dnl ---------------------------------------------------------------------------
1781 +dnl CF_WITH_CURSES_DIR version: 2 updated: 2002/11/10 14:46:59
1782 +dnl ------------------
1783 +dnl Wrapper for AC_ARG_WITH to specify directory under which to look for curses
1785 +AC_DEFUN([CF_WITH_CURSES_DIR],[
1786 +AC_ARG_WITH(curses-dir,
1787 + [ --with-curses-dir=DIR directory in which (n)curses is installed],
1788 + [CF_PATH_SYNTAX(withval)
1789 + cf_cv_curses_dir=$withval],
1790 + [cf_cv_curses_dir=no])
1792 +dnl ---------------------------------------------------------------------------
1793 +dnl CF_WITH_DBMALLOC version: 2 updated: 2002/12/29 21:11:45
1794 +dnl ----------------
1795 +dnl Configure-option for dbmalloc
1796 +AC_DEFUN([CF_WITH_DBMALLOC],[
1797 +AC_MSG_CHECKING(if you want to link with dbmalloc for testing)
1798 +AC_ARG_WITH(dbmalloc,
1799 + [ --with-dbmalloc test: use Conor Cahill's dbmalloc library],
1800 + [with_dbmalloc=$withval],
1801 + [with_dbmalloc=no])
1802 +AC_MSG_RESULT($with_dbmalloc)
1803 +if test $with_dbmalloc = yes ; then
1804 + AC_CHECK_LIB(dbmalloc,debug_malloc)
1807 +dnl ---------------------------------------------------------------------------
1808 +dnl CF_WITH_DMALLOC version: 2 updated: 2002/12/29 21:11:45
1809 +dnl ---------------
1810 +dnl Configure-option for dmalloc
1811 +AC_DEFUN([CF_WITH_DMALLOC],[
1812 +AC_MSG_CHECKING(if you want to link with dmalloc for testing)
1813 +AC_ARG_WITH(dmalloc,
1814 + [ --with-dmalloc test: use Gray Watson's dmalloc library],
1815 + [with_dmalloc=$withval],
1816 + [with_dmalloc=no])
1817 +AC_MSG_RESULT($with_dmalloc)
1818 +if test $with_dmalloc = yes ; then
1819 + AC_CHECK_LIB(dmalloc,dmalloc_debug)
1822 +dnl ---------------------------------------------------------------------------
1823 +dnl CF_WITH_LIBTOOL version: 8 updated: 2003/09/06 19:15:56
1824 +dnl ---------------
1825 +dnl Provide a configure option to incorporate libtool. Define several useful
1826 +dnl symbols for the makefile rules.
1827 +AC_DEFUN([CF_WITH_LIBTOOL],
1831 +# common library maintenance symbols that are convenient for libtool scripts:
1832 +LIB_CREATE='$(AR) -cr'
1833 +LIB_OBJECT='$(OBJECTS)'
1837 +# symbols used to prop libtool up to enable it to determine what it should be
1845 +AC_MSG_CHECKING(if you want to build libraries with libtool)
1846 +AC_ARG_WITH(libtool,
1847 + [ --with-libtool generate libraries with libtool],
1848 + [with_libtool=$withval],
1849 + [with_libtool=no])
1850 +AC_MSG_RESULT($with_libtool)
1851 +if test "$with_libtool" != "no"; then
1852 + if test "$with_libtool" != "yes" ; then
1853 + CF_PATH_SYNTAX(with_libtool)
1854 + LIBTOOL=$with_libtool
1856 + AC_PATH_PROG(LIBTOOL,libtool)
1858 + if test -z "$LIBTOOL" ; then
1859 + AC_MSG_ERROR(Cannot find libtool)
1862 + LIB_CREATE='$(LIBTOOL) --mode=link $(CC) -rpath $(DESTDIR)$(libdir) -version-info `cut -f1 $(srcdir)/VERSION` -o'
1863 + LIB_OBJECT='$(OBJECTS:.o=.lo)'
1865 + LIB_CLEAN='$(LIBTOOL) --mode=clean'
1866 + LIB_COMPILE='$(LIBTOOL) --mode=compile'
1867 + LIB_LINK='$(LIBTOOL) --mode=link'
1868 + LIB_INSTALL='$(LIBTOOL) --mode=install'
1869 + LIB_UNINSTALL='$(LIBTOOL) --mode=uninstall'
1872 + # Show the version of libtool
1873 + AC_MSG_CHECKING(version of libtool)
1875 + # Save the version in a cache variable - this is not entirely a good
1876 + # thing, but the version string from libtool is very ugly, and for
1877 + # bug reports it might be useful to have the original string.
1878 + cf_cv_libtool_version=`$LIBTOOL --version 2>&1 | sed -e '2,$d' -e 's/^[[^1-9]]*//' -e 's/[[^0-9.]].*//'`
1879 + AC_MSG_RESULT($cf_cv_libtool_version)
1880 + if test -z "$cf_cv_libtool_version" ; then
1881 + AC_MSG_ERROR(This is not libtool)
1884 + # special hack to add --tag option for C++ compiler
1885 + case $cf_cv_libtool_version in
1886 + 1.[[5-9]]*|[[2-9]]*)
1887 + LIBTOOL_CXX="$LIBTOOL --tag=CXX"
1890 + LIBTOOL_CXX="$LIBTOOL"
1898 +test -z "$LIBTOOL" && ECHO_LT=
1901 +AC_SUBST(LIBTOOL_CXX)
1903 +AC_SUBST(LIB_CREATE)
1904 +AC_SUBST(LIB_OBJECT)
1905 +AC_SUBST(LIB_SUFFIX)
1908 +AC_SUBST(LIB_CLEAN)
1909 +AC_SUBST(LIB_COMPILE)
1911 +AC_SUBST(LIB_INSTALL)
1912 +AC_SUBST(LIB_UNINSTALL)
1915 +dnl ---------------------------------------------------------------------------
1916 +dnl CF_XOPEN_CURSES version: 8 updated: 2003/11/07 19:47:46
1917 +dnl ---------------
1918 +dnl Test if we should define X/Open source for curses, needed on Digital Unix
1919 +dnl 4.x, to see the extended functions, but breaks on IRIX 6.x.
1921 +dnl The getbegyx() check is needed for HPUX, which omits legacy macros such
1922 +dnl as getbegy(). The latter is better design, but the former is standard.
1923 +AC_DEFUN([CF_XOPEN_CURSES],
1925 +AC_REQUIRE([CF_CURSES_CPPFLAGS])dnl
1926 +AC_CACHE_CHECK(if we must define _XOPEN_SOURCE_EXTENDED,cf_cv_need_xopen_extension,[
1928 +#include <stdlib.h>
1929 +#include <${cf_cv_ncurses_header-curses.h}>],[
1930 + long x = winnstr(stdscr, "", 0);
1932 + getbegyx(stdscr, y1, x1)],
1933 + [cf_cv_need_xopen_extension=no],
1935 +#define _XOPEN_SOURCE_EXTENDED
1936 +#include <stdlib.h>
1937 +#include <${cf_cv_ncurses_header-curses.h}>],[
1938 + long x = winnstr(stdscr, "", 0);
1940 + getbegyx(stdscr, y1, x1)],
1941 + [cf_cv_need_xopen_extension=yes],
1942 + [cf_cv_need_xopen_extension=unknown])])])
1943 +test $cf_cv_need_xopen_extension = yes && CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
1945 +dnl ---------------------------------------------------------------------------
1946 +dnl CF_XOPEN_SOURCE version: 2 updated: 2003/11/26 19:29:42
1947 +dnl ---------------
1948 +dnl Try to get _XOPEN_SOURCE defined properly that we can use POSIX functions.
1949 +AC_DEFUN([CF_XOPEN_SOURCE],[
1950 +case $host_os in #(vi
1952 + CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE"
1958 + CPPFLAGS="$CPPFLAGS -D_OSF_SOURCE"
1964 Index: dialog-1.0-20050306/aclocal.m4
1965 ===================================================================
1966 --- dialog-1.0-20050306.orig/aclocal.m4 2005-02-07 00:03:26.000000000 +0100
1967 +++ dialog-1.0-20050306/aclocal.m4 2005-05-16 01:35:48.000000000 +0200
1969 -dnl macros used for DIALOG configure script
1970 -dnl -- Thomas E. Dickey
1971 -dnl $Id: aclocal.m4,v 1.47 2005/02/06 23:03:26 tom Exp $
1972 -dnl ---------------------------------------------------------------------------
1973 -dnl ---------------------------------------------------------------------------
1974 -dnl AM_GNU_GETTEXT version: 11 updated: 2004/01/26 20:58:40
1976 -dnl Usage: Just like AM_WITH_NLS, which see.
1977 -AC_DEFUN([AM_GNU_GETTEXT],
1978 - [AC_REQUIRE([AC_PROG_MAKE_SET])dnl
1979 - AC_REQUIRE([AC_PROG_CC])dnl
1980 - AC_REQUIRE([AC_CANONICAL_HOST])dnl
1981 - AC_REQUIRE([AC_PROG_RANLIB])dnl
1982 - AC_REQUIRE([AC_ISC_POSIX])dnl
1983 - AC_REQUIRE([AC_HEADER_STDC])dnl
1984 - AC_REQUIRE([AC_C_CONST])dnl
1985 - AC_REQUIRE([AC_C_INLINE])dnl
1986 - AC_REQUIRE([AC_TYPE_OFF_T])dnl
1987 - AC_REQUIRE([AC_TYPE_SIZE_T])dnl
1988 - AC_REQUIRE([AC_FUNC_ALLOCA])dnl
1989 - AC_REQUIRE([AC_FUNC_MMAP])dnl
1990 - AC_REQUIRE([jm_GLIBC21])dnl
1992 - AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h stddef.h \
1993 -stdlib.h string.h unistd.h sys/param.h])
1994 - AC_CHECK_FUNCS([feof_unlocked fgets_unlocked getcwd getegid geteuid \
1995 -getgid getuid mempcpy munmap putenv setenv setlocale stpcpy strchr strcasecmp \
1996 -strdup strtoul tsearch __argz_count __argz_stringify __argz_next])
1999 - AM_LANGINFO_CODESET
2001 - AM_WITH_NLS([$1],[$2],[$3],[$4])
2003 - if test "x$CATOBJEXT" != "x"; then
2004 - if test "x$ALL_LINGUAS" = "x"; then
2007 - AC_MSG_CHECKING(for catalogs to be installed)
2009 - for presentlang in $ALL_LINGUAS; do
2011 - for desiredlang in ${LINGUAS-$ALL_LINGUAS}; do
2012 - # Use the presentlang catalog if desiredlang is
2013 - # a. equal to presentlang, or
2014 - # b. a variant of presentlang (because in this case,
2015 - # presentlang can be used as a fallback for messages
2016 - # which are not translated in the desiredlang catalog).
2017 - case "$desiredlang" in
2018 - "$presentlang"*) useit=yes;;
2021 - if test $useit = yes; then
2022 - NEW_LINGUAS="$NEW_LINGUAS $presentlang"
2025 - LINGUAS=$NEW_LINGUAS
2026 - AC_MSG_RESULT($LINGUAS)
2029 - dnl Construct list of names of catalog files to be constructed.
2030 - if test -n "$LINGUAS"; then
2031 - for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
2035 - dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
2036 - dnl find the mkinstalldirs script in another subdir but ($top_srcdir).
2037 - dnl Try to locate it.
2038 - dnl changed mkinstalldirs to mkdirs.sh for Lynx /je spath 1998-Aug-21
2039 - dnl added check for separate locations of scripts -mirabile 2004-Jan-18
2041 - if test -n "$ac_aux_dir"; then
2042 - MKINSTALLDIRS="$ac_aux_dir/mkdirs.sh"
2044 - if test -z "$MKINSTALLDIRS"; then
2045 - MKINSTALLDIRS="\$(top_srcdir)/mkdirs.sh"
2047 - if test -n "$GNUSYSTEM_AUX_DIR" ; then
2048 - if test -e "${GNUSYSTEM_AUX_DIR}/mkinstalldirs"; then
2049 - MKINSTALLDIRS="${GNUSYSTEM_AUX_DIR}/mkinstalldirs"
2052 - AC_SUBST(MKINSTALLDIRS)
2054 - dnl Enable libtool support if the surrounding package wishes it.
2055 - INTL_LIBTOOL_SUFFIX_PREFIX=ifelse([$1], use-libtool, [l], [])
2056 - AC_SUBST(INTL_LIBTOOL_SUFFIX_PREFIX)
2058 -dnl ---------------------------------------------------------------------------
2059 -dnl AM_ICONV version: 3 updated: 2002/10/27 23:21:42
2061 -dnl Inserted as requested by gettext 0.10.40
2062 -dnl File from /usr/share/aclocal
2064 -dnl ====================
2067 -dnl From Bruno Haible.
2068 -AC_DEFUN([AM_ICONV],
2070 - dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and
2071 - dnl those with the standalone portable GNU libiconv installed).
2072 + # generated automatically by aclocal 1.7.7 -*- Autoconf -*-
2074 - AC_ARG_WITH([libiconv-prefix],
2075 -[ --with-libiconv-prefix=DIR search for libiconv in DIR/include and DIR/lib], [
2076 - for dir in `echo "$withval" | tr : ' '`; do
2077 - if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi
2078 - if test -d $dir/lib; then LDFLAGS="$LDFLAGS -L$dir/lib"; fi
2081 + # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002
2082 + # Free Software Foundation, Inc.
2083 + # This file is free software; the Free Software Foundation
2084 + # gives unlimited permission to copy and/or distribute it,
2085 + # with or without modifications, as long as this notice is preserved.
2087 + # This program is distributed in the hope that it will be useful,
2088 + # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
2089 + # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
2090 + # PARTICULAR PURPOSE.
2092 - AC_CACHE_CHECK(for iconv, am_cv_func_iconv, [
2093 - am_cv_func_iconv="no, consider installing GNU libiconv"
2094 - am_cv_lib_iconv=no
2095 - AC_TRY_LINK([#include <stdlib.h>
2096 -#include <iconv.h>],
2097 - [iconv_t cd = iconv_open("","");
2098 - iconv(cd,NULL,NULL,NULL,NULL);
2099 - iconv_close(cd);],
2100 - am_cv_func_iconv=yes)
2101 - if test "$am_cv_func_iconv" != yes; then
2102 - am_save_LIBS="$LIBS"
2103 - LIBS="$LIBS -liconv"
2104 - AC_TRY_LINK([#include <stdlib.h>
2105 -#include <iconv.h>],
2106 - [iconv_t cd = iconv_open("","");
2107 - iconv(cd,NULL,NULL,NULL,NULL);
2108 - iconv_close(cd);],
2109 - am_cv_lib_iconv=yes
2110 - am_cv_func_iconv=yes)
2111 - LIBS="$am_save_LIBS"
2114 - if test "$am_cv_func_iconv" = yes; then
2115 - AC_DEFINE(HAVE_ICONV, 1, [Define if you have the iconv() function.])
2116 - AC_MSG_CHECKING([for iconv declaration])
2117 - AC_CACHE_VAL(am_cv_proto_iconv, [
2119 -#include <stdlib.h>
2125 -#if defined(__STDC__) || defined(__cplusplus)
2126 -size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
2130 -], [], am_cv_proto_iconv_arg1="", am_cv_proto_iconv_arg1="const")
2131 - am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"])
2132 - am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
2133 - AC_MSG_RESULT([$]{ac_t:-
2134 - }[$]am_cv_proto_iconv)
2135 - AC_DEFINE_UNQUOTED(ICONV_CONST, $am_cv_proto_iconv_arg1,
2136 - [Define as const if the declaration of iconv() needs const.])
2139 - if test "$am_cv_lib_iconv" = yes; then
2140 - LIBICONV="-liconv"
2142 - AC_SUBST(LIBICONV)
2144 dnl ---------------------------------------------------------------------------
2145 -dnl AM_LANGINFO_CODESET version: 3 updated: 2002/10/27 23:21:42
2146 -dnl -------------------
2147 -dnl Inserted as requested by gettext 0.10.40
2148 -dnl File from /usr/share/aclocal
2150 -dnl ====================
2153 -dnl From Bruno Haible.
2154 -AC_DEFUN([AM_LANGINFO_CODESET],
2155 +dnl CF_AC_PREREQ version: 2 updated: 1997/09/06 13:24:56
2157 +dnl Conditionally generate script according to whether we're using the release
2158 +dnl version of autoconf, or a patched version (using the ternary component as
2159 +dnl the patch-version).
2160 +define(CF_AC_PREREQ,
2161 +[CF_PREREQ_COMPARE(
2162 +AC_PREREQ_CANON(AC_PREREQ_SPLIT(AC_ACVERSION)),
2163 +AC_PREREQ_CANON(AC_PREREQ_SPLIT([$1])), [$1], [$2], [$3])])dnl
2164 +dnl ---------------------------------------------------------------------------
2165 +dnl CF_ADD_INCDIR version: 4 updated: 2002/12/21 14:25:52
2167 +dnl Add an include-directory to $CPPFLAGS. Don't add /usr/include, since it's
2168 +dnl redundant. We don't normally need to add -I/usr/local/include for gcc,
2169 +dnl but old versions (and some misinstalled ones) need that. To make things
2170 +dnl worse, gcc 3.x gives error messages if -I/usr/local/include is added to
2171 +dnl the include-path).
2172 +AC_DEFUN([CF_ADD_INCDIR],
2174 - AC_CACHE_CHECK([for nl_langinfo and CODESET], am_cv_langinfo_codeset,
2175 - [AC_TRY_LINK([#include <langinfo.h>],
2176 - [char* cs = nl_langinfo(CODESET);],
2177 - am_cv_langinfo_codeset=yes,
2178 - am_cv_langinfo_codeset=no)
2180 - if test $am_cv_langinfo_codeset = yes; then
2181 - AC_DEFINE(HAVE_LANGINFO_CODESET, 1,
2182 - [Define if you have <langinfo.h> and nl_langinfo(CODESET).])
2184 +for cf_add_incdir in $1
2188 + case $cf_add_incdir in
2189 + /usr/include) # (vi
2191 + /usr/local/include) # (vi
2192 + if test "$GCC" = yes
2194 + cf_save_CPPFLAGS="$CPPFLAGS"
2195 + CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
2196 + AC_TRY_COMPILE([#include <stdio.h>],
2197 + [printf("Hello")],
2199 + [CPPFLAGS="$cf_save_CPPFLAGS"])
2203 + CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
2206 + cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
2207 + test "$cf_top_incdir" = "$cf_add_incdir" && break
2208 + cf_add_incdir="$cf_top_incdir"
2212 dnl ---------------------------------------------------------------------------
2213 -dnl AM_LC_MESSAGES version: 4 updated: 2002/10/27 23:21:42
2214 +dnl CF_ARG_DISABLE version: 3 updated: 1999/03/30 17:24:31
2216 -dnl Inserted as requested by gettext 0.10.40
2217 -dnl File from /usr/share/aclocal
2219 -dnl ====================
2220 -dnl Check whether LC_MESSAGES is available in <locale.h>.
2221 -dnl Ulrich Drepper <drepper@cygnus.com>, 1995.
2223 -dnl This file can be copied and used freely without restrictions. It can
2224 -dnl be used in projects which are not available under the GNU General Public
2225 -dnl License or the GNU Library General Public License but which still want
2226 -dnl to provide support for the GNU gettext functionality.
2227 -dnl Please note that the actual code of the GNU gettext library is covered
2228 -dnl by the GNU Library General Public License, and the rest of the GNU
2229 -dnl gettext package package is covered by the GNU General Public License.
2230 -dnl They are *not* in the public domain.
2234 -AC_DEFUN([AM_LC_MESSAGES],
2235 - [if test $ac_cv_header_locale_h = yes; then
2236 - AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
2237 - [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
2238 - am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
2239 - if test $am_cv_val_LC_MESSAGES = yes; then
2240 - AC_DEFINE(HAVE_LC_MESSAGES, 1,
2241 - [Define if your <locale.h> file defines LC_MESSAGES.])
2244 +dnl Allow user to disable a normally-on option.
2245 +AC_DEFUN([CF_ARG_DISABLE],
2246 +[CF_ARG_OPTION($1,[$2],[$3],[$4],yes)])dnl
2247 dnl ---------------------------------------------------------------------------
2248 -dnl AM_PATH_PROG_WITH_TEST version: 5 updated: 2002/10/27 23:21:42
2249 -dnl ----------------------
2250 -dnl Inserted as requested by gettext 0.10.40
2251 -dnl File from /usr/share/aclocal
2253 -dnl ====================
2254 -dnl Search path for a program which passes the given test.
2255 -dnl Ulrich Drepper <drepper@cygnus.com>, 1996.
2257 -dnl This file can be copied and used freely without restrictions. It can
2258 -dnl be used in projects which are not available under the GNU General Public
2259 -dnl License or the GNU Library General Public License but which still want
2260 -dnl to provide support for the GNU gettext functionality.
2261 -dnl Please note that the actual code of the GNU gettext library is covered
2262 -dnl by the GNU Library General Public License, and the rest of the GNU
2263 -dnl gettext package package is covered by the GNU General Public License.
2264 -dnl They are *not* in the public domain.
2267 +dnl CF_ARG_ENABLE version: 3 updated: 1999/03/30 17:24:31
2269 +dnl Allow user to enable a normally-off option.
2270 +AC_DEFUN([CF_ARG_ENABLE],
2271 +[CF_ARG_OPTION($1,[$2],[$3],[$4],no)])dnl
2272 +dnl ---------------------------------------------------------------------------
2273 +dnl CF_ARG_MSG_ENABLE version: 2 updated: 2000/07/29 19:32:03
2274 +dnl -----------------
2275 +dnl Verbose form of AC_ARG_ENABLE:
2277 -dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
2278 -dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
2279 -AC_DEFUN([AM_PATH_PROG_WITH_TEST],
2280 -[# Extract the first word of "$2", so it can be a program name with args.
2281 -AC_REQUIRE([CF_PATHSEP])
2282 -set dummy $2; ac_word=[$]2
2283 -AC_MSG_CHECKING([for $ac_word])
2284 -AC_CACHE_VAL(ac_cv_path_$1,
2287 - ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
2290 - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATHSEP}"
2291 - for ac_dir in ifelse([$5], , $PATH, [$5]); do
2292 - test -z "$ac_dir" && ac_dir=.
2293 - if test -f $ac_dir/$ac_word; then
2295 - ac_cv_path_$1="$ac_dir/$ac_word"
2300 - IFS="$ac_save_ifs"
2301 -dnl If no 4th arg is given, leave the cache variable unset,
2302 -dnl so AC_PATH_PROGS will keep looking.
2303 -ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
2307 -$1="$ac_cv_path_$1"
2308 -if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
2309 - AC_MSG_RESULT([$]$1)
2312 +dnl $2 = option name
2313 +dnl $3 = help-string
2314 +dnl $4 = action to perform if option is enabled
2315 +dnl $5 = action if perform if option is disabled
2316 +dnl $6 = default option value (either 'yes' or 'no')
2317 +AC_DEFUN([CF_ARG_MSG_ENABLE],[
2318 +AC_MSG_CHECKING($1)
2319 +AC_ARG_ENABLE($2,[$3],,enableval=ifelse($6,,no,$6))
2320 +AC_MSG_RESULT($enableval)
2321 +if test "$enableval" != no ; then
2322 +ifelse($4,,[ :],$4)
2325 +ifelse($5,,[ :],$5)
2329 dnl ---------------------------------------------------------------------------
2330 -dnl AM_WITH_NLS version: 17 updated: 2004/01/23 19:52:21
2332 -dnl Inserted as requested by gettext 0.10.40
2333 -dnl File from /usr/share/aclocal
2335 -dnl ====================
2336 -dnl Macro to add for using GNU gettext.
2337 -dnl Ulrich Drepper <drepper@cygnus.com>, 1995.
2338 +dnl CF_ARG_OPTION version: 3 updated: 1997/10/18 14:42:41
2340 +dnl Restricted form of AC_ARG_ENABLE that ensures user doesn't give bogus
2343 -dnl This file can be copied and used freely without restrictions. It can
2344 -dnl be used in projects which are not available under the GNU General Public
2345 -dnl License or the GNU Library General Public License but which still want
2346 -dnl to provide support for the GNU gettext functionality.
2347 -dnl Please note that the actual code of the GNU gettext library is covered
2348 -dnl by the GNU Library General Public License, and the rest of the GNU
2349 -dnl gettext package package is covered by the GNU General Public License.
2350 -dnl They are *not* in the public domain.
2352 +dnl $1 = option name
2353 +dnl $2 = help-string
2354 +dnl $3 = action to perform if option is not default
2355 +dnl $4 = action if perform if option is default
2356 +dnl $5 = default option value (either 'yes' or 'no')
2357 +AC_DEFUN([CF_ARG_OPTION],
2358 +[AC_ARG_ENABLE($1,[$2],[test "$enableval" != ifelse($5,no,yes,no) && enableval=ifelse($5,no,no,yes)
2359 + if test "$enableval" != "$5" ; then
2361 +,[ $3]) ifelse($4,,,[
2364 + fi],[enableval=$5 ifelse($4,,,[
2368 +dnl ---------------------------------------------------------------------------
2369 +dnl CF_BUNDLED_INTL version: 11 updated: 2004/09/12 19:45:55
2370 +dnl ---------------
2371 +dnl Top-level macro for configuring an application with a bundled copy of
2372 +dnl the intl and po directories for gettext.
2375 +dnl $1 specifies either Makefile or makefile, defaulting to the former.
2376 +dnl $2 if nonempty sets the option to --enable-nls rather than to --disable-nls
2378 -dnl Usage: AM_WITH_NLS([TOOLSYMBOL], [NEEDSYMBOL], [LIBDIR], [ENABLED]).
2379 -dnl If TOOLSYMBOL is specified and is 'use-libtool', then a libtool library
2380 -dnl $(top_builddir)/intl/libintl.la will be created (shared and/or static,
2381 -dnl depending on --{enable,disable}-{shared,static} and on the presence of
2382 -dnl AM-DISABLE-SHARED). Otherwise, a static library
2383 -dnl $(top_builddir)/intl/libintl.a will be created.
2384 -dnl If NEEDSYMBOL is specified and is 'need-ngettext', then GNU gettext
2385 -dnl implementations (in libc or libintl) without the ngettext() function
2386 -dnl will be ignored.
2387 -dnl LIBDIR is used to find the intl libraries. If empty,
2388 -dnl the value `$(top_builddir)/intl/' is used.
2389 -dnl ENABLED is used to control the default for the related --enable-nls, since
2390 -dnl not all application developers want this feature by default, e.g., lynx.
2392 -dnl The result of the configuration is one of three cases:
2393 -dnl 1) GNU gettext, as included in the intl subdirectory, will be compiled
2395 -dnl Catalog format: GNU --> install in $(datadir)
2396 -dnl Catalog extension: .mo after installation, .gmo in source tree
2397 -dnl 2) GNU gettext has been found in the system's C library.
2398 -dnl Catalog format: GNU --> install in $(datadir)
2399 -dnl Catalog extension: .mo after installation, .gmo in source tree
2400 -dnl 3) No internationalization, always use English msgid.
2401 -dnl Catalog format: none
2402 -dnl Catalog extension: none
2403 -dnl The use of .gmo is historical (it was needed to avoid overwriting the
2404 -dnl GNU format catalogs when building on a platform with an X/Open gettext),
2405 -dnl but we keep it in order not to force irrelevant filename changes on the
2408 -AC_DEFUN([AM_WITH_NLS],
2409 - [AC_MSG_CHECKING([whether NLS is requested])
2410 - dnl Default is enabled NLS
2412 - AC_ARG_ENABLE(nls,
2413 - [ --disable-nls do not use Native Language Support],
2414 - USE_NLS=$enableval, USE_NLS=yes)],[
2415 - AC_ARG_ENABLE(nls,
2416 - [ --enable-nls use Native Language Support],
2417 - USE_NLS=$enableval, USE_NLS=no)])
2418 - AC_MSG_RESULT($USE_NLS)
2421 - BUILD_INCLUDED_LIBINTL=no
2422 - USE_INCLUDED_LIBINTL=no
2425 - dnl If we use NLS figure out what method
2426 - if test "$USE_NLS" = "yes"; then
2427 - AC_DEFINE(ENABLE_NLS, 1,
2428 - [Define to 1 if translation of program messages to the user's native language
2430 - AC_MSG_CHECKING([whether included gettext is requested])
2431 - AC_ARG_WITH(included-gettext,
2432 - [ --with-included-gettext use the GNU gettext library included here],
2433 - nls_cv_force_use_gnu_gettext=$withval,
2434 - nls_cv_force_use_gnu_gettext=no)
2435 - AC_MSG_RESULT($nls_cv_force_use_gnu_gettext)
2437 - nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
2438 - if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
2439 - dnl User does not insist on using GNU NLS library. Figure out what
2440 - dnl to use. If GNU gettext is available we use this. Else we have
2441 - dnl to fall back to GNU NLS library.
2444 - dnl Add a version number to the cache macros.
2445 - define(gt_cv_func_gnugettext_libc, [gt_cv_func_gnugettext]ifelse([$2], need-ngettext, 2, 1)[_libc])
2446 - define(gt_cv_func_gnugettext_libintl, [gt_cv_func_gnugettext]ifelse([$2], need-ngettext, 2, 1)[_libintl])
2448 - AC_CHECK_HEADER(libintl.h,
2449 - [AC_CACHE_CHECK([for GNU gettext in libc], gt_cv_func_gnugettext_libc,
2450 - [AC_TRY_LINK([#include <libintl.h>
2451 -extern int _nl_msg_cat_cntr;],
2452 - [bindtextdomain ("", "");
2453 -return (int) gettext ("")]ifelse([$2], need-ngettext, [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr],
2454 - gt_cv_func_gnugettext_libc=yes,
2455 - gt_cv_func_gnugettext_libc=no)])
2457 - if test "$gt_cv_func_gnugettext_libc" != "yes"; then
2458 - AC_CACHE_CHECK([for GNU gettext in libintl],
2459 - gt_cv_func_gnugettext_libintl,
2460 - [gt_save_LIBS="$LIBS"
2461 - LIBS="$LIBS -lintl $LIBICONV"
2462 - AC_TRY_LINK([#include <libintl.h>
2463 -extern int _nl_msg_cat_cntr;],
2464 - [bindtextdomain ("", "");
2465 -return (int) gettext ("")]ifelse([$2], need-ngettext, [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr],
2466 - gt_cv_func_gnugettext_libintl=yes,
2467 - gt_cv_func_gnugettext_libintl=no)
2468 - LIBS="$gt_save_LIBS"])
2471 - dnl If an already present or preinstalled GNU gettext() is found,
2472 - dnl use it. But if this macro is used in GNU gettext, and GNU
2473 - dnl gettext is already preinstalled in libintl, we update this
2474 - dnl libintl. (Cf. the install rule in intl/Makefile.in.)
2475 - if test "$gt_cv_func_gnugettext_libc" = "yes" \
2476 - || { test "$gt_cv_func_gnugettext_libintl" = "yes" \
2477 - && test "$PACKAGE" != gettext; }; then
2478 - AC_DEFINE(HAVE_GETTEXT, 1,
2479 - [Define if the GNU gettext() function is already present or preinstalled.])
2481 - if test "$gt_cv_func_gnugettext_libintl" = "yes"; then
2482 - dnl If iconv() is in a separate libiconv library, then anyone
2483 - dnl linking with libintl{.a,.so} also needs to link with
2485 - INTLLIBS="-lintl $LIBICONV"
2488 - gt_save_LIBS="$LIBS"
2489 - LIBS="$LIBS $INTLLIBS"
2490 - AC_CHECK_FUNCS(dcgettext)
2491 - LIBS="$gt_save_LIBS"
2493 - dnl Search for GNU msgfmt in the PATH.
2494 - AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
2495 - [$ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1], :)
2496 - AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
2498 - dnl Search for GNU xgettext in the PATH.
2499 - AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
2500 - [$ac_dir/$ac_word --omit-header /dev/null >/dev/null 2>&1], :)
2506 - if test "$CATOBJEXT" = "NONE"; then
2507 - dnl GNU gettext is not found in the C library.
2508 - dnl Fall back on GNU gettext library.
2509 - nls_cv_use_gnu_gettext=yes
2513 - if test "$nls_cv_use_gnu_gettext" = "yes"; then
2514 - if test ! -d $srcdir/intl ; then
2515 - AC_MSG_ERROR(no NLS library is packaged with this application)
2517 - dnl Mark actions used to generate GNU NLS library.
2518 - INTLOBJS="\$(GETTOBJS)"
2519 - AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
2520 - [$ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1], :)
2521 - AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
2522 - AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
2523 - [$ac_dir/$ac_word --omit-header /dev/null >/dev/null 2>&1], :)
2525 - BUILD_INCLUDED_LIBINTL=yes
2526 - USE_INCLUDED_LIBINTL=yes
2528 - INTLLIBS="ifelse([$3],[],\$(top_builddir)/intl,[$3])/libintl.ifelse([$1], use-libtool, [l], [])a $LIBICONV"
2529 - LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'`
2532 - dnl This could go away some day; the PATH_PROG_WITH_TEST already does it.
2533 - dnl Test whether we really found GNU msgfmt.
2534 - if test "$GMSGFMT" != ":"; then
2535 - dnl If it is no GNU msgfmt we define it as : so that the
2536 - dnl Makefiles still can work.
2537 - if $GMSGFMT --statistics /dev/null >/dev/null 2>&1; then
2541 - [found msgfmt program is not GNU msgfmt; ignore it])
2546 - dnl This could go away some day; the PATH_PROG_WITH_TEST already does it.
2547 - dnl Test whether we really found GNU xgettext.
2548 - if test "$XGETTEXT" != ":"; then
2549 - dnl If it is no GNU xgettext we define it as : so that the
2550 - dnl Makefiles still can work.
2551 - if $XGETTEXT --omit-header /dev/null >/dev/null 2>&1; then
2555 - [found xgettext program is not GNU xgettext; ignore it])
2560 - dnl We need to process the po/ directory.
2564 - AC_OUTPUT_COMMANDS(
2565 - [for ac_file in $CONFIG_FILES; do
2566 - # Support "outfile[:infile[:infile...]]"
2567 - case "$ac_file" in
2568 - *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
2570 - # PO directories have a Makefile.in generated from Makefile.inn.
2571 - case "$ac_file" in */[Mm]akefile.in)
2572 - # Adjust a relative srcdir.
2573 - ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
2574 - ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
2575 - ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
2576 - ac_base=`basename $ac_file .in`
2577 - # In autoconf-2.13 it is called $ac_given_srcdir.
2578 - # In autoconf-2.50 it is called $srcdir.
2579 - test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
2580 - case "$ac_given_srcdir" in
2581 - .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
2582 - /*) top_srcdir="$ac_given_srcdir" ;;
2583 - *) top_srcdir="$ac_dots$ac_given_srcdir" ;;
2585 - if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
2586 - rm -f "$ac_dir/POTFILES"
2587 - test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
2588 - sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," -e "\$s/\(.*\) \\\\/\1/" < "$ac_given_srcdir/$ac_dir/POTFILES.in" > "$ac_dir/POTFILES"
2589 - test -n "$as_me" && echo "$as_me: creating $ac_dir/$ac_base" || echo "creating $ac_dir/$ac_base"
2590 - sed -e "/POTFILES =/r $ac_dir/POTFILES" "$ac_dir/$ac_base.in" > "$ac_dir/$ac_base"
2597 - dnl If this is used in GNU gettext we have to set BUILD_INCLUDED_LIBINTL
2598 - dnl to 'yes' because some of the testsuite requires it.
2599 - if test "$PACKAGE" = gettext; then
2600 - BUILD_INCLUDED_LIBINTL=yes
2603 - dnl intl/plural.c is generated from intl/plural.y. It requires bison,
2604 - dnl because plural.y uses bison specific features. It requires at least
2605 - dnl bison-1.26 because earlier versions generate a plural.c that doesn't
2607 - dnl bison is only needed for the maintainer (who touches plural.y). But in
2608 - dnl order to avoid separate Makefiles or --enable-maintainer-mode, we put
2609 - dnl the rule in general Makefile. Now, some people carelessly touch the
2610 - dnl files or have a broken "make" program, hence the plural.c rule will
2611 - dnl sometimes fire. To avoid an error, defines BISON to ":" if it is not
2612 - dnl present or too old.
2613 - if test "$nls_cv_use_gnu_gettext" = "yes"; then
2614 - AC_CHECK_PROGS([INTLBISON], [bison])
2615 - if test -z "$INTLBISON"; then
2618 - dnl Found it, now check the version.
2619 - AC_MSG_CHECKING([version of bison])
2620 -changequote(<<,>>)dnl
2621 - ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
2622 - case $ac_prog_version in
2623 - '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
2624 - 1.2[6-9]* | 1.[3-9][0-9]* | [2-9].*)
2625 -changequote([,])dnl
2626 - ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
2627 - *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
2629 - AC_MSG_RESULT([$ac_prog_version])
2631 - if test $ac_verc_fail = yes; then
2636 - dnl These rules are solely for the distribution goal. While doing this
2637 - dnl we only have to keep exactly one list of the available catalogs
2638 - dnl in configure.in.
2639 - for lang in $ALL_LINGUAS; do
2640 - GMOFILES="$GMOFILES $lang.gmo"
2641 - POFILES="$POFILES $lang.po"
2644 - dnl Make all variables we use known to autoconf.
2645 - AC_SUBST(BUILD_INCLUDED_LIBINTL)
2646 - AC_SUBST(USE_INCLUDED_LIBINTL)
2647 - AC_SUBST(CATALOGS)
2648 - AC_SUBST(CATOBJEXT)
2649 - AC_SUBST(GMOFILES)
2650 - AC_SUBST(INTLLIBS)
2651 - AC_SUBST(INTLOBJS)
2655 - dnl For backward compatibility. Some configure.ins may be using this.
2656 - nls_cv_header_intl=
2657 - nls_cv_header_libgt=
2659 - dnl For backward compatibility. Some Makefiles may be using this.
2661 - AC_SUBST(DATADIRNAME)
2663 - dnl For backward compatibility. Some Makefiles may be using this.
2665 - AC_SUBST(INSTOBJEXT)
2667 - dnl For backward compatibility. Some Makefiles may be using this.
2671 -dnl ---------------------------------------------------------------------------
2672 -dnl CF_AC_PREREQ version: 2 updated: 1997/09/06 13:24:56
2674 -dnl Conditionally generate script according to whether we're using the release
2675 -dnl version of autoconf, or a patched version (using the ternary component as
2676 -dnl the patch-version).
2677 -define(CF_AC_PREREQ,
2678 -[CF_PREREQ_COMPARE(
2679 -AC_PREREQ_CANON(AC_PREREQ_SPLIT(AC_ACVERSION)),
2680 -AC_PREREQ_CANON(AC_PREREQ_SPLIT([$1])), [$1], [$2], [$3])])dnl
2681 -dnl ---------------------------------------------------------------------------
2682 -dnl CF_ADD_INCDIR version: 4 updated: 2002/12/21 14:25:52
2684 -dnl Add an include-directory to $CPPFLAGS. Don't add /usr/include, since it's
2685 -dnl redundant. We don't normally need to add -I/usr/local/include for gcc,
2686 -dnl but old versions (and some misinstalled ones) need that. To make things
2687 -dnl worse, gcc 3.x gives error messages if -I/usr/local/include is added to
2688 -dnl the include-path).
2689 -AC_DEFUN([CF_ADD_INCDIR],
2691 -for cf_add_incdir in $1
2695 - case $cf_add_incdir in
2696 - /usr/include) # (vi
2698 - /usr/local/include) # (vi
2699 - if test "$GCC" = yes
2701 - cf_save_CPPFLAGS="$CPPFLAGS"
2702 - CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
2703 - AC_TRY_COMPILE([#include <stdio.h>],
2704 - [printf("Hello")],
2706 - [CPPFLAGS="$cf_save_CPPFLAGS"])
2710 - CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
2713 - cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
2714 - test "$cf_top_incdir" = "$cf_add_incdir" && break
2715 - cf_add_incdir="$cf_top_incdir"
2719 -dnl ---------------------------------------------------------------------------
2720 -dnl CF_ARG_DISABLE version: 3 updated: 1999/03/30 17:24:31
2722 -dnl Allow user to disable a normally-on option.
2723 -AC_DEFUN([CF_ARG_DISABLE],
2724 -[CF_ARG_OPTION($1,[$2],[$3],[$4],yes)])dnl
2725 -dnl ---------------------------------------------------------------------------
2726 -dnl CF_ARG_ENABLE version: 3 updated: 1999/03/30 17:24:31
2728 -dnl Allow user to enable a normally-off option.
2729 -AC_DEFUN([CF_ARG_ENABLE],
2730 -[CF_ARG_OPTION($1,[$2],[$3],[$4],no)])dnl
2731 -dnl ---------------------------------------------------------------------------
2732 -dnl CF_ARG_MSG_ENABLE version: 2 updated: 2000/07/29 19:32:03
2733 -dnl -----------------
2734 -dnl Verbose form of AC_ARG_ENABLE:
2738 -dnl $2 = option name
2739 -dnl $3 = help-string
2740 -dnl $4 = action to perform if option is enabled
2741 -dnl $5 = action if perform if option is disabled
2742 -dnl $6 = default option value (either 'yes' or 'no')
2743 -AC_DEFUN([CF_ARG_MSG_ENABLE],[
2744 -AC_MSG_CHECKING($1)
2745 -AC_ARG_ENABLE($2,[$3],,enableval=ifelse($6,,no,$6))
2746 -AC_MSG_RESULT($enableval)
2747 -if test "$enableval" != no ; then
2748 -ifelse($4,,[ :],$4)
2750 -ifelse($5,,[ :],$5)
2753 -dnl ---------------------------------------------------------------------------
2754 -dnl CF_ARG_OPTION version: 3 updated: 1997/10/18 14:42:41
2756 -dnl Restricted form of AC_ARG_ENABLE that ensures user doesn't give bogus
2760 -dnl $1 = option name
2761 -dnl $2 = help-string
2762 -dnl $3 = action to perform if option is not default
2763 -dnl $4 = action if perform if option is default
2764 -dnl $5 = default option value (either 'yes' or 'no')
2765 -AC_DEFUN([CF_ARG_OPTION],
2766 -[AC_ARG_ENABLE($1,[$2],[test "$enableval" != ifelse($5,no,yes,no) && enableval=ifelse($5,no,no,yes)
2767 - if test "$enableval" != "$5" ; then
2769 -,[ $3]) ifelse($4,,,[
2772 - fi],[enableval=$5 ifelse($4,,,[
2776 -dnl ---------------------------------------------------------------------------
2777 -dnl CF_BUNDLED_INTL version: 11 updated: 2004/09/12 19:45:55
2778 -dnl ---------------
2779 -dnl Top-level macro for configuring an application with a bundled copy of
2780 -dnl the intl and po directories for gettext.
2782 -dnl $1 specifies either Makefile or makefile, defaulting to the former.
2783 -dnl $2 if nonempty sets the option to --enable-nls rather than to --disable-nls
2785 -dnl Sets variables which can be used to substitute in makefiles:
2786 -dnl INTLDIR_MAKE - to make ./intl directory
2787 -dnl MSG_DIR_MAKE - to make ./po directory
2788 -dnl SUB_MAKEFILE - list of makefiles in ./intl, ./po directories
2790 -dnl HAVE_LIBGETTEXT_H if we're using ./intl
2791 +dnl Sets variables which can be used to substitute in makefiles:
2792 +dnl INTLDIR_MAKE - to make ./intl directory
2793 +dnl MSG_DIR_MAKE - to make ./po directory
2794 +dnl SUB_MAKEFILE - list of makefiles in ./intl, ./po directories
2796 +dnl HAVE_LIBGETTEXT_H if we're using ./intl
2799 dnl ALL_LINGUAS if set, lists the root names of the ".po" files.
2800 dnl CONFIG_H assumed to be "config.h"
2801 dnl VERSION may be set, otherwise extract from "VERSION" file.
2803 +AH_TEMPLATE([HAVE_LIBGETTEXT_H], [Define if we're using ./intl.])
2804 AC_DEFUN([CF_BUNDLED_INTL],[
2805 cf_makefile=ifelse($1,,Makefile,$1)
2808 system_name="`(hostname) 2>/dev/null`"
2811 +AH_TEMPLATE([SYSTEM_NAME], [Set to the system name])
2812 test -n "$system_name" && AC_DEFINE_UNQUOTED(SYSTEM_NAME,"$system_name")
2813 AC_CACHE_VAL(cf_cv_system_name,[cf_cv_system_name="$system_name"])
2816 dnl CF_CURSES_CHTYPE version: 6 updated: 2003/11/06 19:59:57
2817 dnl ----------------
2818 dnl Test if curses defines 'chtype' (usually a 'long' type for SysV curses).
2819 +AH_TEMPLATE([HAVE_TYPE_CHTYPE], [Define if curses defines 'chtype'.])
2820 +AH_TEMPLATE([TYPE_CHTYPE_IS_SCALAR], [Define if chtype is scalar rather than a struct.])
2821 AC_DEFUN([CF_CURSES_CHTYPE],
2823 AC_REQUIRE([CF_CURSES_CPPFLAGS])dnl
2824 @@ -1091,6 +517,9 @@
2828 +AH_TEMPLATE([HAVE_TERM_H], [define if you have term.h])
2829 +AH_TEMPLATE([HAVE_NCURSES_TERM_H], [define if you have ncurses/term.h])
2830 +AH_TEMPLATE([HAVE_NCURSESW_TERM_H], [define if you have ncursesw/term.h])
2831 case $cf_cv_term_header in #(vi
2833 AC_DEFINE(HAVE_TERM_H)
2834 @@ -1208,6 +637,8 @@
2835 dnl I don't use AC_HEADER_SYS_WAIT, because it defines HAVE_SYS_WAIT_H, which
2836 dnl would conflict with an attempt to test that header directly.
2838 +AH_TEMPLATE([WAIT_USES_UNION], [Define if wait uses union])
2839 +AH_TEMPLATE([WAITPID_USES_UNION], [Define if waitpid uses union])
2840 AC_DEFUN([CF_FUNC_WAIT],
2842 AC_REQUIRE([CF_UNION_WAIT])
2843 @@ -1690,6 +1121,7 @@
2844 dnl ----------------------
2845 dnl Check if the file-system supports mixed-case filenames. If we're able to
2846 dnl create a lowercase name and see it as uppercase, it doesn't support that.
2847 +AH_TEMPLATE([MIXEDCASE_FILENAMES],[Define if the file-system supports mixed-case filenames.])
2848 AC_DEFUN([CF_MIXEDCASE_FILENAMES],
2850 AC_CACHE_CHECK(if filesystem supports mixed-case filenames,cf_cv_mixedcase,[
2851 @@ -1836,8 +1268,13 @@
2857 +AH_TEMPLATE([NCURSES],[Define if you have ncurses])
2858 +AH_TEMPLATE([HAVE_NCURSES_H],[Define if you have ncurses.h])
2859 +AH_TEMPLATE([HAVE_NCURSES_NCURSES_H],[Define if you have ncurses/ncurses.h])
2860 +AH_TEMPLATE([HAVE_NCURSESW_NCURSES_H],[Define if you have ncursesw/ncurses.h])
2863 case $cf_cv_ncurses_header in # (vi
2865 AC_DEFINE(HAVE_NCURSES_H)
2866 @@ -2129,6 +1566,7 @@
2867 dnl CF_PROG_EXT version: 10 updated: 2004/01/03 19:28:18
2869 dnl Compute $PROG_EXT, used for non-Unix ports, such as OS/2 EMX.
2870 +AH_TEMPLATE([PROG_EXT],[Set to prog extension])
2871 AC_DEFUN([CF_PROG_EXT],
2873 AC_REQUIRE([CF_CHECK_CACHE])
2874 @@ -2281,6 +1719,7 @@
2876 dnl Sets: $cf_cv_type_unionwait
2877 dnl Defines: HAVE_TYPE_UNIONWAIT
2878 +AH_TEMPLATE([HAVE_TYPE_UNIONWAIT], [Define if BSD-style union wait is declared.])
2879 AC_DEFUN([CF_UNION_WAIT],
2881 AC_REQUIRE([CF_WAIT_HEADERS])
2882 @@ -2325,6 +1764,7 @@
2883 dnl CF_UTF8_LIB version: 4 updated: 2003/03/01 18:36:42
2885 dnl Check for multibyte support, and if not found, utf8 compatibility library
2886 +AH_TEMPLATE([HAVE_LIBUTF8_H],[Define if we have libutf8.h])
2887 AC_DEFUN([CF_UTF8_LIB],
2889 AC_CACHE_CHECK(for multibyte character support,cf_cv_utf8_lib,[
2890 @@ -2430,6 +1870,7 @@
2891 dnl need the package name to ensure that the defined symbols are unique.
2894 + AH_TEMPLATE([PACKAGE],[Define to package name])
2895 AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE")
2897 CF_UPPER(cf_PACKAGE,$PACKAGE)
2898 @@ -2628,138 +2069,1693 @@
2900 test -z "$LIBTOOL" && ECHO_LT=
2903 -AC_SUBST(LIBTOOL_CXX)
2905 +AC_SUBST(LIBTOOL_CXX)
2907 +AC_SUBST(LIB_CREATE)
2908 +AC_SUBST(LIB_OBJECT)
2909 +AC_SUBST(LIB_SUFFIX)
2912 +AC_SUBST(LIB_CLEAN)
2913 +AC_SUBST(LIB_COMPILE)
2915 +AC_SUBST(LIB_INSTALL)
2916 +AC_SUBST(LIB_UNINSTALL)
2919 +dnl ---------------------------------------------------------------------------
2920 +dnl CF_XOPEN_CURSES version: 8 updated: 2003/11/07 19:47:46
2921 +dnl ---------------
2922 +dnl Test if we should define X/Open source for curses, needed on Digital Unix
2923 +dnl 4.x, to see the extended functions, but breaks on IRIX 6.x.
2925 +dnl The getbegyx() check is needed for HPUX, which omits legacy macros such
2926 +dnl as getbegy(). The latter is better design, but the former is standard.
2927 +AC_DEFUN([CF_XOPEN_CURSES],
2929 +AC_REQUIRE([CF_CURSES_CPPFLAGS])dnl
2930 +AC_CACHE_CHECK(if we must define _XOPEN_SOURCE_EXTENDED,cf_cv_need_xopen_extension,[
2932 +#include <stdlib.h>
2933 +#include <${cf_cv_ncurses_header-curses.h}>],[
2934 + long x = winnstr(stdscr, "", 0);
2936 + getbegyx(stdscr, y1, x1)],
2937 + [cf_cv_need_xopen_extension=no],
2939 +#define _XOPEN_SOURCE_EXTENDED
2940 +#include <stdlib.h>
2941 +#include <${cf_cv_ncurses_header-curses.h}>],[
2942 + long x = winnstr(stdscr, "", 0);
2944 + getbegyx(stdscr, y1, x1)],
2945 + [cf_cv_need_xopen_extension=yes],
2946 + [cf_cv_need_xopen_extension=unknown])])])
2947 +test $cf_cv_need_xopen_extension = yes && CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
2949 +dnl ---------------------------------------------------------------------------
2950 +dnl CF_XOPEN_SOURCE version: 17 updated: 2005/02/06 12:07:45
2951 +dnl ---------------
2952 +dnl Try to get _XOPEN_SOURCE defined properly that we can use POSIX functions,
2953 +dnl or adapt to the vendor's definitions to get equivalent functionality.
2956 +dnl $1 is the nominal value for _XOPEN_SOURCE
2957 +dnl $2 is the nominal value for _POSIX_C_SOURCE
2958 +AC_DEFUN([CF_XOPEN_SOURCE],[
2960 +cf_XOPEN_SOURCE=ifelse($1,,500,$1)
2961 +cf_POSIX_C_SOURCE=ifelse($2,,199506L,$2)
2963 +case $host_os in #(vi
2965 + CPPFLAGS="$CPPFLAGS -D_ALL_SOURCE"
2968 + # 5.x headers associate
2969 + # _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
2970 + # _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
2971 + cf_POSIX_C_SOURCE=200112L
2972 + cf_XOPEN_SOURCE=600
2973 + CPPFLAGS="$CPPFLAGS -D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
2976 + CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE"
2979 + CPPFLAGS="$CPPFLAGS -D_SGI_SOURCE"
2985 + # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <arpa/inet.h>
2988 + # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
2991 + # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
2994 + CPPFLAGS="$CPPFLAGS -D_OSF_SOURCE"
2997 + # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
3000 + CPPFLAGS="$CPPFLAGS -D__EXTENSIONS__"
3003 + AC_CACHE_CHECK(if we should define _XOPEN_SOURCE,cf_cv_xopen_source,[
3004 + AC_TRY_COMPILE([#include <sys/types.h>],[
3005 +#ifndef _XOPEN_SOURCE
3008 + [cf_cv_xopen_source=no],
3009 + [cf_save="$CPPFLAGS"
3010 + CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
3011 + AC_TRY_COMPILE([#include <sys/types.h>],[
3012 +#ifdef _XOPEN_SOURCE
3015 + [cf_cv_xopen_source=no],
3016 + [cf_cv_xopen_source=$cf_XOPEN_SOURCE])
3017 + CPPFLAGS="$cf_save"
3020 +test "$cf_cv_xopen_source" != no && CPPFLAGS="$CPPFLAGS -U_XOPEN_SOURCE -D_XOPEN_SOURCE=$cf_cv_xopen_source"
3021 + CF_POSIX_C_SOURCE($cf_POSIX_C_SOURCE)
3026 +# gettext.m4 serial 17 (gettext-0.11.5)
3027 +dnl Copyright (C) 1995-2002 Free Software Foundation, Inc.
3028 +dnl This file is free software, distributed under the terms of the GNU
3029 +dnl General Public License. As a special exception to the GNU General
3030 +dnl Public License, this file may be distributed as part of a program
3031 +dnl that contains a configuration script generated by Autoconf, under
3032 +dnl the same distribution terms as the rest of that program.
3034 +dnl This file can can be used in projects which are not available under
3035 +dnl the GNU General Public License or the GNU Library General Public
3036 +dnl License but which still want to provide support for the GNU gettext
3038 +dnl Please note that the actual code of the GNU gettext library is covered
3039 +dnl by the GNU Library General Public License, and the rest of the GNU
3040 +dnl gettext package package is covered by the GNU General Public License.
3041 +dnl They are *not* in the public domain.
3044 +dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
3045 +dnl Bruno Haible <haible@clisp.cons.org>, 2000-2002.
3047 +dnl Macro to add for using GNU gettext.
3049 +dnl Usage: AM_GNU_GETTEXT([INTLSYMBOL], [NEEDSYMBOL], [INTLDIR]).
3050 +dnl INTLSYMBOL can be one of 'external', 'no-libtool', 'use-libtool'. The
3051 +dnl default (if it is not specified or empty) is 'no-libtool'.
3052 +dnl INTLSYMBOL should be 'external' for packages with no intl directory,
3053 +dnl and 'no-libtool' or 'use-libtool' for packages with an intl directory.
3054 +dnl If INTLSYMBOL is 'use-libtool', then a libtool library
3055 +dnl $(top_builddir)/intl/libintl.la will be created (shared and/or static,
3056 +dnl depending on --{enable,disable}-{shared,static} and on the presence of
3057 +dnl AM-DISABLE-SHARED). If INTLSYMBOL is 'no-libtool', a static library
3058 +dnl $(top_builddir)/intl/libintl.a will be created.
3059 +dnl If NEEDSYMBOL is specified and is 'need-ngettext', then GNU gettext
3060 +dnl implementations (in libc or libintl) without the ngettext() function
3061 +dnl will be ignored. If NEEDSYMBOL is specified and is
3062 +dnl 'need-formatstring-macros', then GNU gettext implementations that don't
3063 +dnl support the ISO C 99 <inttypes.h> formatstring macros will be ignored.
3064 +dnl INTLDIR is used to find the intl libraries. If empty,
3065 +dnl the value `$(top_builddir)/intl/' is used.
3067 +dnl The result of the configuration is one of three cases:
3068 +dnl 1) GNU gettext, as included in the intl subdirectory, will be compiled
3070 +dnl Catalog format: GNU --> install in $(datadir)
3071 +dnl Catalog extension: .mo after installation, .gmo in source tree
3072 +dnl 2) GNU gettext has been found in the system's C library.
3073 +dnl Catalog format: GNU --> install in $(datadir)
3074 +dnl Catalog extension: .mo after installation, .gmo in source tree
3075 +dnl 3) No internationalization, always use English msgid.
3076 +dnl Catalog format: none
3077 +dnl Catalog extension: none
3078 +dnl If INTLSYMBOL is 'external', only cases 2 and 3 can occur.
3079 +dnl The use of .gmo is historical (it was needed to avoid overwriting the
3080 +dnl GNU format catalogs when building on a platform with an X/Open gettext),
3081 +dnl but we keep it in order not to force irrelevant filename changes on the
3084 +AC_DEFUN([AM_GNU_GETTEXT],
3086 + dnl Argument checking.
3087 + ifelse([$1], [], , [ifelse([$1], [external], , [ifelse([$1], [no-libtool], , [ifelse([$1], [use-libtool], ,
3088 + [errprint([ERROR: invalid first argument to AM_GNU_GETTEXT
3090 + ifelse([$2], [], , [ifelse([$2], [need-ngettext], , [ifelse([$2], [need-formatstring-macros], ,
3091 + [errprint([ERROR: invalid second argument to AM_GNU_GETTEXT
3093 + define(gt_included_intl, ifelse([$1], [external], [no], [yes]))
3094 + define(gt_libtool_suffix_prefix, ifelse([$1], [use-libtool], [l], []))
3096 + AC_REQUIRE([AM_PO_SUBDIRS])dnl
3097 + ifelse(gt_included_intl, yes, [
3098 + AC_REQUIRE([AM_INTL_SUBDIR])dnl
3101 + dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
3102 + AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
3103 + AC_REQUIRE([AC_LIB_RPATH])
3105 + dnl Sometimes libintl requires libiconv, so first search for libiconv.
3106 + dnl Ideally we would do this search only after the
3107 + dnl if test "$USE_NLS" = "yes"; then
3108 + dnl if test "$gt_cv_func_gnugettext_libc" != "yes"; then
3109 + dnl tests. But if configure.in invokes AM_ICONV after AM_GNU_GETTEXT
3110 + dnl the configure script would need to contain the same shell code
3111 + dnl again, outside any 'if'. There are two solutions:
3112 + dnl - Invoke AM_ICONV_LINKFLAGS_BODY here, outside any 'if'.
3113 + dnl - Control the expansions in more detail using AC_PROVIDE_IFELSE.
3114 + dnl Since AC_PROVIDE_IFELSE is only in autoconf >= 2.52 and not
3115 + dnl documented, we avoid it.
3116 + ifelse(gt_included_intl, yes, , [
3117 + AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
3120 + AC_MSG_CHECKING([whether NLS is requested])
3121 + dnl Default is enabled NLS
3122 + AC_ARG_ENABLE(nls,
3123 + [ --disable-nls do not use Native Language Support],
3124 + USE_NLS=$enableval, USE_NLS=yes)
3125 + AC_MSG_RESULT($USE_NLS)
3128 + ifelse(gt_included_intl, yes, [
3129 + BUILD_INCLUDED_LIBINTL=no
3130 + USE_INCLUDED_LIBINTL=no
3136 + dnl If we use NLS figure out what method
3137 + if test "$USE_NLS" = "yes"; then
3138 + gt_use_preinstalled_gnugettext=no
3139 + ifelse(gt_included_intl, yes, [
3140 + AC_MSG_CHECKING([whether included gettext is requested])
3141 + AC_ARG_WITH(included-gettext,
3142 + [ --with-included-gettext use the GNU gettext library included here],
3143 + nls_cv_force_use_gnu_gettext=$withval,
3144 + nls_cv_force_use_gnu_gettext=no)
3145 + AC_MSG_RESULT($nls_cv_force_use_gnu_gettext)
3147 + nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
3148 + if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
3150 + dnl User does not insist on using GNU NLS library. Figure out what
3151 + dnl to use. If GNU gettext is available we use this. Else we have
3152 + dnl to fall back to GNU NLS library.
3154 + dnl Add a version number to the cache macros.
3155 + define([gt_api_version], ifelse([$2], [need-formatstring-macros], 3, ifelse([$2], [need-ngettext], 2, 1)))
3156 + define([gt_cv_func_gnugettext_libc], [gt_cv_func_gnugettext]gt_api_version[_libc])
3157 + define([gt_cv_func_gnugettext_libintl], [gt_cv_func_gnugettext]gt_api_version[_libintl])
3159 + AC_CACHE_CHECK([for GNU gettext in libc], gt_cv_func_gnugettext_libc,
3160 + [AC_TRY_LINK([#include <libintl.h>
3161 +]ifelse([$2], [need-formatstring-macros],
3162 +[#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
3163 +#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
3166 +typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
3167 +changequote([,])dnl
3168 +], [])[extern int _nl_msg_cat_cntr;
3169 +extern int *_nl_domain_bindings;],
3170 + [bindtextdomain ("", "");
3171 +return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_domain_bindings],
3172 + gt_cv_func_gnugettext_libc=yes,
3173 + gt_cv_func_gnugettext_libc=no)])
3175 + if test "$gt_cv_func_gnugettext_libc" != "yes"; then
3176 + dnl Sometimes libintl requires libiconv, so first search for libiconv.
3177 + ifelse(gt_included_intl, yes, , [
3180 + dnl Search for libintl and define LIBINTL, LTLIBINTL and INCINTL
3181 + dnl accordingly. Don't use AC_LIB_LINKFLAGS_BODY([intl],[iconv])
3182 + dnl because that would add "-liconv" to LIBINTL and LTLIBINTL
3183 + dnl even if libiconv doesn't exist.
3184 + AC_LIB_LINKFLAGS_BODY([intl])
3185 + AC_CACHE_CHECK([for GNU gettext in libintl],
3186 + gt_cv_func_gnugettext_libintl,
3187 + [gt_save_CPPFLAGS="$CPPFLAGS"
3188 + CPPFLAGS="$CPPFLAGS $INCINTL"
3189 + gt_save_LIBS="$LIBS"
3190 + LIBS="$LIBS $LIBINTL"
3191 + dnl Now see whether libintl exists and does not depend on libiconv.
3192 + AC_TRY_LINK([#include <libintl.h>
3193 +]ifelse([$2], [need-formatstring-macros],
3194 +[#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
3195 +#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
3198 +typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
3199 +changequote([,])dnl
3200 +], [])[extern int _nl_msg_cat_cntr;
3205 +const char *_nl_expand_alias ();],
3206 + [bindtextdomain ("", "");
3207 +return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_expand_alias (0)],
3208 + gt_cv_func_gnugettext_libintl=yes,
3209 + gt_cv_func_gnugettext_libintl=no)
3210 + dnl Now see whether libintl exists and depends on libiconv.
3211 + if test "$gt_cv_func_gnugettext_libintl" != yes && test -n "$LIBICONV"; then
3212 + LIBS="$LIBS $LIBICONV"
3213 + AC_TRY_LINK([#include <libintl.h>
3214 +]ifelse([$2], [need-formatstring-macros],
3215 +[#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
3216 +#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
3219 +typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
3220 +changequote([,])dnl
3221 +], [])[extern int _nl_msg_cat_cntr;
3226 +const char *_nl_expand_alias ();],
3227 + [bindtextdomain ("", "");
3228 +return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_expand_alias (0)],
3229 + [LIBINTL="$LIBINTL $LIBICONV"
3230 + LTLIBINTL="$LTLIBINTL $LTLIBICONV"
3231 + gt_cv_func_gnugettext_libintl=yes
3234 + CPPFLAGS="$gt_save_CPPFLAGS"
3235 + LIBS="$gt_save_LIBS"])
3238 + dnl If an already present or preinstalled GNU gettext() is found,
3239 + dnl use it. But if this macro is used in GNU gettext, and GNU
3240 + dnl gettext is already preinstalled in libintl, we update this
3241 + dnl libintl. (Cf. the install rule in intl/Makefile.in.)
3242 + if test "$gt_cv_func_gnugettext_libc" = "yes" \
3243 + || { test "$gt_cv_func_gnugettext_libintl" = "yes" \
3244 + && test "$PACKAGE" != gettext; }; then
3245 + gt_use_preinstalled_gnugettext=yes
3247 + dnl Reset the values set by searching for libintl.
3253 + ifelse(gt_included_intl, yes, [
3254 + if test "$gt_use_preinstalled_gnugettext" != "yes"; then
3255 + dnl GNU gettext is not found in the C library.
3256 + dnl Fall back on included GNU gettext library.
3257 + nls_cv_use_gnu_gettext=yes
3261 + if test "$nls_cv_use_gnu_gettext" = "yes"; then
3262 + dnl Mark actions used to generate GNU NLS library.
3263 + INTLOBJS="\$(GETTOBJS)"
3264 + BUILD_INCLUDED_LIBINTL=yes
3265 + USE_INCLUDED_LIBINTL=yes
3266 + LIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LIBICONV"
3267 + LTLIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LTLIBICONV"
3268 + LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'`
3271 + if test "$gt_use_preinstalled_gnugettext" = "yes" \
3272 + || test "$nls_cv_use_gnu_gettext" = "yes"; then
3273 + dnl Mark actions to use GNU gettext tools.
3278 + if test "$gt_use_preinstalled_gnugettext" = "yes" \
3279 + || test "$nls_cv_use_gnu_gettext" = "yes"; then
3280 + AC_DEFINE(ENABLE_NLS, 1,
3281 + [Define to 1 if translation of program messages to the user's native language
3288 + if test "$USE_NLS" = "yes"; then
3290 + if test "$gt_use_preinstalled_gnugettext" = "yes"; then
3291 + if test "$gt_cv_func_gnugettext_libintl" = "yes"; then
3292 + AC_MSG_CHECKING([how to link with libintl])
3293 + AC_MSG_RESULT([$LIBINTL])
3294 + AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCINTL])
3297 + dnl For backward compatibility. Some packages may be using this.
3298 + AC_DEFINE(HAVE_GETTEXT, 1,
3299 + [Define if the GNU gettext() function is already present or preinstalled.])
3300 + AC_DEFINE(HAVE_DCGETTEXT, 1,
3301 + [Define if the GNU dcgettext() function is already present or preinstalled.])
3304 + dnl We need to process the po/ directory.
3308 + ifelse(gt_included_intl, yes, [
3309 + dnl If this is used in GNU gettext we have to set BUILD_INCLUDED_LIBINTL
3310 + dnl to 'yes' because some of the testsuite requires it.
3311 + if test "$PACKAGE" = gettext; then
3312 + BUILD_INCLUDED_LIBINTL=yes
3315 + dnl Make all variables we use known to autoconf.
3316 + AC_SUBST(BUILD_INCLUDED_LIBINTL)
3317 + AC_SUBST(USE_INCLUDED_LIBINTL)
3318 + AC_SUBST(CATOBJEXT)
3319 + AC_SUBST(INTLOBJS)
3321 + dnl For backward compatibility. Some configure.ins may be using this.
3322 + nls_cv_header_intl=
3323 + nls_cv_header_libgt=
3325 + dnl For backward compatibility. Some Makefiles may be using this.
3327 + AC_SUBST(DATADIRNAME)
3329 + dnl For backward compatibility. Some Makefiles may be using this.
3331 + AC_SUBST(INSTOBJEXT)
3333 + dnl For backward compatibility. Some Makefiles may be using this.
3337 + dnl Enable libtool support if the surrounding package wishes it.
3338 + INTL_LIBTOOL_SUFFIX_PREFIX=gt_libtool_suffix_prefix
3339 + AC_SUBST(INTL_LIBTOOL_SUFFIX_PREFIX)
3342 + dnl For backward compatibility. Some Makefiles may be using this.
3343 + INTLLIBS="$LIBINTL"
3344 + AC_SUBST(INTLLIBS)
3346 + dnl Make all documented variables known to autoconf.
3348 + AC_SUBST(LTLIBINTL)
3353 +dnl Checks for all prerequisites of the po subdirectory,
3354 +dnl except for USE_NLS.
3355 +AC_DEFUN([AM_PO_SUBDIRS],
3357 + AC_REQUIRE([AC_PROG_MAKE_SET])dnl
3358 + AC_REQUIRE([AC_PROG_INSTALL])dnl
3359 + AC_REQUIRE([AM_MKINSTALLDIRS])dnl
3361 + dnl Perform the following tests also if --disable-nls has been given,
3362 + dnl because they are needed for "make dist" to work.
3364 + dnl Search for GNU msgfmt in the PATH.
3365 + dnl The first test excludes Solaris msgfmt and early GNU msgfmt versions.
3366 + dnl The second test excludes FreeBSD msgfmt.
3367 + AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
3368 + [$ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1 &&
3369 + (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
3371 + AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
3373 + dnl Search for GNU xgettext 0.11 or newer in the PATH.
3374 + dnl The first test excludes Solaris xgettext and early GNU xgettext versions.
3375 + dnl The second test excludes FreeBSD xgettext.
3376 + AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
3377 + [$ac_dir/$ac_word --omit-header --copyright-holder= /dev/null >/dev/null 2>&1 &&
3378 + (if $ac_dir/$ac_word --omit-header --copyright-holder= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
3380 + dnl Remove leftover from FreeBSD xgettext call.
3383 + dnl Search for GNU msgmerge 0.11 or newer in the PATH.
3384 + AM_PATH_PROG_WITH_TEST(MSGMERGE, msgmerge,
3385 + [$ac_dir/$ac_word --update -q /dev/null /dev/null >/dev/null 2>&1], :)
3387 + dnl This could go away some day; the PATH_PROG_WITH_TEST already does it.
3388 + dnl Test whether we really found GNU msgfmt.
3389 + if test "$GMSGFMT" != ":"; then
3390 + dnl If it is no GNU msgfmt we define it as : so that the
3391 + dnl Makefiles still can work.
3392 + if $GMSGFMT --statistics /dev/null >/dev/null 2>&1 &&
3393 + (if $GMSGFMT --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
3396 + GMSGFMT=`echo "$GMSGFMT" | sed -e 's,^.*/,,'`
3398 + [found $GMSGFMT program is not GNU msgfmt; ignore it])
3403 + dnl This could go away some day; the PATH_PROG_WITH_TEST already does it.
3404 + dnl Test whether we really found GNU xgettext.
3405 + if test "$XGETTEXT" != ":"; then
3406 + dnl If it is no GNU xgettext we define it as : so that the
3407 + dnl Makefiles still can work.
3408 + if $XGETTEXT --omit-header --copyright-holder= /dev/null >/dev/null 2>&1 &&
3409 + (if $XGETTEXT --omit-header --copyright-holder= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
3413 + [found xgettext program is not GNU xgettext; ignore it])
3416 + dnl Remove leftover from FreeBSD xgettext call.
3420 + AC_OUTPUT_COMMANDS([
3421 + for ac_file in $CONFIG_FILES; do
3422 + # Support "outfile[:infile[:infile...]]"
3423 + case "$ac_file" in
3424 + *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
3426 + # PO directories have a Makefile.in generated from Makefile.in.in.
3427 + case "$ac_file" in */Makefile.in)
3428 + # Adjust a relative srcdir.
3429 + ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
3430 + ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
3431 + ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
3432 + # In autoconf-2.13 it is called $ac_given_srcdir.
3433 + # In autoconf-2.50 it is called $srcdir.
3434 + test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
3435 + case "$ac_given_srcdir" in
3436 + .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
3437 + /*) top_srcdir="$ac_given_srcdir" ;;
3438 + *) top_srcdir="$ac_dots$ac_given_srcdir" ;;
3440 + if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
3441 + rm -f "$ac_dir/POTFILES"
3442 + test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
3443 + cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES"
3444 + # ALL_LINGUAS, POFILES, GMOFILES, UPDATEPOFILES, DUMMYPOFILES depend
3445 + # on $ac_dir but don't depend on user-specified configuration
3447 + if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
3448 + # The LINGUAS file contains the set of available languages.
3449 + if test -n "$ALL_LINGUAS"; then
3450 + test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
3452 + ALL_LINGUAS_=`sed -e "/^#/d" "$ac_given_srcdir/$ac_dir/LINGUAS"`
3453 + # Hide the ALL_LINGUAS assigment from automake.
3454 + eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
3456 + case "$ac_given_srcdir" in
3458 + *) srcdirpre='$(srcdir)/' ;;
3464 + for lang in $ALL_LINGUAS; do
3465 + POFILES="$POFILES $srcdirpre$lang.po"
3466 + GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
3467 + UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
3468 + DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
3470 + # CATALOGS depends on both $ac_dir and the user's LINGUAS
3471 + # environment variable.
3473 + if test -n "$ALL_LINGUAS"; then
3474 + for presentlang in $ALL_LINGUAS; do
3476 + if test "%UNSET%" != "$LINGUAS"; then
3477 + desiredlanguages="$LINGUAS"
3479 + desiredlanguages="$ALL_LINGUAS"
3481 + for desiredlang in $desiredlanguages; do
3482 + # Use the presentlang catalog if desiredlang is
3483 + # a. equal to presentlang, or
3484 + # b. a variant of presentlang (because in this case,
3485 + # presentlang can be used as a fallback for messages
3486 + # which are not translated in the desiredlang catalog).
3487 + case "$desiredlang" in
3488 + "$presentlang"*) useit=yes;;
3491 + if test $useit = yes; then
3492 + INST_LINGUAS="$INST_LINGUAS $presentlang"
3497 + if test -n "$INST_LINGUAS"; then
3498 + for lang in $INST_LINGUAS; do
3499 + CATALOGS="$CATALOGS $lang.gmo"
3502 + test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
3503 + sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile"
3504 + for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do
3505 + if test -f "$f"; then
3507 + *.orig | *.bak | *~) ;;
3508 + *) cat "$f" >> "$ac_dir/Makefile" ;;
3516 + [# Capture the value of obsolete ALL_LINGUAS because we need it to compute
3517 + # POFILES, GMOFILES, UPDATEPOFILES, DUMMYPOFILES, CATALOGS. But hide it
3519 + eval 'ALL_LINGUAS''="$ALL_LINGUAS"'
3520 + # Capture the value of LINGUAS because we need it to compute CATALOGS.
3521 + LINGUAS="${LINGUAS-%UNSET%}"
3526 +dnl Checks for all prerequisites of the intl subdirectory,
3527 +dnl except for INTL_LIBTOOL_SUFFIX_PREFIX (and possibly LIBTOOL), INTLOBJS,
3528 +dnl USE_INCLUDED_LIBINTL, BUILD_INCLUDED_LIBINTL.
3529 +AC_DEFUN([AM_INTL_SUBDIR],
3531 + AC_REQUIRE([AC_PROG_INSTALL])dnl
3532 + AC_REQUIRE([AM_MKINSTALLDIRS])dnl
3533 + AC_REQUIRE([AC_PROG_CC])dnl
3534 + AC_REQUIRE([AC_CANONICAL_HOST])dnl
3535 + AC_REQUIRE([AC_PROG_RANLIB])dnl
3536 + AC_REQUIRE([AC_ISC_POSIX])dnl
3537 + AC_REQUIRE([AC_HEADER_STDC])dnl
3538 + AC_REQUIRE([AC_C_CONST])dnl
3539 + AC_REQUIRE([AC_C_INLINE])dnl
3540 + AC_REQUIRE([AC_TYPE_OFF_T])dnl
3541 + AC_REQUIRE([AC_TYPE_SIZE_T])dnl
3542 + AC_REQUIRE([AC_FUNC_ALLOCA])dnl
3543 + AC_REQUIRE([AC_FUNC_MMAP])dnl
3544 + AC_REQUIRE([jm_GLIBC21])dnl
3545 + AC_REQUIRE([gt_INTDIV0])dnl
3546 + AC_REQUIRE([jm_AC_TYPE_UINTMAX_T])dnl
3547 + AC_REQUIRE([gt_HEADER_INTTYPES_H])dnl
3548 + AC_REQUIRE([gt_INTTYPES_PRI])dnl
3550 + AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h stddef.h \
3551 +stdlib.h string.h unistd.h sys/param.h])
3552 + AC_CHECK_FUNCS([feof_unlocked fgets_unlocked getc_unlocked getcwd getegid \
3553 +geteuid getgid getuid mempcpy munmap putenv setenv setlocale stpcpy \
3554 +strcasecmp strdup strtoul tsearch __argz_count __argz_stringify __argz_next])
3557 + AM_LANGINFO_CODESET
3558 + if test $ac_cv_header_locale_h = yes; then
3562 + dnl intl/plural.c is generated from intl/plural.y. It requires bison,
3563 + dnl because plural.y uses bison specific features. It requires at least
3564 + dnl bison-1.26 because earlier versions generate a plural.c that doesn't
3566 + dnl bison is only needed for the maintainer (who touches plural.y). But in
3567 + dnl order to avoid separate Makefiles or --enable-maintainer-mode, we put
3568 + dnl the rule in general Makefile. Now, some people carelessly touch the
3569 + dnl files or have a broken "make" program, hence the plural.c rule will
3570 + dnl sometimes fire. To avoid an error, defines BISON to ":" if it is not
3571 + dnl present or too old.
3572 + AC_CHECK_PROGS([INTLBISON], [bison])
3573 + if test -z "$INTLBISON"; then
3576 + dnl Found it, now check the version.
3577 + AC_MSG_CHECKING([version of bison])
3578 +changequote(<<,>>)dnl
3579 + ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
3580 + case $ac_prog_version in
3581 + '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
3582 + 1.2[6-9]* | 1.[3-9][0-9]* | [2-9].*)
3583 +changequote([,])dnl
3584 + ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
3585 + *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
3587 + AC_MSG_RESULT([$ac_prog_version])
3589 + if test $ac_verc_fail = yes; then
3595 +AC_DEFUN([AM_MKINSTALLDIRS],
3597 + dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
3598 + dnl find the mkinstalldirs script in another subdir but $(top_srcdir).
3599 + dnl Try to locate is.
3601 + if test -n "$ac_aux_dir"; then
3602 + MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
3604 + if test -z "$MKINSTALLDIRS"; then
3605 + MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
3607 + AC_SUBST(MKINSTALLDIRS)
3611 +dnl Usage: AM_GNU_GETTEXT_VERSION([gettext-version])
3612 +AC_DEFUN([AM_GNU_GETTEXT_VERSION], [])
3614 +# lib-prefix.m4 serial 1 (gettext-0.11)
3615 +dnl Copyright (C) 2001-2002 Free Software Foundation, Inc.
3616 +dnl This file is free software, distributed under the terms of the GNU
3617 +dnl General Public License. As a special exception to the GNU General
3618 +dnl Public License, this file may be distributed as part of a program
3619 +dnl that contains a configuration script generated by Autoconf, under
3620 +dnl the same distribution terms as the rest of that program.
3622 +dnl From Bruno Haible.
3624 +dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed
3625 +dnl to access previously installed libraries. The basic assumption is that
3626 +dnl a user will want packages to use other packages he previously installed
3627 +dnl with the same --prefix option.
3628 +dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate
3629 +dnl libraries, but is otherwise very convenient.
3630 +AC_DEFUN([AC_LIB_PREFIX],
3632 + AC_BEFORE([$0], [AC_LIB_LINKFLAGS])
3633 + AC_REQUIRE([AC_PROG_CC])
3634 + AC_REQUIRE([AC_CANONICAL_HOST])
3635 + AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
3636 + dnl By default, look in $includedir and $libdir.
3637 + use_additional=yes
3638 + AC_LIB_WITH_FINAL_PREFIX([
3639 + eval additional_includedir=\"$includedir\"
3640 + eval additional_libdir=\"$libdir\"
3642 + AC_ARG_WITH([lib-prefix],
3643 +[ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib
3644 + --without-lib-prefix don't search for libraries in includedir and libdir],
3646 + if test "X$withval" = "Xno"; then
3649 + if test "X$withval" = "X"; then
3650 + AC_LIB_WITH_FINAL_PREFIX([
3651 + eval additional_includedir=\"$includedir\"
3652 + eval additional_libdir=\"$libdir\"
3655 + additional_includedir="$withval/include"
3656 + additional_libdir="$withval/lib"
3660 + if test $use_additional = yes; then
3661 + dnl Potentially add $additional_includedir to $CPPFLAGS.
3662 + dnl But don't add it
3663 + dnl 1. if it's the standard /usr/include,
3664 + dnl 2. if it's already present in $CPPFLAGS,
3665 + dnl 3. if it's /usr/local/include and we are using GCC on Linux,
3666 + dnl 4. if it doesn't exist as a directory.
3667 + if test "X$additional_includedir" != "X/usr/include"; then
3669 + for x in $CPPFLAGS; do
3670 + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
3671 + if test "X$x" = "X-I$additional_includedir"; then
3676 + if test -z "$haveit"; then
3677 + if test "X$additional_includedir" = "X/usr/local/include"; then
3678 + if test -n "$GCC"; then
3680 + linux*) haveit=yes;;
3684 + if test -z "$haveit"; then
3685 + if test -d "$additional_includedir"; then
3686 + dnl Really add $additional_includedir to $CPPFLAGS.
3687 + CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir"
3692 + dnl Potentially add $additional_libdir to $LDFLAGS.
3693 + dnl But don't add it
3694 + dnl 1. if it's the standard /usr/lib,
3695 + dnl 2. if it's already present in $LDFLAGS,
3696 + dnl 3. if it's /usr/local/lib and we are using GCC on Linux,
3697 + dnl 4. if it doesn't exist as a directory.
3698 + if test "X$additional_libdir" != "X/usr/lib"; then
3700 + for x in $LDFLAGS; do
3701 + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
3702 + if test "X$x" = "X-L$additional_libdir"; then
3707 + if test -z "$haveit"; then
3708 + if test "X$additional_libdir" = "X/usr/local/lib"; then
3709 + if test -n "$GCC"; then
3711 + linux*) haveit=yes;;
3715 + if test -z "$haveit"; then
3716 + if test -d "$additional_libdir"; then
3717 + dnl Really add $additional_libdir to $LDFLAGS.
3718 + LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir"
3726 +dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix,
3727 +dnl acl_final_exec_prefix, containing the values to which $prefix and
3728 +dnl $exec_prefix will expand at the end of the configure script.
3729 +AC_DEFUN([AC_LIB_PREPARE_PREFIX],
3731 + dnl Unfortunately, prefix and exec_prefix get only finally determined
3732 + dnl at the end of configure.
3733 + if test "X$prefix" = "XNONE"; then
3734 + acl_final_prefix="$ac_default_prefix"
3736 + acl_final_prefix="$prefix"
3738 + if test "X$exec_prefix" = "XNONE"; then
3739 + acl_final_exec_prefix='${prefix}'
3741 + acl_final_exec_prefix="$exec_prefix"
3743 + acl_save_prefix="$prefix"
3744 + prefix="$acl_final_prefix"
3745 + eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
3746 + prefix="$acl_save_prefix"
3749 +dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the
3750 +dnl variables prefix and exec_prefix bound to the values they will have
3751 +dnl at the end of the configure script.
3752 +AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX],
3754 + acl_save_prefix="$prefix"
3755 + prefix="$acl_final_prefix"
3756 + acl_save_exec_prefix="$exec_prefix"
3757 + exec_prefix="$acl_final_exec_prefix"
3759 + exec_prefix="$acl_save_exec_prefix"
3760 + prefix="$acl_save_prefix"
3763 +# lib-link.m4 serial 3 (gettext-0.11.3)
3764 +dnl Copyright (C) 2001-2002 Free Software Foundation, Inc.
3765 +dnl This file is free software, distributed under the terms of the GNU
3766 +dnl General Public License. As a special exception to the GNU General
3767 +dnl Public License, this file may be distributed as part of a program
3768 +dnl that contains a configuration script generated by Autoconf, under
3769 +dnl the same distribution terms as the rest of that program.
3771 +dnl From Bruno Haible.
3773 +dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and
3774 +dnl the libraries corresponding to explicit and implicit dependencies.
3775 +dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and
3776 +dnl augments the CPPFLAGS variable.
3777 +AC_DEFUN([AC_LIB_LINKFLAGS],
3779 + AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
3780 + AC_REQUIRE([AC_LIB_RPATH])
3781 + define([Name],[translit([$1],[./-], [___])])
3782 + define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
3783 + [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
3784 + AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [
3785 + AC_LIB_LINKFLAGS_BODY([$1], [$2])
3786 + ac_cv_lib[]Name[]_libs="$LIB[]NAME"
3787 + ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME"
3788 + ac_cv_lib[]Name[]_cppflags="$INC[]NAME"
3790 + LIB[]NAME="$ac_cv_lib[]Name[]_libs"
3791 + LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs"
3792 + INC[]NAME="$ac_cv_lib[]Name[]_cppflags"
3793 + AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
3794 + AC_SUBST([LIB]NAME)
3795 + AC_SUBST([LTLIB]NAME)
3796 + dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the
3797 + dnl results of this search when this library appears as a dependency.
3798 + HAVE_LIB[]NAME=yes
3803 +dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode)
3804 +dnl searches for libname and the libraries corresponding to explicit and
3805 +dnl implicit dependencies, together with the specified include files and
3806 +dnl the ability to compile and link the specified testcode. If found, it
3807 +dnl sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} and
3808 +dnl LTLIB${NAME} variables and augments the CPPFLAGS variable, and
3809 +dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs
3810 +dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty.
3811 +AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
3813 + AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
3814 + AC_REQUIRE([AC_LIB_RPATH])
3815 + define([Name],[translit([$1],[./-], [___])])
3816 + define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
3817 + [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
3819 + dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME
3821 + AC_LIB_LINKFLAGS_BODY([$1], [$2])
3823 + dnl Add $INC[]NAME to CPPFLAGS before performing the following checks,
3824 + dnl because if the user has installed lib[]Name and not disabled its use
3825 + dnl via --without-lib[]Name-prefix, he wants to use it.
3826 + ac_save_CPPFLAGS="$CPPFLAGS"
3827 + AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
3829 + AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [
3830 + ac_save_LIBS="$LIBS"
3831 + LIBS="$LIBS $LIB[]NAME"
3832 + AC_TRY_LINK([$3], [$4], [ac_cv_lib[]Name=yes], [ac_cv_lib[]Name=no])
3833 + LIBS="$ac_save_LIBS"
3835 + if test "$ac_cv_lib[]Name" = yes; then
3836 + HAVE_LIB[]NAME=yes
3837 + AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the $1 library.])
3838 + AC_MSG_CHECKING([how to link with lib[]$1])
3839 + AC_MSG_RESULT([$LIB[]NAME])
3842 + dnl If $LIB[]NAME didn't lead to a usable library, we don't need
3843 + dnl $INC[]NAME either.
3844 + CPPFLAGS="$ac_save_CPPFLAGS"
3848 + AC_SUBST([HAVE_LIB]NAME)
3849 + AC_SUBST([LIB]NAME)
3850 + AC_SUBST([LTLIB]NAME)
3855 +dnl Determine the platform dependent parameters needed to use rpath:
3856 +dnl libext, shlibext, hardcode_libdir_flag_spec, hardcode_libdir_separator,
3857 +dnl hardcode_direct, hardcode_minus_L,
3858 +dnl sys_lib_search_path_spec, sys_lib_dlsearch_path_spec.
3859 +AC_DEFUN([AC_LIB_RPATH],
3861 + AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS
3862 + AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld
3863 + AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host
3864 + AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir
3865 + AC_CACHE_CHECK([for shared library run path origin], acl_cv_rpath, [
3866 + CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
3867 + ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
3869 + rm -f ./conftest.sh
3873 + libext="$acl_cv_libext"
3874 + shlibext="$acl_cv_shlibext"
3875 + hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
3876 + hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
3877 + hardcode_direct="$acl_cv_hardcode_direct"
3878 + hardcode_minus_L="$acl_cv_hardcode_minus_L"
3879 + sys_lib_search_path_spec="$acl_cv_sys_lib_search_path_spec"
3880 + sys_lib_dlsearch_path_spec="$acl_cv_sys_lib_dlsearch_path_spec"
3881 + dnl Determine whether the user wants rpath handling at all.
3882 + AC_ARG_ENABLE(rpath,
3883 + [ --disable-rpath do not hardcode runtime library paths],
3884 + :, enable_rpath=yes)
3887 +dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and
3888 +dnl the libraries corresponding to explicit and implicit dependencies.
3889 +dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables.
3890 +AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
3892 + define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
3893 + [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
3894 + dnl By default, look in $includedir and $libdir.
3895 + use_additional=yes
3896 + AC_LIB_WITH_FINAL_PREFIX([
3897 + eval additional_includedir=\"$includedir\"
3898 + eval additional_libdir=\"$libdir\"
3900 + AC_ARG_WITH([lib$1-prefix],
3901 +[ --with-lib$1-prefix[=DIR] search for lib$1 in DIR/include and DIR/lib
3902 + --without-lib$1-prefix don't search for lib$1 in includedir and libdir],
3904 + if test "X$withval" = "Xno"; then
3907 + if test "X$withval" = "X"; then
3908 + AC_LIB_WITH_FINAL_PREFIX([
3909 + eval additional_includedir=\"$includedir\"
3910 + eval additional_libdir=\"$libdir\"
3913 + additional_includedir="$withval/include"
3914 + additional_libdir="$withval/lib"
3918 + dnl Search the library and its dependencies in $additional_libdir and
3919 + dnl $LDFLAGS. Using breadth-first-seach.
3925 + names_already_handled=
3926 + names_next_round='$1 $2'
3927 + while test -n "$names_next_round"; do
3928 + names_this_round="$names_next_round"
3930 + for name in $names_this_round; do
3932 + for n in $names_already_handled; do
3933 + if test "$n" = "$name"; then
3934 + already_handled=yes
3938 + if test -z "$already_handled"; then
3939 + names_already_handled="$names_already_handled $name"
3940 + dnl See if it was already located by an earlier AC_LIB_LINKFLAGS
3941 + dnl or AC_LIB_HAVE_LINKFLAGS call.
3942 + uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
3943 + eval value=\"\$HAVE_LIB$uppername\"
3944 + if test -n "$value"; then
3945 + if test "$value" = yes; then
3946 + eval value=\"\$LIB$uppername\"
3947 + test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value"
3948 + eval value=\"\$LTLIB$uppername\"
3949 + test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value"
3951 + dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined
3952 + dnl that this library doesn't exist. So just drop it.
3956 + dnl Search the library lib$name in $additional_libdir and $LDFLAGS
3957 + dnl and the already constructed $LIBNAME/$LTLIBNAME.
3962 + if test $use_additional = yes; then
3963 + if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
3964 + found_dir="$additional_libdir"
3965 + found_so="$additional_libdir/lib$name.$shlibext"
3966 + if test -f "$additional_libdir/lib$name.la"; then
3967 + found_la="$additional_libdir/lib$name.la"
3970 + if test -f "$additional_libdir/lib$name.$libext"; then
3971 + found_dir="$additional_libdir"
3972 + found_a="$additional_libdir/lib$name.$libext"
3973 + if test -f "$additional_libdir/lib$name.la"; then
3974 + found_la="$additional_libdir/lib$name.la"
3979 + if test "X$found_dir" = "X"; then
3980 + for x in $LDFLAGS $LTLIB[]NAME; do
3981 + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
3984 + dir=`echo "X$x" | sed -e 's/^X-L//'`
3985 + if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
3987 + found_so="$dir/lib$name.$shlibext"
3988 + if test -f "$dir/lib$name.la"; then
3989 + found_la="$dir/lib$name.la"
3992 + if test -f "$dir/lib$name.$libext"; then
3994 + found_a="$dir/lib$name.$libext"
3995 + if test -f "$dir/lib$name.la"; then
3996 + found_la="$dir/lib$name.la"
4002 + if test "X$found_dir" != "X"; then
4007 + if test "X$found_dir" != "X"; then
4008 + dnl Found the library.
4009 + LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name"
4010 + if test "X$found_so" != "X"; then
4011 + dnl Linking with a shared library. We attempt to hardcode its
4012 + dnl directory into the executable's runpath, unless it's the
4013 + dnl standard /usr/lib.
4014 + if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
4015 + dnl No hardcoding is needed.
4016 + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
4018 + dnl Use an explicit option to hardcode DIR into the resulting
4020 + dnl Potentially add DIR to ltrpathdirs.
4021 + dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
4023 + for x in $ltrpathdirs; do
4024 + if test "X$x" = "X$found_dir"; then
4029 + if test -z "$haveit"; then
4030 + ltrpathdirs="$ltrpathdirs $found_dir"
4032 + dnl The hardcoding into $LIBNAME is system dependent.
4033 + if test "$hardcode_direct" = yes; then
4034 + dnl Using DIR/libNAME.so during linking hardcodes DIR into the
4035 + dnl resulting binary.
4036 + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
4038 + if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
4039 + dnl Use an explicit option to hardcode DIR into the resulting
4041 + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
4042 + dnl Potentially add DIR to rpathdirs.
4043 + dnl The rpathdirs will be appended to $LIBNAME at the end.
4045 + for x in $rpathdirs; do
4046 + if test "X$x" = "X$found_dir"; then
4051 + if test -z "$haveit"; then
4052 + rpathdirs="$rpathdirs $found_dir"
4055 + dnl Rely on "-L$found_dir".
4056 + dnl But don't add it if it's already contained in the LDFLAGS
4057 + dnl or the already constructed $LIBNAME
4059 + for x in $LDFLAGS $LIB[]NAME; do
4060 + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
4061 + if test "X$x" = "X-L$found_dir"; then
4066 + if test -z "$haveit"; then
4067 + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir"
4069 + if test "$hardcode_minus_L" != no; then
4070 + dnl FIXME: Not sure whether we should use
4071 + dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
4073 + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
4075 + dnl We cannot use $hardcode_runpath_var and LD_RUN_PATH
4076 + dnl here, because this doesn't fit in flags passed to the
4077 + dnl compiler. So give up. No hardcoding. This affects only
4078 + dnl very old systems.
4079 + dnl FIXME: Not sure whether we should use
4080 + dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
4082 + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
4088 + if test "X$found_a" != "X"; then
4089 + dnl Linking with a static library.
4090 + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a"
4092 + dnl We shouldn't come here, but anyway it's good to have a
4094 + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name"
4097 + dnl Assume the include files are nearby.
4098 + additional_includedir=
4099 + case "$found_dir" in
4101 + basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
4102 + additional_includedir="$basedir/include"
4105 + if test "X$additional_includedir" != "X"; then
4106 + dnl Potentially add $additional_includedir to $INCNAME.
4107 + dnl But don't add it
4108 + dnl 1. if it's the standard /usr/include,
4109 + dnl 2. if it's /usr/local/include and we are using GCC on Linux,
4110 + dnl 3. if it's already present in $CPPFLAGS or the already
4111 + dnl constructed $INCNAME,
4112 + dnl 4. if it doesn't exist as a directory.
4113 + if test "X$additional_includedir" != "X/usr/include"; then
4115 + if test "X$additional_includedir" = "X/usr/local/include"; then
4116 + if test -n "$GCC"; then
4118 + linux*) haveit=yes;;
4122 + if test -z "$haveit"; then
4123 + for x in $CPPFLAGS $INC[]NAME; do
4124 + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
4125 + if test "X$x" = "X-I$additional_includedir"; then
4130 + if test -z "$haveit"; then
4131 + if test -d "$additional_includedir"; then
4132 + dnl Really add $additional_includedir to $INCNAME.
4133 + INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir"
4139 + dnl Look for dependencies.
4140 + if test -n "$found_la"; then
4141 + dnl Read the .la file. It defines the variables
4142 + dnl dlname, library_names, old_library, dependency_libs, current,
4143 + dnl age, revision, installed, dlopen, dlpreopen, libdir.
4144 + save_libdir="$libdir"
4145 + case "$found_la" in
4146 + */* | *\\*) . "$found_la" ;;
4147 + *) . "./$found_la" ;;
4149 + libdir="$save_libdir"
4150 + dnl We use only dependency_libs.
4151 + for dep in $dependency_libs; do
4154 + additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
4155 + dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME.
4156 + dnl But don't add it
4157 + dnl 1. if it's the standard /usr/lib,
4158 + dnl 2. if it's /usr/local/lib and we are using GCC on Linux,
4159 + dnl 3. if it's already present in $LDFLAGS or the already
4160 + dnl constructed $LIBNAME,
4161 + dnl 4. if it doesn't exist as a directory.
4162 + if test "X$additional_libdir" != "X/usr/lib"; then
4164 + if test "X$additional_libdir" = "X/usr/local/lib"; then
4165 + if test -n "$GCC"; then
4167 + linux*) haveit=yes;;
4171 + if test -z "$haveit"; then
4173 + for x in $LDFLAGS $LIB[]NAME; do
4174 + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
4175 + if test "X$x" = "X-L$additional_libdir"; then
4180 + if test -z "$haveit"; then
4181 + if test -d "$additional_libdir"; then
4182 + dnl Really add $additional_libdir to $LIBNAME.
4183 + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir"
4187 + for x in $LDFLAGS $LTLIB[]NAME; do
4188 + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
4189 + if test "X$x" = "X-L$additional_libdir"; then
4194 + if test -z "$haveit"; then
4195 + if test -d "$additional_libdir"; then
4196 + dnl Really add $additional_libdir to $LTLIBNAME.
4197 + LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir"
4204 + dir=`echo "X$dep" | sed -e 's/^X-R//'`
4205 + if test "$enable_rpath" != no; then
4206 + dnl Potentially add DIR to rpathdirs.
4207 + dnl The rpathdirs will be appended to $LIBNAME at the end.
4209 + for x in $rpathdirs; do
4210 + if test "X$x" = "X$dir"; then
4215 + if test -z "$haveit"; then
4216 + rpathdirs="$rpathdirs $dir"
4218 + dnl Potentially add DIR to ltrpathdirs.
4219 + dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
4221 + for x in $ltrpathdirs; do
4222 + if test "X$x" = "X$dir"; then
4227 + if test -z "$haveit"; then
4228 + ltrpathdirs="$ltrpathdirs $dir"
4233 + dnl Handle this in the next round.
4234 + names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
4237 + dnl Handle this in the next round. Throw away the .la's
4238 + dnl directory; it is already contained in a preceding -L
4240 + names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
4243 + dnl Most likely an immediate library name.
4244 + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep"
4245 + LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep"
4251 + dnl Didn't find the library; assume it is in the system directories
4252 + dnl known to the linker and runtime loader. (All the system
4253 + dnl directories known to the linker should also be known to the
4254 + dnl runtime loader, otherwise the system is severely misconfigured.)
4255 + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
4256 + LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name"
4262 + if test "X$rpathdirs" != "X"; then
4263 + if test -n "$hardcode_libdir_separator"; then
4264 + dnl Weird platform: only the last -rpath option counts, the user must
4265 + dnl pass all path elements in one option. We can arrange that for a
4266 + dnl single library, but not when more than one $LIBNAMEs are used.
4268 + for found_dir in $rpathdirs; do
4269 + alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
4271 + dnl Note: hardcode_libdir_flag_spec uses $libdir and $wl.
4272 + acl_save_libdir="$libdir"
4274 + eval flag=\"$hardcode_libdir_flag_spec\"
4275 + libdir="$acl_save_libdir"
4276 + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
4278 + dnl The -rpath options are cumulative.
4279 + for found_dir in $rpathdirs; do
4280 + acl_save_libdir="$libdir"
4281 + libdir="$found_dir"
4282 + eval flag=\"$hardcode_libdir_flag_spec\"
4283 + libdir="$acl_save_libdir"
4284 + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
4288 + if test "X$ltrpathdirs" != "X"; then
4289 + dnl When using libtool, the option that works for both libraries and
4290 + dnl executables is -R. The -R options are cumulative.
4291 + for found_dir in $ltrpathdirs; do
4292 + LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir"
4297 +dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR,
4298 +dnl unless already present in VAR.
4299 +dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes
4300 +dnl contains two or three consecutive elements that belong together.
4301 +AC_DEFUN([AC_LIB_APPENDTOVAR],
4303 + for element in [$2]; do
4305 + for x in $[$1]; do
4306 + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
4307 + if test "X$x" = "X$element"; then
4312 + if test -z "$haveit"; then
4313 + [$1]="${[$1]}${[$1]:+ }$element"
4318 +# lib-ld.m4 serial 1 (gettext-0.11)
4319 +dnl Copyright (C) 1996-2002 Free Software Foundation, Inc.
4320 +dnl This file is free software, distributed under the terms of the GNU
4321 +dnl General Public License. As a special exception to the GNU General
4322 +dnl Public License, this file may be distributed as part of a program
4323 +dnl that contains a configuration script generated by Autoconf, under
4324 +dnl the same distribution terms as the rest of that program.
4326 +dnl Subroutines of libtool.m4,
4327 +dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision
4328 +dnl with libtool.m4.
4330 +dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no.
4331 +AC_DEFUN([AC_LIB_PROG_LD_GNU],
4332 +[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], acl_cv_prog_gnu_ld,
4333 +[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
4334 +if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
4335 + acl_cv_prog_gnu_ld=yes
4337 + acl_cv_prog_gnu_ld=no
4339 +with_gnu_ld=$acl_cv_prog_gnu_ld
4342 +dnl From libtool-1.4. Sets the variable LD.
4343 +AC_DEFUN([AC_LIB_PROG_LD],
4344 +[AC_ARG_WITH(gnu-ld,
4345 +[ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
4346 +test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
4347 +AC_REQUIRE([AC_PROG_CC])dnl
4348 +AC_REQUIRE([AC_CANONICAL_HOST])dnl
4350 +if test "$GCC" = yes; then
4351 + # Check if gcc -print-prog-name=ld gives a path.
4352 + AC_MSG_CHECKING([for ld used by GCC])
4355 + # gcc leaves a trailing carriage return which upsets mingw
4356 + ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
4358 + ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
4361 + # Accept absolute paths.
4362 + [[\\/]* | [A-Za-z]:[\\/]*)]
4363 + [re_direlt='/[^/][^/]*/\.\./']
4364 + # Canonicalize the path of ld
4365 + ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
4366 + while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
4367 + ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
4369 + test -z "$LD" && LD="$ac_prog"
4372 + # If it fails, then pretend we aren't using GCC.
4376 + # If it is relative, then search for the first ld in PATH.
4377 + with_gnu_ld=unknown
4380 +elif test "$with_gnu_ld" = yes; then
4381 + AC_MSG_CHECKING([for GNU ld])
4383 + AC_MSG_CHECKING([for non-GNU ld])
4385 +AC_CACHE_VAL(acl_cv_path_LD,
4386 +[if test -z "$LD"; then
4387 + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
4388 + for ac_dir in $PATH; do
4389 + test -z "$ac_dir" && ac_dir=.
4390 + if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
4391 + acl_cv_path_LD="$ac_dir/$ac_prog"
4392 + # Check to see if the program is GNU ld. I'd rather use --version,
4393 + # but apparently some GNU ld's only accept -v.
4394 + # Break only if it was the GNU/non-GNU ld that we prefer.
4395 + if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
4396 + test "$with_gnu_ld" != no && break
4398 + test "$with_gnu_ld" != yes && break
4402 + IFS="$ac_save_ifs"
4404 + acl_cv_path_LD="$LD" # Let the user override the test with a path.
4406 +LD="$acl_cv_path_LD"
4407 +if test -n "$LD"; then
4408 + AC_MSG_RESULT($LD)
4412 +test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
4416 +# iconv.m4 serial AM4 (gettext-0.11.3)
4417 +dnl Copyright (C) 2000-2002 Free Software Foundation, Inc.
4418 +dnl This file is free software, distributed under the terms of the GNU
4419 +dnl General Public License. As a special exception to the GNU General
4420 +dnl Public License, this file may be distributed as part of a program
4421 +dnl that contains a configuration script generated by Autoconf, under
4422 +dnl the same distribution terms as the rest of that program.
4424 +dnl From Bruno Haible.
4426 +AC_DEFUN([AM_ICONV_LINKFLAGS_BODY],
4428 + dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
4429 + AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
4430 + AC_REQUIRE([AC_LIB_RPATH])
4432 + dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
4434 + AC_LIB_LINKFLAGS_BODY([iconv])
4437 +AC_DEFUN([AM_ICONV_LINK],
4439 + dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and
4440 + dnl those with the standalone portable GNU libiconv installed).
4442 + dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
4444 + AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
4446 + dnl Add $INCICONV to CPPFLAGS before performing the following checks,
4447 + dnl because if the user has installed libiconv and not disabled its use
4448 + dnl via --without-libiconv-prefix, he wants to use it. The first
4449 + dnl AC_TRY_LINK will then fail, the second AC_TRY_LINK will succeed.
4450 + am_save_CPPFLAGS="$CPPFLAGS"
4451 + AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV])
4453 + AC_CACHE_CHECK(for iconv, am_cv_func_iconv, [
4454 + am_cv_func_iconv="no, consider installing GNU libiconv"
4455 + am_cv_lib_iconv=no
4456 + AC_TRY_LINK([#include <stdlib.h>
4457 +#include <iconv.h>],
4458 + [iconv_t cd = iconv_open("","");
4459 + iconv(cd,NULL,NULL,NULL,NULL);
4460 + iconv_close(cd);],
4461 + am_cv_func_iconv=yes)
4462 + if test "$am_cv_func_iconv" != yes; then
4463 + am_save_LIBS="$LIBS"
4464 + LIBS="$LIBS $LIBICONV"
4465 + AC_TRY_LINK([#include <stdlib.h>
4466 +#include <iconv.h>],
4467 + [iconv_t cd = iconv_open("","");
4468 + iconv(cd,NULL,NULL,NULL,NULL);
4469 + iconv_close(cd);],
4470 + am_cv_lib_iconv=yes
4471 + am_cv_func_iconv=yes)
4472 + LIBS="$am_save_LIBS"
4475 + if test "$am_cv_func_iconv" = yes; then
4476 + AC_DEFINE(HAVE_ICONV, 1, [Define if you have the iconv() function.])
4478 + if test "$am_cv_lib_iconv" = yes; then
4479 + AC_MSG_CHECKING([how to link with libiconv])
4480 + AC_MSG_RESULT([$LIBICONV])
4482 + dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV
4484 + CPPFLAGS="$am_save_CPPFLAGS"
4488 + AC_SUBST(LIBICONV)
4489 + AC_SUBST(LTLIBICONV)
4492 +AC_DEFUN([AM_ICONV],
4495 + if test "$am_cv_func_iconv" = yes; then
4496 + AC_MSG_CHECKING([for iconv declaration])
4497 + AC_CACHE_VAL(am_cv_proto_iconv, [
4499 +#include <stdlib.h>
4505 +#if defined(__STDC__) || defined(__cplusplus)
4506 +size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
4510 +], [], am_cv_proto_iconv_arg1="", am_cv_proto_iconv_arg1="const")
4511 + am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"])
4512 + am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
4513 + AC_MSG_RESULT([$]{ac_t:-
4514 + }[$]am_cv_proto_iconv)
4515 + AC_DEFINE_UNQUOTED(ICONV_CONST, $am_cv_proto_iconv_arg1,
4516 + [Define as const if the declaration of iconv() needs const.])
4520 +# progtest.m4 serial 2 (gettext-0.10.40)
4521 +dnl Copyright (C) 1996-2002 Free Software Foundation, Inc.
4522 +dnl This file is free software, distributed under the terms of the GNU
4523 +dnl General Public License. As a special exception to the GNU General
4524 +dnl Public License, this file may be distributed as part of a program
4525 +dnl that contains a configuration script generated by Autoconf, under
4526 +dnl the same distribution terms as the rest of that program.
4528 +dnl This file can can be used in projects which are not available under
4529 +dnl the GNU General Public License or the GNU Library General Public
4530 +dnl License but which still want to provide support for the GNU gettext
4532 +dnl Please note that the actual code of the GNU gettext library is covered
4533 +dnl by the GNU Library General Public License, and the rest of the GNU
4534 +dnl gettext package package is covered by the GNU General Public License.
4535 +dnl They are *not* in the public domain.
4537 -AC_SUBST(LIB_CREATE)
4538 -AC_SUBST(LIB_OBJECT)
4539 -AC_SUBST(LIB_SUFFIX)
4542 +dnl Ulrich Drepper <drepper@cygnus.com>, 1996.
4544 -AC_SUBST(LIB_CLEAN)
4545 -AC_SUBST(LIB_COMPILE)
4547 -AC_SUBST(LIB_INSTALL)
4548 -AC_SUBST(LIB_UNINSTALL)
4549 +# Search path for a program which passes the given test.
4551 +dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
4552 +dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
4553 +AC_DEFUN([AM_PATH_PROG_WITH_TEST],
4554 +[# Extract the first word of "$2", so it can be a program name with args.
4555 +set dummy $2; ac_word=[$]2
4556 +AC_MSG_CHECKING([for $ac_word])
4557 +AC_CACHE_VAL(ac_cv_path_$1,
4560 + ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
4563 + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
4564 + for ac_dir in ifelse([$5], , $PATH, [$5]); do
4565 + test -z "$ac_dir" && ac_dir=.
4566 + if test -f $ac_dir/$ac_word; then
4568 + ac_cv_path_$1="$ac_dir/$ac_word"
4573 + IFS="$ac_save_ifs"
4574 +dnl If no 4th arg is given, leave the cache variable unset,
4575 +dnl so AC_PATH_PROGS will keep looking.
4576 +ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
4578 -dnl ---------------------------------------------------------------------------
4579 -dnl CF_XOPEN_CURSES version: 8 updated: 2003/11/07 19:47:46
4580 -dnl ---------------
4581 -dnl Test if we should define X/Open source for curses, needed on Digital Unix
4582 -dnl 4.x, to see the extended functions, but breaks on IRIX 6.x.
4584 -dnl The getbegyx() check is needed for HPUX, which omits legacy macros such
4585 -dnl as getbegy(). The latter is better design, but the former is standard.
4586 -AC_DEFUN([CF_XOPEN_CURSES],
4588 -AC_REQUIRE([CF_CURSES_CPPFLAGS])dnl
4589 -AC_CACHE_CHECK(if we must define _XOPEN_SOURCE_EXTENDED,cf_cv_need_xopen_extension,[
4591 -#include <stdlib.h>
4592 -#include <${cf_cv_ncurses_header-curses.h}>],[
4593 - long x = winnstr(stdscr, "", 0);
4595 - getbegyx(stdscr, y1, x1)],
4596 - [cf_cv_need_xopen_extension=no],
4598 -#define _XOPEN_SOURCE_EXTENDED
4599 -#include <stdlib.h>
4600 -#include <${cf_cv_ncurses_header-curses.h}>],[
4601 - long x = winnstr(stdscr, "", 0);
4603 - getbegyx(stdscr, y1, x1)],
4604 - [cf_cv_need_xopen_extension=yes],
4605 - [cf_cv_need_xopen_extension=unknown])])])
4606 -test $cf_cv_need_xopen_extension = yes && CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
4608 -dnl ---------------------------------------------------------------------------
4609 -dnl CF_XOPEN_SOURCE version: 17 updated: 2005/02/06 12:07:45
4610 -dnl ---------------
4611 -dnl Try to get _XOPEN_SOURCE defined properly that we can use POSIX functions,
4612 -dnl or adapt to the vendor's definitions to get equivalent functionality.
4615 -dnl $1 is the nominal value for _XOPEN_SOURCE
4616 -dnl $2 is the nominal value for _POSIX_C_SOURCE
4617 -AC_DEFUN([CF_XOPEN_SOURCE],[
4620 +$1="$ac_cv_path_$1"
4621 +if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
4622 + AC_MSG_RESULT([$]$1)
4629 -cf_XOPEN_SOURCE=ifelse($1,,500,$1)
4630 -cf_POSIX_C_SOURCE=ifelse($2,,199506L,$2)
4631 +# glibc21.m4 serial 2 (fileutils-4.1.3, gettext-0.10.40)
4632 +dnl Copyright (C) 2000-2002 Free Software Foundation, Inc.
4633 +dnl This file is free software, distributed under the terms of the GNU
4634 +dnl General Public License. As a special exception to the GNU General
4635 +dnl Public License, this file may be distributed as part of a program
4636 +dnl that contains a configuration script generated by Autoconf, under
4637 +dnl the same distribution terms as the rest of that program.
4639 +# Test for the GNU C Library, version 2.1 or newer.
4640 +# From Bruno Haible.
4642 -case $host_os in #(vi
4644 - CPPFLAGS="$CPPFLAGS -D_ALL_SOURCE"
4647 - # 5.x headers associate
4648 - # _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
4649 - # _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
4650 - cf_POSIX_C_SOURCE=200112L
4651 - cf_XOPEN_SOURCE=600
4652 - CPPFLAGS="$CPPFLAGS -D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
4655 - CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE"
4658 - CPPFLAGS="$CPPFLAGS -D_SGI_SOURCE"
4664 - # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <arpa/inet.h>
4667 - # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
4670 - # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
4673 - CPPFLAGS="$CPPFLAGS -D_OSF_SOURCE"
4676 - # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
4679 - CPPFLAGS="$CPPFLAGS -D__EXTENSIONS__"
4682 - AC_CACHE_CHECK(if we should define _XOPEN_SOURCE,cf_cv_xopen_source,[
4683 - AC_TRY_COMPILE([#include <sys/types.h>],[
4684 -#ifndef _XOPEN_SOURCE
4687 - [cf_cv_xopen_source=no],
4688 - [cf_save="$CPPFLAGS"
4689 - CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
4690 - AC_TRY_COMPILE([#include <sys/types.h>],[
4691 -#ifdef _XOPEN_SOURCE
4694 - [cf_cv_xopen_source=no],
4695 - [cf_cv_xopen_source=$cf_XOPEN_SOURCE])
4696 - CPPFLAGS="$cf_save"
4699 -test "$cf_cv_xopen_source" != no && CPPFLAGS="$CPPFLAGS -U_XOPEN_SOURCE -D_XOPEN_SOURCE=$cf_cv_xopen_source"
4700 - CF_POSIX_C_SOURCE($cf_POSIX_C_SOURCE)
4704 -dnl ---------------------------------------------------------------------------
4705 -dnl jm_GLIBC21 version: 3 updated: 2002/10/27 23:21:42
4707 -dnl Inserted as requested by gettext 0.10.40
4708 -dnl File from /usr/share/aclocal
4710 -dnl ====================
4713 -dnl Test for the GNU C Library, version 2.1 or newer.
4714 -dnl From Bruno Haible.
4715 AC_DEFUN([jm_GLIBC21],
4717 AC_CACHE_CHECK(whether we are using the GNU C Library 2.1 or newer,
4718 @@ -2781,3 +3777,307 @@
4719 GLIBC21="$ac_cv_gnu_library_2_1"
4723 +# intdiv0.m4 serial 1 (gettext-0.11.3)
4724 +dnl Copyright (C) 2002 Free Software Foundation, Inc.
4725 +dnl This file is free software, distributed under the terms of the GNU
4726 +dnl General Public License. As a special exception to the GNU General
4727 +dnl Public License, this file may be distributed as part of a program
4728 +dnl that contains a configuration script generated by Autoconf, under
4729 +dnl the same distribution terms as the rest of that program.
4731 +dnl From Bruno Haible.
4733 +AC_DEFUN([gt_INTDIV0],
4735 + AC_REQUIRE([AC_PROG_CC])dnl
4736 + AC_REQUIRE([AC_CANONICAL_HOST])dnl
4738 + AC_CACHE_CHECK([whether integer division by zero raises SIGFPE],
4739 + gt_cv_int_divbyzero_sigfpe,
4742 +#include <stdlib.h>
4743 +#include <signal.h>
4747 +sigfpe_handler (int sig)
4749 +sigfpe_handler (sig) int sig;
4752 + /* Exit with code 0 if SIGFPE, with code 1 if any other signal. */
4753 + exit (sig != SIGFPE);
4763 + signal (SIGFPE, sigfpe_handler);
4764 +/* IRIX and AIX (when "xlc -qcheck" is used) yield signal SIGTRAP. */
4765 +#if (defined (__sgi) || defined (_AIX)) && defined (SIGTRAP)
4766 + signal (SIGTRAP, sigfpe_handler);
4768 +/* Linux/SPARC yields signal SIGILL. */
4769 +#if defined (__sparc__) && defined (__linux__)
4770 + signal (SIGILL, sigfpe_handler);
4777 +], gt_cv_int_divbyzero_sigfpe=yes, gt_cv_int_divbyzero_sigfpe=no,
4779 + # Guess based on the CPU.
4780 + case "$host_cpu" in
4781 + alpha* | i[34567]86 | m68k | s390*)
4782 + gt_cv_int_divbyzero_sigfpe="guessing yes";;
4784 + gt_cv_int_divbyzero_sigfpe="guessing no";;
4788 + case "$gt_cv_int_divbyzero_sigfpe" in
4792 + AC_DEFINE_UNQUOTED(INTDIV0_RAISES_SIGFPE, $value,
4793 + [Define if integer division by zero raises signal SIGFPE.])
4796 +# uintmax_t.m4 serial 6 (gettext-0.11)
4797 +dnl Copyright (C) 1997-2002 Free Software Foundation, Inc.
4798 +dnl This file is free software, distributed under the terms of the GNU
4799 +dnl General Public License. As a special exception to the GNU General
4800 +dnl Public License, this file may be distributed as part of a program
4801 +dnl that contains a configuration script generated by Autoconf, under
4802 +dnl the same distribution terms as the rest of that program.
4804 +dnl From Paul Eggert.
4808 +# Define uintmax_t to `unsigned long' or `unsigned long long'
4809 +# if <inttypes.h> does not exist.
4811 +AC_DEFUN([jm_AC_TYPE_UINTMAX_T],
4813 + AC_REQUIRE([jm_AC_HEADER_INTTYPES_H])
4814 + AC_REQUIRE([jm_AC_HEADER_STDINT_H])
4815 + if test $jm_ac_cv_header_inttypes_h = no && test $jm_ac_cv_header_stdint_h = no; then
4816 + AC_REQUIRE([jm_AC_TYPE_UNSIGNED_LONG_LONG])
4817 + test $ac_cv_type_unsigned_long_long = yes \
4818 + && ac_type='unsigned long long' \
4819 + || ac_type='unsigned long'
4820 + AC_DEFINE_UNQUOTED(uintmax_t, $ac_type,
4821 + [Define to unsigned long or unsigned long long
4822 + if <inttypes.h> and <stdint.h> don't define.])
4826 +# inttypes_h.m4 serial 4 (gettext-0.11.4)
4827 +dnl Copyright (C) 1997-2002 Free Software Foundation, Inc.
4828 +dnl This file is free software, distributed under the terms of the GNU
4829 +dnl General Public License. As a special exception to the GNU General
4830 +dnl Public License, this file may be distributed as part of a program
4831 +dnl that contains a configuration script generated by Autoconf, under
4832 +dnl the same distribution terms as the rest of that program.
4834 +dnl From Paul Eggert.
4836 +# Define HAVE_INTTYPES_H_WITH_UINTMAX if <inttypes.h> exists,
4837 +# doesn't clash with <sys/types.h>, and declares uintmax_t.
4839 +AC_DEFUN([jm_AC_HEADER_INTTYPES_H],
4841 + AC_CACHE_CHECK([for inttypes.h], jm_ac_cv_header_inttypes_h,
4843 + [#include <sys/types.h>
4844 +#include <inttypes.h>],
4845 + [uintmax_t i = (uintmax_t) -1;],
4846 + jm_ac_cv_header_inttypes_h=yes,
4847 + jm_ac_cv_header_inttypes_h=no)])
4848 + if test $jm_ac_cv_header_inttypes_h = yes; then
4849 + AC_DEFINE_UNQUOTED(HAVE_INTTYPES_H_WITH_UINTMAX, 1,
4850 +[Define if <inttypes.h> exists, doesn't clash with <sys/types.h>,
4851 + and declares uintmax_t. ])
4855 +# stdint_h.m4 serial 2 (gettext-0.11.4)
4856 +dnl Copyright (C) 1997-2002 Free Software Foundation, Inc.
4857 +dnl This file is free software, distributed under the terms of the GNU
4858 +dnl General Public License. As a special exception to the GNU General
4859 +dnl Public License, this file may be distributed as part of a program
4860 +dnl that contains a configuration script generated by Autoconf, under
4861 +dnl the same distribution terms as the rest of that program.
4863 +dnl From Paul Eggert.
4865 +# Define HAVE_STDINT_H_WITH_UINTMAX if <stdint.h> exists,
4866 +# doesn't clash with <sys/types.h>, and declares uintmax_t.
4868 +AC_DEFUN([jm_AC_HEADER_STDINT_H],
4870 + AC_CACHE_CHECK([for stdint.h], jm_ac_cv_header_stdint_h,
4872 + [#include <sys/types.h>
4873 +#include <stdint.h>],
4874 + [uintmax_t i = (uintmax_t) -1;],
4875 + jm_ac_cv_header_stdint_h=yes,
4876 + jm_ac_cv_header_stdint_h=no)])
4877 + if test $jm_ac_cv_header_stdint_h = yes; then
4878 + AC_DEFINE_UNQUOTED(HAVE_STDINT_H_WITH_UINTMAX, 1,
4879 +[Define if <stdint.h> exists, doesn't clash with <sys/types.h>,
4880 + and declares uintmax_t. ])
4884 +# ulonglong.m4 serial 2 (fileutils-4.0.32, gettext-0.10.40)
4885 +dnl Copyright (C) 1999-2002 Free Software Foundation, Inc.
4886 +dnl This file is free software, distributed under the terms of the GNU
4887 +dnl General Public License. As a special exception to the GNU General
4888 +dnl Public License, this file may be distributed as part of a program
4889 +dnl that contains a configuration script generated by Autoconf, under
4890 +dnl the same distribution terms as the rest of that program.
4892 +dnl From Paul Eggert.
4894 +AC_DEFUN([jm_AC_TYPE_UNSIGNED_LONG_LONG],
4896 + AC_CACHE_CHECK([for unsigned long long], ac_cv_type_unsigned_long_long,
4897 + [AC_TRY_LINK([unsigned long long ull = 1; int i = 63;],
4898 + [unsigned long long ullmax = (unsigned long long) -1;
4899 + return ull << i | ull >> i | ullmax / ull | ullmax % ull;],
4900 + ac_cv_type_unsigned_long_long=yes,
4901 + ac_cv_type_unsigned_long_long=no)])
4902 + if test $ac_cv_type_unsigned_long_long = yes; then
4903 + AC_DEFINE(HAVE_UNSIGNED_LONG_LONG, 1,
4904 + [Define if you have the unsigned long long type.])
4908 +# inttypes.m4 serial 1 (gettext-0.11.4)
4909 +dnl Copyright (C) 1997-2002 Free Software Foundation, Inc.
4910 +dnl This file is free software, distributed under the terms of the GNU
4911 +dnl General Public License. As a special exception to the GNU General
4912 +dnl Public License, this file may be distributed as part of a program
4913 +dnl that contains a configuration script generated by Autoconf, under
4914 +dnl the same distribution terms as the rest of that program.
4916 +dnl From Paul Eggert.
4918 +# Define HAVE_INTTYPES_H if <inttypes.h> exists and doesn't clash with
4921 +AC_DEFUN([gt_HEADER_INTTYPES_H],
4923 + AC_CACHE_CHECK([for inttypes.h], gt_cv_header_inttypes_h,
4926 + [#include <sys/types.h>
4927 +#include <inttypes.h>],
4928 + [], gt_cv_header_inttypes_h=yes, gt_cv_header_inttypes_h=no)
4930 + if test $gt_cv_header_inttypes_h = yes; then
4931 + AC_DEFINE_UNQUOTED(HAVE_INTTYPES_H, 1,
4932 + [Define if <inttypes.h> exists and doesn't clash with <sys/types.h>.])
4936 +# inttypes-pri.m4 serial 1 (gettext-0.11.4)
4937 +dnl Copyright (C) 1997-2002 Free Software Foundation, Inc.
4938 +dnl This file is free software, distributed under the terms of the GNU
4939 +dnl General Public License. As a special exception to the GNU General
4940 +dnl Public License, this file may be distributed as part of a program
4941 +dnl that contains a configuration script generated by Autoconf, under
4942 +dnl the same distribution terms as the rest of that program.
4944 +dnl From Bruno Haible.
4946 +# Define PRI_MACROS_BROKEN if <inttypes.h> exists and defines the PRI*
4947 +# macros to non-string values. This is the case on AIX 4.3.3.
4949 +AC_DEFUN([gt_INTTYPES_PRI],
4951 + AC_REQUIRE([gt_HEADER_INTTYPES_H])
4952 + if test $gt_cv_header_inttypes_h = yes; then
4953 + AC_CACHE_CHECK([whether the inttypes.h PRIxNN macros are broken],
4954 + gt_cv_inttypes_pri_broken,
4956 + AC_TRY_COMPILE([#include <inttypes.h>
4960 +], [], gt_cv_inttypes_pri_broken=no, gt_cv_inttypes_pri_broken=yes)
4963 + if test "$gt_cv_inttypes_pri_broken" = yes; then
4964 + AC_DEFINE_UNQUOTED(PRI_MACROS_BROKEN, 1,
4965 + [Define if <inttypes.h> exists and defines unusable PRI* macros.])
4969 +# codeset.m4 serial AM1 (gettext-0.10.40)
4970 +dnl Copyright (C) 2000-2002 Free Software Foundation, Inc.
4971 +dnl This file is free software, distributed under the terms of the GNU
4972 +dnl General Public License. As a special exception to the GNU General
4973 +dnl Public License, this file may be distributed as part of a program
4974 +dnl that contains a configuration script generated by Autoconf, under
4975 +dnl the same distribution terms as the rest of that program.
4977 +dnl From Bruno Haible.
4979 +AC_DEFUN([AM_LANGINFO_CODESET],
4981 + AC_CACHE_CHECK([for nl_langinfo and CODESET], am_cv_langinfo_codeset,
4982 + [AC_TRY_LINK([#include <langinfo.h>],
4983 + [char* cs = nl_langinfo(CODESET);],
4984 + am_cv_langinfo_codeset=yes,
4985 + am_cv_langinfo_codeset=no)
4987 + if test $am_cv_langinfo_codeset = yes; then
4988 + AC_DEFINE(HAVE_LANGINFO_CODESET, 1,
4989 + [Define if you have <langinfo.h> and nl_langinfo(CODESET).])
4993 +# lcmessage.m4 serial 3 (gettext-0.11.3)
4994 +dnl Copyright (C) 1995-2002 Free Software Foundation, Inc.
4995 +dnl This file is free software, distributed under the terms of the GNU
4996 +dnl General Public License. As a special exception to the GNU General
4997 +dnl Public License, this file may be distributed as part of a program
4998 +dnl that contains a configuration script generated by Autoconf, under
4999 +dnl the same distribution terms as the rest of that program.
5001 +dnl This file can can be used in projects which are not available under
5002 +dnl the GNU General Public License or the GNU Library General Public
5003 +dnl License but which still want to provide support for the GNU gettext
5005 +dnl Please note that the actual code of the GNU gettext library is covered
5006 +dnl by the GNU Library General Public License, and the rest of the GNU
5007 +dnl gettext package package is covered by the GNU General Public License.
5008 +dnl They are *not* in the public domain.
5011 +dnl Ulrich Drepper <drepper@cygnus.com>, 1995.
5013 +# Check whether LC_MESSAGES is available in <locale.h>.
5015 +AC_DEFUN([AM_LC_MESSAGES],
5017 + AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
5018 + [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
5019 + am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
5020 + if test $am_cv_val_LC_MESSAGES = yes; then
5021 + AC_DEFINE(HAVE_LC_MESSAGES, 1,
5022 + [Define if your <locale.h> file defines LC_MESSAGES.])
5026 Index: dialog-1.0-20050306/m4/codeset.m4
5027 ===================================================================
5028 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
5029 +++ dialog-1.0-20050306/m4/codeset.m4 2005-05-16 01:32:07.000000000 +0200
5031 +# codeset.m4 serial AM1 (gettext-0.10.40)
5032 +dnl Copyright (C) 2000-2002 Free Software Foundation, Inc.
5033 +dnl This file is free software, distributed under the terms of the GNU
5034 +dnl General Public License. As a special exception to the GNU General
5035 +dnl Public License, this file may be distributed as part of a program
5036 +dnl that contains a configuration script generated by Autoconf, under
5037 +dnl the same distribution terms as the rest of that program.
5039 +dnl From Bruno Haible.
5041 +AC_DEFUN([AM_LANGINFO_CODESET],
5043 + AC_CACHE_CHECK([for nl_langinfo and CODESET], am_cv_langinfo_codeset,
5044 + [AC_TRY_LINK([#include <langinfo.h>],
5045 + [char* cs = nl_langinfo(CODESET);],
5046 + am_cv_langinfo_codeset=yes,
5047 + am_cv_langinfo_codeset=no)
5049 + if test $am_cv_langinfo_codeset = yes; then
5050 + AC_DEFINE(HAVE_LANGINFO_CODESET, 1,
5051 + [Define if you have <langinfo.h> and nl_langinfo(CODESET).])
5054 Index: dialog-1.0-20050306/m4/gettext.m4
5055 ===================================================================
5056 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
5057 +++ dialog-1.0-20050306/m4/gettext.m4 2005-05-16 01:32:07.000000000 +0200
5059 +# gettext.m4 serial 17 (gettext-0.11.5)
5060 +dnl Copyright (C) 1995-2002 Free Software Foundation, Inc.
5061 +dnl This file is free software, distributed under the terms of the GNU
5062 +dnl General Public License. As a special exception to the GNU General
5063 +dnl Public License, this file may be distributed as part of a program
5064 +dnl that contains a configuration script generated by Autoconf, under
5065 +dnl the same distribution terms as the rest of that program.
5067 +dnl This file can can be used in projects which are not available under
5068 +dnl the GNU General Public License or the GNU Library General Public
5069 +dnl License but which still want to provide support for the GNU gettext
5071 +dnl Please note that the actual code of the GNU gettext library is covered
5072 +dnl by the GNU Library General Public License, and the rest of the GNU
5073 +dnl gettext package package is covered by the GNU General Public License.
5074 +dnl They are *not* in the public domain.
5077 +dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
5078 +dnl Bruno Haible <haible@clisp.cons.org>, 2000-2002.
5080 +dnl Macro to add for using GNU gettext.
5082 +dnl Usage: AM_GNU_GETTEXT([INTLSYMBOL], [NEEDSYMBOL], [INTLDIR]).
5083 +dnl INTLSYMBOL can be one of 'external', 'no-libtool', 'use-libtool'. The
5084 +dnl default (if it is not specified or empty) is 'no-libtool'.
5085 +dnl INTLSYMBOL should be 'external' for packages with no intl directory,
5086 +dnl and 'no-libtool' or 'use-libtool' for packages with an intl directory.
5087 +dnl If INTLSYMBOL is 'use-libtool', then a libtool library
5088 +dnl $(top_builddir)/intl/libintl.la will be created (shared and/or static,
5089 +dnl depending on --{enable,disable}-{shared,static} and on the presence of
5090 +dnl AM-DISABLE-SHARED). If INTLSYMBOL is 'no-libtool', a static library
5091 +dnl $(top_builddir)/intl/libintl.a will be created.
5092 +dnl If NEEDSYMBOL is specified and is 'need-ngettext', then GNU gettext
5093 +dnl implementations (in libc or libintl) without the ngettext() function
5094 +dnl will be ignored. If NEEDSYMBOL is specified and is
5095 +dnl 'need-formatstring-macros', then GNU gettext implementations that don't
5096 +dnl support the ISO C 99 <inttypes.h> formatstring macros will be ignored.
5097 +dnl INTLDIR is used to find the intl libraries. If empty,
5098 +dnl the value `$(top_builddir)/intl/' is used.
5100 +dnl The result of the configuration is one of three cases:
5101 +dnl 1) GNU gettext, as included in the intl subdirectory, will be compiled
5103 +dnl Catalog format: GNU --> install in $(datadir)
5104 +dnl Catalog extension: .mo after installation, .gmo in source tree
5105 +dnl 2) GNU gettext has been found in the system's C library.
5106 +dnl Catalog format: GNU --> install in $(datadir)
5107 +dnl Catalog extension: .mo after installation, .gmo in source tree
5108 +dnl 3) No internationalization, always use English msgid.
5109 +dnl Catalog format: none
5110 +dnl Catalog extension: none
5111 +dnl If INTLSYMBOL is 'external', only cases 2 and 3 can occur.
5112 +dnl The use of .gmo is historical (it was needed to avoid overwriting the
5113 +dnl GNU format catalogs when building on a platform with an X/Open gettext),
5114 +dnl but we keep it in order not to force irrelevant filename changes on the
5117 +AC_DEFUN([AM_GNU_GETTEXT],
5119 + dnl Argument checking.
5120 + ifelse([$1], [], , [ifelse([$1], [external], , [ifelse([$1], [no-libtool], , [ifelse([$1], [use-libtool], ,
5121 + [errprint([ERROR: invalid first argument to AM_GNU_GETTEXT
5123 + ifelse([$2], [], , [ifelse([$2], [need-ngettext], , [ifelse([$2], [need-formatstring-macros], ,
5124 + [errprint([ERROR: invalid second argument to AM_GNU_GETTEXT
5126 + define(gt_included_intl, ifelse([$1], [external], [no], [yes]))
5127 + define(gt_libtool_suffix_prefix, ifelse([$1], [use-libtool], [l], []))
5129 + AC_REQUIRE([AM_PO_SUBDIRS])dnl
5130 + ifelse(gt_included_intl, yes, [
5131 + AC_REQUIRE([AM_INTL_SUBDIR])dnl
5134 + dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
5135 + AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
5136 + AC_REQUIRE([AC_LIB_RPATH])
5138 + dnl Sometimes libintl requires libiconv, so first search for libiconv.
5139 + dnl Ideally we would do this search only after the
5140 + dnl if test "$USE_NLS" = "yes"; then
5141 + dnl if test "$gt_cv_func_gnugettext_libc" != "yes"; then
5142 + dnl tests. But if configure.in invokes AM_ICONV after AM_GNU_GETTEXT
5143 + dnl the configure script would need to contain the same shell code
5144 + dnl again, outside any 'if'. There are two solutions:
5145 + dnl - Invoke AM_ICONV_LINKFLAGS_BODY here, outside any 'if'.
5146 + dnl - Control the expansions in more detail using AC_PROVIDE_IFELSE.
5147 + dnl Since AC_PROVIDE_IFELSE is only in autoconf >= 2.52 and not
5148 + dnl documented, we avoid it.
5149 + ifelse(gt_included_intl, yes, , [
5150 + AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
5153 + AC_MSG_CHECKING([whether NLS is requested])
5154 + dnl Default is enabled NLS
5155 + AC_ARG_ENABLE(nls,
5156 + [ --disable-nls do not use Native Language Support],
5157 + USE_NLS=$enableval, USE_NLS=yes)
5158 + AC_MSG_RESULT($USE_NLS)
5161 + ifelse(gt_included_intl, yes, [
5162 + BUILD_INCLUDED_LIBINTL=no
5163 + USE_INCLUDED_LIBINTL=no
5169 + dnl If we use NLS figure out what method
5170 + if test "$USE_NLS" = "yes"; then
5171 + gt_use_preinstalled_gnugettext=no
5172 + ifelse(gt_included_intl, yes, [
5173 + AC_MSG_CHECKING([whether included gettext is requested])
5174 + AC_ARG_WITH(included-gettext,
5175 + [ --with-included-gettext use the GNU gettext library included here],
5176 + nls_cv_force_use_gnu_gettext=$withval,
5177 + nls_cv_force_use_gnu_gettext=no)
5178 + AC_MSG_RESULT($nls_cv_force_use_gnu_gettext)
5180 + nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
5181 + if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
5183 + dnl User does not insist on using GNU NLS library. Figure out what
5184 + dnl to use. If GNU gettext is available we use this. Else we have
5185 + dnl to fall back to GNU NLS library.
5187 + dnl Add a version number to the cache macros.
5188 + define([gt_api_version], ifelse([$2], [need-formatstring-macros], 3, ifelse([$2], [need-ngettext], 2, 1)))
5189 + define([gt_cv_func_gnugettext_libc], [gt_cv_func_gnugettext]gt_api_version[_libc])
5190 + define([gt_cv_func_gnugettext_libintl], [gt_cv_func_gnugettext]gt_api_version[_libintl])
5192 + AC_CACHE_CHECK([for GNU gettext in libc], gt_cv_func_gnugettext_libc,
5193 + [AC_TRY_LINK([#include <libintl.h>
5194 +]ifelse([$2], [need-formatstring-macros],
5195 +[#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
5196 +#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
5199 +typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
5200 +changequote([,])dnl
5201 +], [])[extern int _nl_msg_cat_cntr;
5202 +extern int *_nl_domain_bindings;],
5203 + [bindtextdomain ("", "");
5204 +return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_domain_bindings],
5205 + gt_cv_func_gnugettext_libc=yes,
5206 + gt_cv_func_gnugettext_libc=no)])
5208 + if test "$gt_cv_func_gnugettext_libc" != "yes"; then
5209 + dnl Sometimes libintl requires libiconv, so first search for libiconv.
5210 + ifelse(gt_included_intl, yes, , [
5213 + dnl Search for libintl and define LIBINTL, LTLIBINTL and INCINTL
5214 + dnl accordingly. Don't use AC_LIB_LINKFLAGS_BODY([intl],[iconv])
5215 + dnl because that would add "-liconv" to LIBINTL and LTLIBINTL
5216 + dnl even if libiconv doesn't exist.
5217 + AC_LIB_LINKFLAGS_BODY([intl])
5218 + AC_CACHE_CHECK([for GNU gettext in libintl],
5219 + gt_cv_func_gnugettext_libintl,
5220 + [gt_save_CPPFLAGS="$CPPFLAGS"
5221 + CPPFLAGS="$CPPFLAGS $INCINTL"
5222 + gt_save_LIBS="$LIBS"
5223 + LIBS="$LIBS $LIBINTL"
5224 + dnl Now see whether libintl exists and does not depend on libiconv.
5225 + AC_TRY_LINK([#include <libintl.h>
5226 +]ifelse([$2], [need-formatstring-macros],
5227 +[#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
5228 +#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
5231 +typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
5232 +changequote([,])dnl
5233 +], [])[extern int _nl_msg_cat_cntr;
5238 +const char *_nl_expand_alias ();],
5239 + [bindtextdomain ("", "");
5240 +return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_expand_alias (0)],
5241 + gt_cv_func_gnugettext_libintl=yes,
5242 + gt_cv_func_gnugettext_libintl=no)
5243 + dnl Now see whether libintl exists and depends on libiconv.
5244 + if test "$gt_cv_func_gnugettext_libintl" != yes && test -n "$LIBICONV"; then
5245 + LIBS="$LIBS $LIBICONV"
5246 + AC_TRY_LINK([#include <libintl.h>
5247 +]ifelse([$2], [need-formatstring-macros],
5248 +[#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
5249 +#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
5252 +typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
5253 +changequote([,])dnl
5254 +], [])[extern int _nl_msg_cat_cntr;
5259 +const char *_nl_expand_alias ();],
5260 + [bindtextdomain ("", "");
5261 +return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_expand_alias (0)],
5262 + [LIBINTL="$LIBINTL $LIBICONV"
5263 + LTLIBINTL="$LTLIBINTL $LTLIBICONV"
5264 + gt_cv_func_gnugettext_libintl=yes
5267 + CPPFLAGS="$gt_save_CPPFLAGS"
5268 + LIBS="$gt_save_LIBS"])
5271 + dnl If an already present or preinstalled GNU gettext() is found,
5272 + dnl use it. But if this macro is used in GNU gettext, and GNU
5273 + dnl gettext is already preinstalled in libintl, we update this
5274 + dnl libintl. (Cf. the install rule in intl/Makefile.in.)
5275 + if test "$gt_cv_func_gnugettext_libc" = "yes" \
5276 + || { test "$gt_cv_func_gnugettext_libintl" = "yes" \
5277 + && test "$PACKAGE" != gettext; }; then
5278 + gt_use_preinstalled_gnugettext=yes
5280 + dnl Reset the values set by searching for libintl.
5286 + ifelse(gt_included_intl, yes, [
5287 + if test "$gt_use_preinstalled_gnugettext" != "yes"; then
5288 + dnl GNU gettext is not found in the C library.
5289 + dnl Fall back on included GNU gettext library.
5290 + nls_cv_use_gnu_gettext=yes
5294 + if test "$nls_cv_use_gnu_gettext" = "yes"; then
5295 + dnl Mark actions used to generate GNU NLS library.
5296 + INTLOBJS="\$(GETTOBJS)"
5297 + BUILD_INCLUDED_LIBINTL=yes
5298 + USE_INCLUDED_LIBINTL=yes
5299 + LIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LIBICONV"
5300 + LTLIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LTLIBICONV"
5301 + LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'`
5304 + if test "$gt_use_preinstalled_gnugettext" = "yes" \
5305 + || test "$nls_cv_use_gnu_gettext" = "yes"; then
5306 + dnl Mark actions to use GNU gettext tools.
5311 + if test "$gt_use_preinstalled_gnugettext" = "yes" \
5312 + || test "$nls_cv_use_gnu_gettext" = "yes"; then
5313 + AC_DEFINE(ENABLE_NLS, 1,
5314 + [Define to 1 if translation of program messages to the user's native language
5321 + if test "$USE_NLS" = "yes"; then
5323 + if test "$gt_use_preinstalled_gnugettext" = "yes"; then
5324 + if test "$gt_cv_func_gnugettext_libintl" = "yes"; then
5325 + AC_MSG_CHECKING([how to link with libintl])
5326 + AC_MSG_RESULT([$LIBINTL])
5327 + AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCINTL])
5330 + dnl For backward compatibility. Some packages may be using this.
5331 + AC_DEFINE(HAVE_GETTEXT, 1,
5332 + [Define if the GNU gettext() function is already present or preinstalled.])
5333 + AC_DEFINE(HAVE_DCGETTEXT, 1,
5334 + [Define if the GNU dcgettext() function is already present or preinstalled.])
5337 + dnl We need to process the po/ directory.
5341 + ifelse(gt_included_intl, yes, [
5342 + dnl If this is used in GNU gettext we have to set BUILD_INCLUDED_LIBINTL
5343 + dnl to 'yes' because some of the testsuite requires it.
5344 + if test "$PACKAGE" = gettext; then
5345 + BUILD_INCLUDED_LIBINTL=yes
5348 + dnl Make all variables we use known to autoconf.
5349 + AC_SUBST(BUILD_INCLUDED_LIBINTL)
5350 + AC_SUBST(USE_INCLUDED_LIBINTL)
5351 + AC_SUBST(CATOBJEXT)
5352 + AC_SUBST(INTLOBJS)
5354 + dnl For backward compatibility. Some configure.ins may be using this.
5355 + nls_cv_header_intl=
5356 + nls_cv_header_libgt=
5358 + dnl For backward compatibility. Some Makefiles may be using this.
5360 + AC_SUBST(DATADIRNAME)
5362 + dnl For backward compatibility. Some Makefiles may be using this.
5364 + AC_SUBST(INSTOBJEXT)
5366 + dnl For backward compatibility. Some Makefiles may be using this.
5370 + dnl Enable libtool support if the surrounding package wishes it.
5371 + INTL_LIBTOOL_SUFFIX_PREFIX=gt_libtool_suffix_prefix
5372 + AC_SUBST(INTL_LIBTOOL_SUFFIX_PREFIX)
5375 + dnl For backward compatibility. Some Makefiles may be using this.
5376 + INTLLIBS="$LIBINTL"
5377 + AC_SUBST(INTLLIBS)
5379 + dnl Make all documented variables known to autoconf.
5381 + AC_SUBST(LTLIBINTL)
5386 +dnl Checks for all prerequisites of the po subdirectory,
5387 +dnl except for USE_NLS.
5388 +AC_DEFUN([AM_PO_SUBDIRS],
5390 + AC_REQUIRE([AC_PROG_MAKE_SET])dnl
5391 + AC_REQUIRE([AC_PROG_INSTALL])dnl
5392 + AC_REQUIRE([AM_MKINSTALLDIRS])dnl
5394 + dnl Perform the following tests also if --disable-nls has been given,
5395 + dnl because they are needed for "make dist" to work.
5397 + dnl Search for GNU msgfmt in the PATH.
5398 + dnl The first test excludes Solaris msgfmt and early GNU msgfmt versions.
5399 + dnl The second test excludes FreeBSD msgfmt.
5400 + AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
5401 + [$ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1 &&
5402 + (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
5404 + AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
5406 + dnl Search for GNU xgettext 0.11 or newer in the PATH.
5407 + dnl The first test excludes Solaris xgettext and early GNU xgettext versions.
5408 + dnl The second test excludes FreeBSD xgettext.
5409 + AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
5410 + [$ac_dir/$ac_word --omit-header --copyright-holder= /dev/null >/dev/null 2>&1 &&
5411 + (if $ac_dir/$ac_word --omit-header --copyright-holder= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
5413 + dnl Remove leftover from FreeBSD xgettext call.
5416 + dnl Search for GNU msgmerge 0.11 or newer in the PATH.
5417 + AM_PATH_PROG_WITH_TEST(MSGMERGE, msgmerge,
5418 + [$ac_dir/$ac_word --update -q /dev/null /dev/null >/dev/null 2>&1], :)
5420 + dnl This could go away some day; the PATH_PROG_WITH_TEST already does it.
5421 + dnl Test whether we really found GNU msgfmt.
5422 + if test "$GMSGFMT" != ":"; then
5423 + dnl If it is no GNU msgfmt we define it as : so that the
5424 + dnl Makefiles still can work.
5425 + if $GMSGFMT --statistics /dev/null >/dev/null 2>&1 &&
5426 + (if $GMSGFMT --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
5429 + GMSGFMT=`echo "$GMSGFMT" | sed -e 's,^.*/,,'`
5431 + [found $GMSGFMT program is not GNU msgfmt; ignore it])
5436 + dnl This could go away some day; the PATH_PROG_WITH_TEST already does it.
5437 + dnl Test whether we really found GNU xgettext.
5438 + if test "$XGETTEXT" != ":"; then
5439 + dnl If it is no GNU xgettext we define it as : so that the
5440 + dnl Makefiles still can work.
5441 + if $XGETTEXT --omit-header --copyright-holder= /dev/null >/dev/null 2>&1 &&
5442 + (if $XGETTEXT --omit-header --copyright-holder= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
5446 + [found xgettext program is not GNU xgettext; ignore it])
5449 + dnl Remove leftover from FreeBSD xgettext call.
5453 + AC_OUTPUT_COMMANDS([
5454 + for ac_file in $CONFIG_FILES; do
5455 + # Support "outfile[:infile[:infile...]]"
5456 + case "$ac_file" in
5457 + *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
5459 + # PO directories have a Makefile.in generated from Makefile.in.in.
5460 + case "$ac_file" in */Makefile.in)
5461 + # Adjust a relative srcdir.
5462 + ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
5463 + ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
5464 + ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
5465 + # In autoconf-2.13 it is called $ac_given_srcdir.
5466 + # In autoconf-2.50 it is called $srcdir.
5467 + test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
5468 + case "$ac_given_srcdir" in
5469 + .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
5470 + /*) top_srcdir="$ac_given_srcdir" ;;
5471 + *) top_srcdir="$ac_dots$ac_given_srcdir" ;;
5473 + if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
5474 + rm -f "$ac_dir/POTFILES"
5475 + test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
5476 + cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES"
5477 + # ALL_LINGUAS, POFILES, GMOFILES, UPDATEPOFILES, DUMMYPOFILES depend
5478 + # on $ac_dir but don't depend on user-specified configuration
5480 + if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
5481 + # The LINGUAS file contains the set of available languages.
5482 + if test -n "$ALL_LINGUAS"; then
5483 + test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
5485 + ALL_LINGUAS_=`sed -e "/^#/d" "$ac_given_srcdir/$ac_dir/LINGUAS"`
5486 + # Hide the ALL_LINGUAS assigment from automake.
5487 + eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
5489 + case "$ac_given_srcdir" in
5491 + *) srcdirpre='$(srcdir)/' ;;
5497 + for lang in $ALL_LINGUAS; do
5498 + POFILES="$POFILES $srcdirpre$lang.po"
5499 + GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
5500 + UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
5501 + DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
5503 + # CATALOGS depends on both $ac_dir and the user's LINGUAS
5504 + # environment variable.
5506 + if test -n "$ALL_LINGUAS"; then
5507 + for presentlang in $ALL_LINGUAS; do
5509 + if test "%UNSET%" != "$LINGUAS"; then
5510 + desiredlanguages="$LINGUAS"
5512 + desiredlanguages="$ALL_LINGUAS"
5514 + for desiredlang in $desiredlanguages; do
5515 + # Use the presentlang catalog if desiredlang is
5516 + # a. equal to presentlang, or
5517 + # b. a variant of presentlang (because in this case,
5518 + # presentlang can be used as a fallback for messages
5519 + # which are not translated in the desiredlang catalog).
5520 + case "$desiredlang" in
5521 + "$presentlang"*) useit=yes;;
5524 + if test $useit = yes; then
5525 + INST_LINGUAS="$INST_LINGUAS $presentlang"
5530 + if test -n "$INST_LINGUAS"; then
5531 + for lang in $INST_LINGUAS; do
5532 + CATALOGS="$CATALOGS $lang.gmo"
5535 + test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
5536 + sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile"
5537 + for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do
5538 + if test -f "$f"; then
5540 + *.orig | *.bak | *~) ;;
5541 + *) cat "$f" >> "$ac_dir/Makefile" ;;
5549 + [# Capture the value of obsolete ALL_LINGUAS because we need it to compute
5550 + # POFILES, GMOFILES, UPDATEPOFILES, DUMMYPOFILES, CATALOGS. But hide it
5552 + eval 'ALL_LINGUAS''="$ALL_LINGUAS"'
5553 + # Capture the value of LINGUAS because we need it to compute CATALOGS.
5554 + LINGUAS="${LINGUAS-%UNSET%}"
5559 +dnl Checks for all prerequisites of the intl subdirectory,
5560 +dnl except for INTL_LIBTOOL_SUFFIX_PREFIX (and possibly LIBTOOL), INTLOBJS,
5561 +dnl USE_INCLUDED_LIBINTL, BUILD_INCLUDED_LIBINTL.
5562 +AC_DEFUN([AM_INTL_SUBDIR],
5564 + AC_REQUIRE([AC_PROG_INSTALL])dnl
5565 + AC_REQUIRE([AM_MKINSTALLDIRS])dnl
5566 + AC_REQUIRE([AC_PROG_CC])dnl
5567 + AC_REQUIRE([AC_CANONICAL_HOST])dnl
5568 + AC_REQUIRE([AC_PROG_RANLIB])dnl
5569 + AC_REQUIRE([AC_ISC_POSIX])dnl
5570 + AC_REQUIRE([AC_HEADER_STDC])dnl
5571 + AC_REQUIRE([AC_C_CONST])dnl
5572 + AC_REQUIRE([AC_C_INLINE])dnl
5573 + AC_REQUIRE([AC_TYPE_OFF_T])dnl
5574 + AC_REQUIRE([AC_TYPE_SIZE_T])dnl
5575 + AC_REQUIRE([AC_FUNC_ALLOCA])dnl
5576 + AC_REQUIRE([AC_FUNC_MMAP])dnl
5577 + AC_REQUIRE([jm_GLIBC21])dnl
5578 + AC_REQUIRE([gt_INTDIV0])dnl
5579 + AC_REQUIRE([jm_AC_TYPE_UINTMAX_T])dnl
5580 + AC_REQUIRE([gt_HEADER_INTTYPES_H])dnl
5581 + AC_REQUIRE([gt_INTTYPES_PRI])dnl
5583 + AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h stddef.h \
5584 +stdlib.h string.h unistd.h sys/param.h])
5585 + AC_CHECK_FUNCS([feof_unlocked fgets_unlocked getc_unlocked getcwd getegid \
5586 +geteuid getgid getuid mempcpy munmap putenv setenv setlocale stpcpy \
5587 +strcasecmp strdup strtoul tsearch __argz_count __argz_stringify __argz_next])
5590 + AM_LANGINFO_CODESET
5591 + if test $ac_cv_header_locale_h = yes; then
5595 + dnl intl/plural.c is generated from intl/plural.y. It requires bison,
5596 + dnl because plural.y uses bison specific features. It requires at least
5597 + dnl bison-1.26 because earlier versions generate a plural.c that doesn't
5599 + dnl bison is only needed for the maintainer (who touches plural.y). But in
5600 + dnl order to avoid separate Makefiles or --enable-maintainer-mode, we put
5601 + dnl the rule in general Makefile. Now, some people carelessly touch the
5602 + dnl files or have a broken "make" program, hence the plural.c rule will
5603 + dnl sometimes fire. To avoid an error, defines BISON to ":" if it is not
5604 + dnl present or too old.
5605 + AC_CHECK_PROGS([INTLBISON], [bison])
5606 + if test -z "$INTLBISON"; then
5609 + dnl Found it, now check the version.
5610 + AC_MSG_CHECKING([version of bison])
5611 +changequote(<<,>>)dnl
5612 + ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
5613 + case $ac_prog_version in
5614 + '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
5615 + 1.2[6-9]* | 1.[3-9][0-9]* | [2-9].*)
5616 +changequote([,])dnl
5617 + ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
5618 + *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
5620 + AC_MSG_RESULT([$ac_prog_version])
5622 + if test $ac_verc_fail = yes; then
5628 +AC_DEFUN([AM_MKINSTALLDIRS],
5630 + dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
5631 + dnl find the mkinstalldirs script in another subdir but $(top_srcdir).
5632 + dnl Try to locate is.
5634 + if test -n "$ac_aux_dir"; then
5635 + MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
5637 + if test -z "$MKINSTALLDIRS"; then
5638 + MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
5640 + AC_SUBST(MKINSTALLDIRS)
5644 +dnl Usage: AM_GNU_GETTEXT_VERSION([gettext-version])
5645 +AC_DEFUN([AM_GNU_GETTEXT_VERSION], [])
5646 Index: dialog-1.0-20050306/m4/glibc21.m4
5647 ===================================================================
5648 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
5649 +++ dialog-1.0-20050306/m4/glibc21.m4 2005-05-16 01:32:07.000000000 +0200
5651 +# glibc21.m4 serial 2 (fileutils-4.1.3, gettext-0.10.40)
5652 +dnl Copyright (C) 2000-2002 Free Software Foundation, Inc.
5653 +dnl This file is free software, distributed under the terms of the GNU
5654 +dnl General Public License. As a special exception to the GNU General
5655 +dnl Public License, this file may be distributed as part of a program
5656 +dnl that contains a configuration script generated by Autoconf, under
5657 +dnl the same distribution terms as the rest of that program.
5659 +# Test for the GNU C Library, version 2.1 or newer.
5660 +# From Bruno Haible.
5662 +AC_DEFUN([jm_GLIBC21],
5664 + AC_CACHE_CHECK(whether we are using the GNU C Library 2.1 or newer,
5665 + ac_cv_gnu_library_2_1,
5666 + [AC_EGREP_CPP([Lucky GNU user],
5668 +#include <features.h>
5669 +#ifdef __GNU_LIBRARY__
5670 + #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)
5675 + ac_cv_gnu_library_2_1=yes,
5676 + ac_cv_gnu_library_2_1=no)
5680 + GLIBC21="$ac_cv_gnu_library_2_1"
5683 Index: dialog-1.0-20050306/m4/iconv.m4
5684 ===================================================================
5685 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
5686 +++ dialog-1.0-20050306/m4/iconv.m4 2005-05-16 01:32:07.000000000 +0200
5688 +# iconv.m4 serial AM4 (gettext-0.11.3)
5689 +dnl Copyright (C) 2000-2002 Free Software Foundation, Inc.
5690 +dnl This file is free software, distributed under the terms of the GNU
5691 +dnl General Public License. As a special exception to the GNU General
5692 +dnl Public License, this file may be distributed as part of a program
5693 +dnl that contains a configuration script generated by Autoconf, under
5694 +dnl the same distribution terms as the rest of that program.
5696 +dnl From Bruno Haible.
5698 +AC_DEFUN([AM_ICONV_LINKFLAGS_BODY],
5700 + dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
5701 + AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
5702 + AC_REQUIRE([AC_LIB_RPATH])
5704 + dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
5706 + AC_LIB_LINKFLAGS_BODY([iconv])
5709 +AC_DEFUN([AM_ICONV_LINK],
5711 + dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and
5712 + dnl those with the standalone portable GNU libiconv installed).
5714 + dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
5716 + AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
5718 + dnl Add $INCICONV to CPPFLAGS before performing the following checks,
5719 + dnl because if the user has installed libiconv and not disabled its use
5720 + dnl via --without-libiconv-prefix, he wants to use it. The first
5721 + dnl AC_TRY_LINK will then fail, the second AC_TRY_LINK will succeed.
5722 + am_save_CPPFLAGS="$CPPFLAGS"
5723 + AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV])
5725 + AC_CACHE_CHECK(for iconv, am_cv_func_iconv, [
5726 + am_cv_func_iconv="no, consider installing GNU libiconv"
5727 + am_cv_lib_iconv=no
5728 + AC_TRY_LINK([#include <stdlib.h>
5729 +#include <iconv.h>],
5730 + [iconv_t cd = iconv_open("","");
5731 + iconv(cd,NULL,NULL,NULL,NULL);
5732 + iconv_close(cd);],
5733 + am_cv_func_iconv=yes)
5734 + if test "$am_cv_func_iconv" != yes; then
5735 + am_save_LIBS="$LIBS"
5736 + LIBS="$LIBS $LIBICONV"
5737 + AC_TRY_LINK([#include <stdlib.h>
5738 +#include <iconv.h>],
5739 + [iconv_t cd = iconv_open("","");
5740 + iconv(cd,NULL,NULL,NULL,NULL);
5741 + iconv_close(cd);],
5742 + am_cv_lib_iconv=yes
5743 + am_cv_func_iconv=yes)
5744 + LIBS="$am_save_LIBS"
5747 + if test "$am_cv_func_iconv" = yes; then
5748 + AC_DEFINE(HAVE_ICONV, 1, [Define if you have the iconv() function.])
5750 + if test "$am_cv_lib_iconv" = yes; then
5751 + AC_MSG_CHECKING([how to link with libiconv])
5752 + AC_MSG_RESULT([$LIBICONV])
5754 + dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV
5756 + CPPFLAGS="$am_save_CPPFLAGS"
5760 + AC_SUBST(LIBICONV)
5761 + AC_SUBST(LTLIBICONV)
5764 +AC_DEFUN([AM_ICONV],
5767 + if test "$am_cv_func_iconv" = yes; then
5768 + AC_MSG_CHECKING([for iconv declaration])
5769 + AC_CACHE_VAL(am_cv_proto_iconv, [
5771 +#include <stdlib.h>
5777 +#if defined(__STDC__) || defined(__cplusplus)
5778 +size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
5782 +], [], am_cv_proto_iconv_arg1="", am_cv_proto_iconv_arg1="const")
5783 + am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"])
5784 + am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
5785 + AC_MSG_RESULT([$]{ac_t:-
5786 + }[$]am_cv_proto_iconv)
5787 + AC_DEFINE_UNQUOTED(ICONV_CONST, $am_cv_proto_iconv_arg1,
5788 + [Define as const if the declaration of iconv() needs const.])
5791 Index: dialog-1.0-20050306/m4/intdiv0.m4
5792 ===================================================================
5793 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
5794 +++ dialog-1.0-20050306/m4/intdiv0.m4 2005-05-16 01:32:07.000000000 +0200
5796 +# intdiv0.m4 serial 1 (gettext-0.11.3)
5797 +dnl Copyright (C) 2002 Free Software Foundation, Inc.
5798 +dnl This file is free software, distributed under the terms of the GNU
5799 +dnl General Public License. As a special exception to the GNU General
5800 +dnl Public License, this file may be distributed as part of a program
5801 +dnl that contains a configuration script generated by Autoconf, under
5802 +dnl the same distribution terms as the rest of that program.
5804 +dnl From Bruno Haible.
5806 +AC_DEFUN([gt_INTDIV0],
5808 + AC_REQUIRE([AC_PROG_CC])dnl
5809 + AC_REQUIRE([AC_CANONICAL_HOST])dnl
5811 + AC_CACHE_CHECK([whether integer division by zero raises SIGFPE],
5812 + gt_cv_int_divbyzero_sigfpe,
5815 +#include <stdlib.h>
5816 +#include <signal.h>
5820 +sigfpe_handler (int sig)
5822 +sigfpe_handler (sig) int sig;
5825 + /* Exit with code 0 if SIGFPE, with code 1 if any other signal. */
5826 + exit (sig != SIGFPE);
5836 + signal (SIGFPE, sigfpe_handler);
5837 +/* IRIX and AIX (when "xlc -qcheck" is used) yield signal SIGTRAP. */
5838 +#if (defined (__sgi) || defined (_AIX)) && defined (SIGTRAP)
5839 + signal (SIGTRAP, sigfpe_handler);
5841 +/* Linux/SPARC yields signal SIGILL. */
5842 +#if defined (__sparc__) && defined (__linux__)
5843 + signal (SIGILL, sigfpe_handler);
5850 +], gt_cv_int_divbyzero_sigfpe=yes, gt_cv_int_divbyzero_sigfpe=no,
5852 + # Guess based on the CPU.
5853 + case "$host_cpu" in
5854 + alpha* | i[34567]86 | m68k | s390*)
5855 + gt_cv_int_divbyzero_sigfpe="guessing yes";;
5857 + gt_cv_int_divbyzero_sigfpe="guessing no";;
5861 + case "$gt_cv_int_divbyzero_sigfpe" in
5865 + AC_DEFINE_UNQUOTED(INTDIV0_RAISES_SIGFPE, $value,
5866 + [Define if integer division by zero raises signal SIGFPE.])
5868 Index: dialog-1.0-20050306/m4/inttypes-pri.m4
5869 ===================================================================
5870 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
5871 +++ dialog-1.0-20050306/m4/inttypes-pri.m4 2005-05-16 01:32:07.000000000 +0200
5873 +# inttypes-pri.m4 serial 1 (gettext-0.11.4)
5874 +dnl Copyright (C) 1997-2002 Free Software Foundation, Inc.
5875 +dnl This file is free software, distributed under the terms of the GNU
5876 +dnl General Public License. As a special exception to the GNU General
5877 +dnl Public License, this file may be distributed as part of a program
5878 +dnl that contains a configuration script generated by Autoconf, under
5879 +dnl the same distribution terms as the rest of that program.
5881 +dnl From Bruno Haible.
5883 +# Define PRI_MACROS_BROKEN if <inttypes.h> exists and defines the PRI*
5884 +# macros to non-string values. This is the case on AIX 4.3.3.
5886 +AC_DEFUN([gt_INTTYPES_PRI],
5888 + AC_REQUIRE([gt_HEADER_INTTYPES_H])
5889 + if test $gt_cv_header_inttypes_h = yes; then
5890 + AC_CACHE_CHECK([whether the inttypes.h PRIxNN macros are broken],
5891 + gt_cv_inttypes_pri_broken,
5893 + AC_TRY_COMPILE([#include <inttypes.h>
5897 +], [], gt_cv_inttypes_pri_broken=no, gt_cv_inttypes_pri_broken=yes)
5900 + if test "$gt_cv_inttypes_pri_broken" = yes; then
5901 + AC_DEFINE_UNQUOTED(PRI_MACROS_BROKEN, 1,
5902 + [Define if <inttypes.h> exists and defines unusable PRI* macros.])
5905 Index: dialog-1.0-20050306/m4/inttypes.m4
5906 ===================================================================
5907 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
5908 +++ dialog-1.0-20050306/m4/inttypes.m4 2005-05-16 01:32:07.000000000 +0200
5910 +# inttypes.m4 serial 1 (gettext-0.11.4)
5911 +dnl Copyright (C) 1997-2002 Free Software Foundation, Inc.
5912 +dnl This file is free software, distributed under the terms of the GNU
5913 +dnl General Public License. As a special exception to the GNU General
5914 +dnl Public License, this file may be distributed as part of a program
5915 +dnl that contains a configuration script generated by Autoconf, under
5916 +dnl the same distribution terms as the rest of that program.
5918 +dnl From Paul Eggert.
5920 +# Define HAVE_INTTYPES_H if <inttypes.h> exists and doesn't clash with
5923 +AC_DEFUN([gt_HEADER_INTTYPES_H],
5925 + AC_CACHE_CHECK([for inttypes.h], gt_cv_header_inttypes_h,
5928 + [#include <sys/types.h>
5929 +#include <inttypes.h>],
5930 + [], gt_cv_header_inttypes_h=yes, gt_cv_header_inttypes_h=no)
5932 + if test $gt_cv_header_inttypes_h = yes; then
5933 + AC_DEFINE_UNQUOTED(HAVE_INTTYPES_H, 1,
5934 + [Define if <inttypes.h> exists and doesn't clash with <sys/types.h>.])
5937 Index: dialog-1.0-20050306/m4/inttypes_h.m4
5938 ===================================================================
5939 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
5940 +++ dialog-1.0-20050306/m4/inttypes_h.m4 2005-05-16 01:32:07.000000000 +0200
5942 +# inttypes_h.m4 serial 4 (gettext-0.11.4)
5943 +dnl Copyright (C) 1997-2002 Free Software Foundation, Inc.
5944 +dnl This file is free software, distributed under the terms of the GNU
5945 +dnl General Public License. As a special exception to the GNU General
5946 +dnl Public License, this file may be distributed as part of a program
5947 +dnl that contains a configuration script generated by Autoconf, under
5948 +dnl the same distribution terms as the rest of that program.
5950 +dnl From Paul Eggert.
5952 +# Define HAVE_INTTYPES_H_WITH_UINTMAX if <inttypes.h> exists,
5953 +# doesn't clash with <sys/types.h>, and declares uintmax_t.
5955 +AC_DEFUN([jm_AC_HEADER_INTTYPES_H],
5957 + AC_CACHE_CHECK([for inttypes.h], jm_ac_cv_header_inttypes_h,
5959 + [#include <sys/types.h>
5960 +#include <inttypes.h>],
5961 + [uintmax_t i = (uintmax_t) -1;],
5962 + jm_ac_cv_header_inttypes_h=yes,
5963 + jm_ac_cv_header_inttypes_h=no)])
5964 + if test $jm_ac_cv_header_inttypes_h = yes; then
5965 + AC_DEFINE_UNQUOTED(HAVE_INTTYPES_H_WITH_UINTMAX, 1,
5966 +[Define if <inttypes.h> exists, doesn't clash with <sys/types.h>,
5967 + and declares uintmax_t. ])
5970 Index: dialog-1.0-20050306/m4/lcmessage.m4
5971 ===================================================================
5972 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
5973 +++ dialog-1.0-20050306/m4/lcmessage.m4 2005-05-16 01:32:07.000000000 +0200
5975 +# lcmessage.m4 serial 3 (gettext-0.11.3)
5976 +dnl Copyright (C) 1995-2002 Free Software Foundation, Inc.
5977 +dnl This file is free software, distributed under the terms of the GNU
5978 +dnl General Public License. As a special exception to the GNU General
5979 +dnl Public License, this file may be distributed as part of a program
5980 +dnl that contains a configuration script generated by Autoconf, under
5981 +dnl the same distribution terms as the rest of that program.
5983 +dnl This file can can be used in projects which are not available under
5984 +dnl the GNU General Public License or the GNU Library General Public
5985 +dnl License but which still want to provide support for the GNU gettext
5987 +dnl Please note that the actual code of the GNU gettext library is covered
5988 +dnl by the GNU Library General Public License, and the rest of the GNU
5989 +dnl gettext package package is covered by the GNU General Public License.
5990 +dnl They are *not* in the public domain.
5993 +dnl Ulrich Drepper <drepper@cygnus.com>, 1995.
5995 +# Check whether LC_MESSAGES is available in <locale.h>.
5997 +AC_DEFUN([AM_LC_MESSAGES],
5999 + AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
6000 + [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
6001 + am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
6002 + if test $am_cv_val_LC_MESSAGES = yes; then
6003 + AC_DEFINE(HAVE_LC_MESSAGES, 1,
6004 + [Define if your <locale.h> file defines LC_MESSAGES.])
6007 Index: dialog-1.0-20050306/m4/lib-ld.m4
6008 ===================================================================
6009 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
6010 +++ dialog-1.0-20050306/m4/lib-ld.m4 2005-05-16 01:32:07.000000000 +0200
6012 +# lib-ld.m4 serial 1 (gettext-0.11)
6013 +dnl Copyright (C) 1996-2002 Free Software Foundation, Inc.
6014 +dnl This file is free software, distributed under the terms of the GNU
6015 +dnl General Public License. As a special exception to the GNU General
6016 +dnl Public License, this file may be distributed as part of a program
6017 +dnl that contains a configuration script generated by Autoconf, under
6018 +dnl the same distribution terms as the rest of that program.
6020 +dnl Subroutines of libtool.m4,
6021 +dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision
6022 +dnl with libtool.m4.
6024 +dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no.
6025 +AC_DEFUN([AC_LIB_PROG_LD_GNU],
6026 +[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], acl_cv_prog_gnu_ld,
6027 +[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
6028 +if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
6029 + acl_cv_prog_gnu_ld=yes
6031 + acl_cv_prog_gnu_ld=no
6033 +with_gnu_ld=$acl_cv_prog_gnu_ld
6036 +dnl From libtool-1.4. Sets the variable LD.
6037 +AC_DEFUN([AC_LIB_PROG_LD],
6038 +[AC_ARG_WITH(gnu-ld,
6039 +[ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
6040 +test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
6041 +AC_REQUIRE([AC_PROG_CC])dnl
6042 +AC_REQUIRE([AC_CANONICAL_HOST])dnl
6044 +if test "$GCC" = yes; then
6045 + # Check if gcc -print-prog-name=ld gives a path.
6046 + AC_MSG_CHECKING([for ld used by GCC])
6049 + # gcc leaves a trailing carriage return which upsets mingw
6050 + ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
6052 + ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
6055 + # Accept absolute paths.
6056 + [[\\/]* | [A-Za-z]:[\\/]*)]
6057 + [re_direlt='/[^/][^/]*/\.\./']
6058 + # Canonicalize the path of ld
6059 + ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
6060 + while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
6061 + ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
6063 + test -z "$LD" && LD="$ac_prog"
6066 + # If it fails, then pretend we aren't using GCC.
6070 + # If it is relative, then search for the first ld in PATH.
6071 + with_gnu_ld=unknown
6074 +elif test "$with_gnu_ld" = yes; then
6075 + AC_MSG_CHECKING([for GNU ld])
6077 + AC_MSG_CHECKING([for non-GNU ld])
6079 +AC_CACHE_VAL(acl_cv_path_LD,
6080 +[if test -z "$LD"; then
6081 + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
6082 + for ac_dir in $PATH; do
6083 + test -z "$ac_dir" && ac_dir=.
6084 + if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
6085 + acl_cv_path_LD="$ac_dir/$ac_prog"
6086 + # Check to see if the program is GNU ld. I'd rather use --version,
6087 + # but apparently some GNU ld's only accept -v.
6088 + # Break only if it was the GNU/non-GNU ld that we prefer.
6089 + if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
6090 + test "$with_gnu_ld" != no && break
6092 + test "$with_gnu_ld" != yes && break
6096 + IFS="$ac_save_ifs"
6098 + acl_cv_path_LD="$LD" # Let the user override the test with a path.
6100 +LD="$acl_cv_path_LD"
6101 +if test -n "$LD"; then
6102 + AC_MSG_RESULT($LD)
6106 +test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
6109 Index: dialog-1.0-20050306/m4/lib-link.m4
6110 ===================================================================
6111 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
6112 +++ dialog-1.0-20050306/m4/lib-link.m4 2005-05-16 01:32:07.000000000 +0200
6114 +# lib-link.m4 serial 3 (gettext-0.11.3)
6115 +dnl Copyright (C) 2001-2002 Free Software Foundation, Inc.
6116 +dnl This file is free software, distributed under the terms of the GNU
6117 +dnl General Public License. As a special exception to the GNU General
6118 +dnl Public License, this file may be distributed as part of a program
6119 +dnl that contains a configuration script generated by Autoconf, under
6120 +dnl the same distribution terms as the rest of that program.
6122 +dnl From Bruno Haible.
6124 +dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and
6125 +dnl the libraries corresponding to explicit and implicit dependencies.
6126 +dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and
6127 +dnl augments the CPPFLAGS variable.
6128 +AC_DEFUN([AC_LIB_LINKFLAGS],
6130 + AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
6131 + AC_REQUIRE([AC_LIB_RPATH])
6132 + define([Name],[translit([$1],[./-], [___])])
6133 + define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
6134 + [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
6135 + AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [
6136 + AC_LIB_LINKFLAGS_BODY([$1], [$2])
6137 + ac_cv_lib[]Name[]_libs="$LIB[]NAME"
6138 + ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME"
6139 + ac_cv_lib[]Name[]_cppflags="$INC[]NAME"
6141 + LIB[]NAME="$ac_cv_lib[]Name[]_libs"
6142 + LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs"
6143 + INC[]NAME="$ac_cv_lib[]Name[]_cppflags"
6144 + AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
6145 + AC_SUBST([LIB]NAME)
6146 + AC_SUBST([LTLIB]NAME)
6147 + dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the
6148 + dnl results of this search when this library appears as a dependency.
6149 + HAVE_LIB[]NAME=yes
6154 +dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode)
6155 +dnl searches for libname and the libraries corresponding to explicit and
6156 +dnl implicit dependencies, together with the specified include files and
6157 +dnl the ability to compile and link the specified testcode. If found, it
6158 +dnl sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} and
6159 +dnl LTLIB${NAME} variables and augments the CPPFLAGS variable, and
6160 +dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs
6161 +dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty.
6162 +AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
6164 + AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
6165 + AC_REQUIRE([AC_LIB_RPATH])
6166 + define([Name],[translit([$1],[./-], [___])])
6167 + define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
6168 + [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
6170 + dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME
6172 + AC_LIB_LINKFLAGS_BODY([$1], [$2])
6174 + dnl Add $INC[]NAME to CPPFLAGS before performing the following checks,
6175 + dnl because if the user has installed lib[]Name and not disabled its use
6176 + dnl via --without-lib[]Name-prefix, he wants to use it.
6177 + ac_save_CPPFLAGS="$CPPFLAGS"
6178 + AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
6180 + AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [
6181 + ac_save_LIBS="$LIBS"
6182 + LIBS="$LIBS $LIB[]NAME"
6183 + AC_TRY_LINK([$3], [$4], [ac_cv_lib[]Name=yes], [ac_cv_lib[]Name=no])
6184 + LIBS="$ac_save_LIBS"
6186 + if test "$ac_cv_lib[]Name" = yes; then
6187 + HAVE_LIB[]NAME=yes
6188 + AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the $1 library.])
6189 + AC_MSG_CHECKING([how to link with lib[]$1])
6190 + AC_MSG_RESULT([$LIB[]NAME])
6193 + dnl If $LIB[]NAME didn't lead to a usable library, we don't need
6194 + dnl $INC[]NAME either.
6195 + CPPFLAGS="$ac_save_CPPFLAGS"
6199 + AC_SUBST([HAVE_LIB]NAME)
6200 + AC_SUBST([LIB]NAME)
6201 + AC_SUBST([LTLIB]NAME)
6206 +dnl Determine the platform dependent parameters needed to use rpath:
6207 +dnl libext, shlibext, hardcode_libdir_flag_spec, hardcode_libdir_separator,
6208 +dnl hardcode_direct, hardcode_minus_L,
6209 +dnl sys_lib_search_path_spec, sys_lib_dlsearch_path_spec.
6210 +AC_DEFUN([AC_LIB_RPATH],
6212 + AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS
6213 + AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld
6214 + AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host
6215 + AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir
6216 + AC_CACHE_CHECK([for shared library run path origin], acl_cv_rpath, [
6217 + CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
6218 + ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
6220 + rm -f ./conftest.sh
6224 + libext="$acl_cv_libext"
6225 + shlibext="$acl_cv_shlibext"
6226 + hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
6227 + hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
6228 + hardcode_direct="$acl_cv_hardcode_direct"
6229 + hardcode_minus_L="$acl_cv_hardcode_minus_L"
6230 + sys_lib_search_path_spec="$acl_cv_sys_lib_search_path_spec"
6231 + sys_lib_dlsearch_path_spec="$acl_cv_sys_lib_dlsearch_path_spec"
6232 + dnl Determine whether the user wants rpath handling at all.
6233 + AC_ARG_ENABLE(rpath,
6234 + [ --disable-rpath do not hardcode runtime library paths],
6235 + :, enable_rpath=yes)
6238 +dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and
6239 +dnl the libraries corresponding to explicit and implicit dependencies.
6240 +dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables.
6241 +AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
6243 + define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
6244 + [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
6245 + dnl By default, look in $includedir and $libdir.
6246 + use_additional=yes
6247 + AC_LIB_WITH_FINAL_PREFIX([
6248 + eval additional_includedir=\"$includedir\"
6249 + eval additional_libdir=\"$libdir\"
6251 + AC_ARG_WITH([lib$1-prefix],
6252 +[ --with-lib$1-prefix[=DIR] search for lib$1 in DIR/include and DIR/lib
6253 + --without-lib$1-prefix don't search for lib$1 in includedir and libdir],
6255 + if test "X$withval" = "Xno"; then
6258 + if test "X$withval" = "X"; then
6259 + AC_LIB_WITH_FINAL_PREFIX([
6260 + eval additional_includedir=\"$includedir\"
6261 + eval additional_libdir=\"$libdir\"
6264 + additional_includedir="$withval/include"
6265 + additional_libdir="$withval/lib"
6269 + dnl Search the library and its dependencies in $additional_libdir and
6270 + dnl $LDFLAGS. Using breadth-first-seach.
6276 + names_already_handled=
6277 + names_next_round='$1 $2'
6278 + while test -n "$names_next_round"; do
6279 + names_this_round="$names_next_round"
6281 + for name in $names_this_round; do
6283 + for n in $names_already_handled; do
6284 + if test "$n" = "$name"; then
6285 + already_handled=yes
6289 + if test -z "$already_handled"; then
6290 + names_already_handled="$names_already_handled $name"
6291 + dnl See if it was already located by an earlier AC_LIB_LINKFLAGS
6292 + dnl or AC_LIB_HAVE_LINKFLAGS call.
6293 + uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
6294 + eval value=\"\$HAVE_LIB$uppername\"
6295 + if test -n "$value"; then
6296 + if test "$value" = yes; then
6297 + eval value=\"\$LIB$uppername\"
6298 + test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value"
6299 + eval value=\"\$LTLIB$uppername\"
6300 + test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value"
6302 + dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined
6303 + dnl that this library doesn't exist. So just drop it.
6307 + dnl Search the library lib$name in $additional_libdir and $LDFLAGS
6308 + dnl and the already constructed $LIBNAME/$LTLIBNAME.
6313 + if test $use_additional = yes; then
6314 + if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
6315 + found_dir="$additional_libdir"
6316 + found_so="$additional_libdir/lib$name.$shlibext"
6317 + if test -f "$additional_libdir/lib$name.la"; then
6318 + found_la="$additional_libdir/lib$name.la"
6321 + if test -f "$additional_libdir/lib$name.$libext"; then
6322 + found_dir="$additional_libdir"
6323 + found_a="$additional_libdir/lib$name.$libext"
6324 + if test -f "$additional_libdir/lib$name.la"; then
6325 + found_la="$additional_libdir/lib$name.la"
6330 + if test "X$found_dir" = "X"; then
6331 + for x in $LDFLAGS $LTLIB[]NAME; do
6332 + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
6335 + dir=`echo "X$x" | sed -e 's/^X-L//'`
6336 + if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
6338 + found_so="$dir/lib$name.$shlibext"
6339 + if test -f "$dir/lib$name.la"; then
6340 + found_la="$dir/lib$name.la"
6343 + if test -f "$dir/lib$name.$libext"; then
6345 + found_a="$dir/lib$name.$libext"
6346 + if test -f "$dir/lib$name.la"; then
6347 + found_la="$dir/lib$name.la"
6353 + if test "X$found_dir" != "X"; then
6358 + if test "X$found_dir" != "X"; then
6359 + dnl Found the library.
6360 + LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name"
6361 + if test "X$found_so" != "X"; then
6362 + dnl Linking with a shared library. We attempt to hardcode its
6363 + dnl directory into the executable's runpath, unless it's the
6364 + dnl standard /usr/lib.
6365 + if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
6366 + dnl No hardcoding is needed.
6367 + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
6369 + dnl Use an explicit option to hardcode DIR into the resulting
6371 + dnl Potentially add DIR to ltrpathdirs.
6372 + dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
6374 + for x in $ltrpathdirs; do
6375 + if test "X$x" = "X$found_dir"; then
6380 + if test -z "$haveit"; then
6381 + ltrpathdirs="$ltrpathdirs $found_dir"
6383 + dnl The hardcoding into $LIBNAME is system dependent.
6384 + if test "$hardcode_direct" = yes; then
6385 + dnl Using DIR/libNAME.so during linking hardcodes DIR into the
6386 + dnl resulting binary.
6387 + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
6389 + if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
6390 + dnl Use an explicit option to hardcode DIR into the resulting
6392 + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
6393 + dnl Potentially add DIR to rpathdirs.
6394 + dnl The rpathdirs will be appended to $LIBNAME at the end.
6396 + for x in $rpathdirs; do
6397 + if test "X$x" = "X$found_dir"; then
6402 + if test -z "$haveit"; then
6403 + rpathdirs="$rpathdirs $found_dir"
6406 + dnl Rely on "-L$found_dir".
6407 + dnl But don't add it if it's already contained in the LDFLAGS
6408 + dnl or the already constructed $LIBNAME
6410 + for x in $LDFLAGS $LIB[]NAME; do
6411 + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
6412 + if test "X$x" = "X-L$found_dir"; then
6417 + if test -z "$haveit"; then
6418 + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir"
6420 + if test "$hardcode_minus_L" != no; then
6421 + dnl FIXME: Not sure whether we should use
6422 + dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
6424 + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
6426 + dnl We cannot use $hardcode_runpath_var and LD_RUN_PATH
6427 + dnl here, because this doesn't fit in flags passed to the
6428 + dnl compiler. So give up. No hardcoding. This affects only
6429 + dnl very old systems.
6430 + dnl FIXME: Not sure whether we should use
6431 + dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
6433 + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
6439 + if test "X$found_a" != "X"; then
6440 + dnl Linking with a static library.
6441 + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a"
6443 + dnl We shouldn't come here, but anyway it's good to have a
6445 + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name"
6448 + dnl Assume the include files are nearby.
6449 + additional_includedir=
6450 + case "$found_dir" in
6452 + basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
6453 + additional_includedir="$basedir/include"
6456 + if test "X$additional_includedir" != "X"; then
6457 + dnl Potentially add $additional_includedir to $INCNAME.
6458 + dnl But don't add it
6459 + dnl 1. if it's the standard /usr/include,
6460 + dnl 2. if it's /usr/local/include and we are using GCC on Linux,
6461 + dnl 3. if it's already present in $CPPFLAGS or the already
6462 + dnl constructed $INCNAME,
6463 + dnl 4. if it doesn't exist as a directory.
6464 + if test "X$additional_includedir" != "X/usr/include"; then
6466 + if test "X$additional_includedir" = "X/usr/local/include"; then
6467 + if test -n "$GCC"; then
6469 + linux*) haveit=yes;;
6473 + if test -z "$haveit"; then
6474 + for x in $CPPFLAGS $INC[]NAME; do
6475 + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
6476 + if test "X$x" = "X-I$additional_includedir"; then
6481 + if test -z "$haveit"; then
6482 + if test -d "$additional_includedir"; then
6483 + dnl Really add $additional_includedir to $INCNAME.
6484 + INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir"
6490 + dnl Look for dependencies.
6491 + if test -n "$found_la"; then
6492 + dnl Read the .la file. It defines the variables
6493 + dnl dlname, library_names, old_library, dependency_libs, current,
6494 + dnl age, revision, installed, dlopen, dlpreopen, libdir.
6495 + save_libdir="$libdir"
6496 + case "$found_la" in
6497 + */* | *\\*) . "$found_la" ;;
6498 + *) . "./$found_la" ;;
6500 + libdir="$save_libdir"
6501 + dnl We use only dependency_libs.
6502 + for dep in $dependency_libs; do
6505 + additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
6506 + dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME.
6507 + dnl But don't add it
6508 + dnl 1. if it's the standard /usr/lib,
6509 + dnl 2. if it's /usr/local/lib and we are using GCC on Linux,
6510 + dnl 3. if it's already present in $LDFLAGS or the already
6511 + dnl constructed $LIBNAME,
6512 + dnl 4. if it doesn't exist as a directory.
6513 + if test "X$additional_libdir" != "X/usr/lib"; then
6515 + if test "X$additional_libdir" = "X/usr/local/lib"; then
6516 + if test -n "$GCC"; then
6518 + linux*) haveit=yes;;
6522 + if test -z "$haveit"; then
6524 + for x in $LDFLAGS $LIB[]NAME; do
6525 + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
6526 + if test "X$x" = "X-L$additional_libdir"; then
6531 + if test -z "$haveit"; then
6532 + if test -d "$additional_libdir"; then
6533 + dnl Really add $additional_libdir to $LIBNAME.
6534 + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir"
6538 + for x in $LDFLAGS $LTLIB[]NAME; do
6539 + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
6540 + if test "X$x" = "X-L$additional_libdir"; then
6545 + if test -z "$haveit"; then
6546 + if test -d "$additional_libdir"; then
6547 + dnl Really add $additional_libdir to $LTLIBNAME.
6548 + LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir"
6555 + dir=`echo "X$dep" | sed -e 's/^X-R//'`
6556 + if test "$enable_rpath" != no; then
6557 + dnl Potentially add DIR to rpathdirs.
6558 + dnl The rpathdirs will be appended to $LIBNAME at the end.
6560 + for x in $rpathdirs; do
6561 + if test "X$x" = "X$dir"; then
6566 + if test -z "$haveit"; then
6567 + rpathdirs="$rpathdirs $dir"
6569 + dnl Potentially add DIR to ltrpathdirs.
6570 + dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
6572 + for x in $ltrpathdirs; do
6573 + if test "X$x" = "X$dir"; then
6578 + if test -z "$haveit"; then
6579 + ltrpathdirs="$ltrpathdirs $dir"
6584 + dnl Handle this in the next round.
6585 + names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
6588 + dnl Handle this in the next round. Throw away the .la's
6589 + dnl directory; it is already contained in a preceding -L
6591 + names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
6594 + dnl Most likely an immediate library name.
6595 + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep"
6596 + LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep"
6602 + dnl Didn't find the library; assume it is in the system directories
6603 + dnl known to the linker and runtime loader. (All the system
6604 + dnl directories known to the linker should also be known to the
6605 + dnl runtime loader, otherwise the system is severely misconfigured.)
6606 + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
6607 + LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name"
6613 + if test "X$rpathdirs" != "X"; then
6614 + if test -n "$hardcode_libdir_separator"; then
6615 + dnl Weird platform: only the last -rpath option counts, the user must
6616 + dnl pass all path elements in one option. We can arrange that for a
6617 + dnl single library, but not when more than one $LIBNAMEs are used.
6619 + for found_dir in $rpathdirs; do
6620 + alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
6622 + dnl Note: hardcode_libdir_flag_spec uses $libdir and $wl.
6623 + acl_save_libdir="$libdir"
6625 + eval flag=\"$hardcode_libdir_flag_spec\"
6626 + libdir="$acl_save_libdir"
6627 + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
6629 + dnl The -rpath options are cumulative.
6630 + for found_dir in $rpathdirs; do
6631 + acl_save_libdir="$libdir"
6632 + libdir="$found_dir"
6633 + eval flag=\"$hardcode_libdir_flag_spec\"
6634 + libdir="$acl_save_libdir"
6635 + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
6639 + if test "X$ltrpathdirs" != "X"; then
6640 + dnl When using libtool, the option that works for both libraries and
6641 + dnl executables is -R. The -R options are cumulative.
6642 + for found_dir in $ltrpathdirs; do
6643 + LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir"
6648 +dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR,
6649 +dnl unless already present in VAR.
6650 +dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes
6651 +dnl contains two or three consecutive elements that belong together.
6652 +AC_DEFUN([AC_LIB_APPENDTOVAR],
6654 + for element in [$2]; do
6656 + for x in $[$1]; do
6657 + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
6658 + if test "X$x" = "X$element"; then
6663 + if test -z "$haveit"; then
6664 + [$1]="${[$1]}${[$1]:+ }$element"
6668 Index: dialog-1.0-20050306/m4/lib-prefix.m4
6669 ===================================================================
6670 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
6671 +++ dialog-1.0-20050306/m4/lib-prefix.m4 2005-05-16 01:32:07.000000000 +0200
6673 +# lib-prefix.m4 serial 1 (gettext-0.11)
6674 +dnl Copyright (C) 2001-2002 Free Software Foundation, Inc.
6675 +dnl This file is free software, distributed under the terms of the GNU
6676 +dnl General Public License. As a special exception to the GNU General
6677 +dnl Public License, this file may be distributed as part of a program
6678 +dnl that contains a configuration script generated by Autoconf, under
6679 +dnl the same distribution terms as the rest of that program.
6681 +dnl From Bruno Haible.
6683 +dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed
6684 +dnl to access previously installed libraries. The basic assumption is that
6685 +dnl a user will want packages to use other packages he previously installed
6686 +dnl with the same --prefix option.
6687 +dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate
6688 +dnl libraries, but is otherwise very convenient.
6689 +AC_DEFUN([AC_LIB_PREFIX],
6691 + AC_BEFORE([$0], [AC_LIB_LINKFLAGS])
6692 + AC_REQUIRE([AC_PROG_CC])
6693 + AC_REQUIRE([AC_CANONICAL_HOST])
6694 + AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
6695 + dnl By default, look in $includedir and $libdir.
6696 + use_additional=yes
6697 + AC_LIB_WITH_FINAL_PREFIX([
6698 + eval additional_includedir=\"$includedir\"
6699 + eval additional_libdir=\"$libdir\"
6701 + AC_ARG_WITH([lib-prefix],
6702 +[ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib
6703 + --without-lib-prefix don't search for libraries in includedir and libdir],
6705 + if test "X$withval" = "Xno"; then
6708 + if test "X$withval" = "X"; then
6709 + AC_LIB_WITH_FINAL_PREFIX([
6710 + eval additional_includedir=\"$includedir\"
6711 + eval additional_libdir=\"$libdir\"
6714 + additional_includedir="$withval/include"
6715 + additional_libdir="$withval/lib"
6719 + if test $use_additional = yes; then
6720 + dnl Potentially add $additional_includedir to $CPPFLAGS.
6721 + dnl But don't add it
6722 + dnl 1. if it's the standard /usr/include,
6723 + dnl 2. if it's already present in $CPPFLAGS,
6724 + dnl 3. if it's /usr/local/include and we are using GCC on Linux,
6725 + dnl 4. if it doesn't exist as a directory.
6726 + if test "X$additional_includedir" != "X/usr/include"; then
6728 + for x in $CPPFLAGS; do
6729 + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
6730 + if test "X$x" = "X-I$additional_includedir"; then
6735 + if test -z "$haveit"; then
6736 + if test "X$additional_includedir" = "X/usr/local/include"; then
6737 + if test -n "$GCC"; then
6739 + linux*) haveit=yes;;
6743 + if test -z "$haveit"; then
6744 + if test -d "$additional_includedir"; then
6745 + dnl Really add $additional_includedir to $CPPFLAGS.
6746 + CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir"
6751 + dnl Potentially add $additional_libdir to $LDFLAGS.
6752 + dnl But don't add it
6753 + dnl 1. if it's the standard /usr/lib,
6754 + dnl 2. if it's already present in $LDFLAGS,
6755 + dnl 3. if it's /usr/local/lib and we are using GCC on Linux,
6756 + dnl 4. if it doesn't exist as a directory.
6757 + if test "X$additional_libdir" != "X/usr/lib"; then
6759 + for x in $LDFLAGS; do
6760 + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
6761 + if test "X$x" = "X-L$additional_libdir"; then
6766 + if test -z "$haveit"; then
6767 + if test "X$additional_libdir" = "X/usr/local/lib"; then
6768 + if test -n "$GCC"; then
6770 + linux*) haveit=yes;;
6774 + if test -z "$haveit"; then
6775 + if test -d "$additional_libdir"; then
6776 + dnl Really add $additional_libdir to $LDFLAGS.
6777 + LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir"
6785 +dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix,
6786 +dnl acl_final_exec_prefix, containing the values to which $prefix and
6787 +dnl $exec_prefix will expand at the end of the configure script.
6788 +AC_DEFUN([AC_LIB_PREPARE_PREFIX],
6790 + dnl Unfortunately, prefix and exec_prefix get only finally determined
6791 + dnl at the end of configure.
6792 + if test "X$prefix" = "XNONE"; then
6793 + acl_final_prefix="$ac_default_prefix"
6795 + acl_final_prefix="$prefix"
6797 + if test "X$exec_prefix" = "XNONE"; then
6798 + acl_final_exec_prefix='${prefix}'
6800 + acl_final_exec_prefix="$exec_prefix"
6802 + acl_save_prefix="$prefix"
6803 + prefix="$acl_final_prefix"
6804 + eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
6805 + prefix="$acl_save_prefix"
6808 +dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the
6809 +dnl variables prefix and exec_prefix bound to the values they will have
6810 +dnl at the end of the configure script.
6811 +AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX],
6813 + acl_save_prefix="$prefix"
6814 + prefix="$acl_final_prefix"
6815 + acl_save_exec_prefix="$exec_prefix"
6816 + exec_prefix="$acl_final_exec_prefix"
6818 + exec_prefix="$acl_save_exec_prefix"
6819 + prefix="$acl_save_prefix"
6821 Index: dialog-1.0-20050306/m4/progtest.m4
6822 ===================================================================
6823 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
6824 +++ dialog-1.0-20050306/m4/progtest.m4 2005-05-16 01:32:07.000000000 +0200
6826 +# progtest.m4 serial 2 (gettext-0.10.40)
6827 +dnl Copyright (C) 1996-2002 Free Software Foundation, Inc.
6828 +dnl This file is free software, distributed under the terms of the GNU
6829 +dnl General Public License. As a special exception to the GNU General
6830 +dnl Public License, this file may be distributed as part of a program
6831 +dnl that contains a configuration script generated by Autoconf, under
6832 +dnl the same distribution terms as the rest of that program.
6834 +dnl This file can can be used in projects which are not available under
6835 +dnl the GNU General Public License or the GNU Library General Public
6836 +dnl License but which still want to provide support for the GNU gettext
6838 +dnl Please note that the actual code of the GNU gettext library is covered
6839 +dnl by the GNU Library General Public License, and the rest of the GNU
6840 +dnl gettext package package is covered by the GNU General Public License.
6841 +dnl They are *not* in the public domain.
6844 +dnl Ulrich Drepper <drepper@cygnus.com>, 1996.
6846 +# Search path for a program which passes the given test.
6848 +dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
6849 +dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
6850 +AC_DEFUN([AM_PATH_PROG_WITH_TEST],
6851 +[# Extract the first word of "$2", so it can be a program name with args.
6852 +set dummy $2; ac_word=[$]2
6853 +AC_MSG_CHECKING([for $ac_word])
6854 +AC_CACHE_VAL(ac_cv_path_$1,
6857 + ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
6860 + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
6861 + for ac_dir in ifelse([$5], , $PATH, [$5]); do
6862 + test -z "$ac_dir" && ac_dir=.
6863 + if test -f $ac_dir/$ac_word; then
6865 + ac_cv_path_$1="$ac_dir/$ac_word"
6870 + IFS="$ac_save_ifs"
6871 +dnl If no 4th arg is given, leave the cache variable unset,
6872 +dnl so AC_PATH_PROGS will keep looking.
6873 +ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
6877 +$1="$ac_cv_path_$1"
6878 +if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
6879 + AC_MSG_RESULT([$]$1)
6885 Index: dialog-1.0-20050306/m4/stdint_h.m4
6886 ===================================================================
6887 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
6888 +++ dialog-1.0-20050306/m4/stdint_h.m4 2005-05-16 01:32:07.000000000 +0200
6890 +# stdint_h.m4 serial 2 (gettext-0.11.4)
6891 +dnl Copyright (C) 1997-2002 Free Software Foundation, Inc.
6892 +dnl This file is free software, distributed under the terms of the GNU
6893 +dnl General Public License. As a special exception to the GNU General
6894 +dnl Public License, this file may be distributed as part of a program
6895 +dnl that contains a configuration script generated by Autoconf, under
6896 +dnl the same distribution terms as the rest of that program.
6898 +dnl From Paul Eggert.
6900 +# Define HAVE_STDINT_H_WITH_UINTMAX if <stdint.h> exists,
6901 +# doesn't clash with <sys/types.h>, and declares uintmax_t.
6903 +AC_DEFUN([jm_AC_HEADER_STDINT_H],
6905 + AC_CACHE_CHECK([for stdint.h], jm_ac_cv_header_stdint_h,
6907 + [#include <sys/types.h>
6908 +#include <stdint.h>],
6909 + [uintmax_t i = (uintmax_t) -1;],
6910 + jm_ac_cv_header_stdint_h=yes,
6911 + jm_ac_cv_header_stdint_h=no)])
6912 + if test $jm_ac_cv_header_stdint_h = yes; then
6913 + AC_DEFINE_UNQUOTED(HAVE_STDINT_H_WITH_UINTMAX, 1,
6914 +[Define if <stdint.h> exists, doesn't clash with <sys/types.h>,
6915 + and declares uintmax_t. ])
6918 Index: dialog-1.0-20050306/m4/uintmax_t.m4
6919 ===================================================================
6920 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
6921 +++ dialog-1.0-20050306/m4/uintmax_t.m4 2005-05-16 01:32:07.000000000 +0200
6923 +# uintmax_t.m4 serial 6 (gettext-0.11)
6924 +dnl Copyright (C) 1997-2002 Free Software Foundation, Inc.
6925 +dnl This file is free software, distributed under the terms of the GNU
6926 +dnl General Public License. As a special exception to the GNU General
6927 +dnl Public License, this file may be distributed as part of a program
6928 +dnl that contains a configuration script generated by Autoconf, under
6929 +dnl the same distribution terms as the rest of that program.
6931 +dnl From Paul Eggert.
6935 +# Define uintmax_t to `unsigned long' or `unsigned long long'
6936 +# if <inttypes.h> does not exist.
6938 +AC_DEFUN([jm_AC_TYPE_UINTMAX_T],
6940 + AC_REQUIRE([jm_AC_HEADER_INTTYPES_H])
6941 + AC_REQUIRE([jm_AC_HEADER_STDINT_H])
6942 + if test $jm_ac_cv_header_inttypes_h = no && test $jm_ac_cv_header_stdint_h = no; then
6943 + AC_REQUIRE([jm_AC_TYPE_UNSIGNED_LONG_LONG])
6944 + test $ac_cv_type_unsigned_long_long = yes \
6945 + && ac_type='unsigned long long' \
6946 + || ac_type='unsigned long'
6947 + AC_DEFINE_UNQUOTED(uintmax_t, $ac_type,
6948 + [Define to unsigned long or unsigned long long
6949 + if <inttypes.h> and <stdint.h> don't define.])
6952 Index: dialog-1.0-20050306/m4/ulonglong.m4
6953 ===================================================================
6954 --- /dev/null 1970-01-01 00:00:00.000000000 +0000
6955 +++ dialog-1.0-20050306/m4/ulonglong.m4 2005-05-16 01:32:07.000000000 +0200
6957 +# ulonglong.m4 serial 2 (fileutils-4.0.32, gettext-0.10.40)
6958 +dnl Copyright (C) 1999-2002 Free Software Foundation, Inc.
6959 +dnl This file is free software, distributed under the terms of the GNU
6960 +dnl General Public License. As a special exception to the GNU General
6961 +dnl Public License, this file may be distributed as part of a program
6962 +dnl that contains a configuration script generated by Autoconf, under
6963 +dnl the same distribution terms as the rest of that program.
6965 +dnl From Paul Eggert.
6967 +AC_DEFUN([jm_AC_TYPE_UNSIGNED_LONG_LONG],
6969 + AC_CACHE_CHECK([for unsigned long long], ac_cv_type_unsigned_long_long,
6970 + [AC_TRY_LINK([unsigned long long ull = 1; int i = 63;],
6971 + [unsigned long long ullmax = (unsigned long long) -1;
6972 + return ull << i | ull >> i | ullmax / ull | ullmax % ull;],
6973 + ac_cv_type_unsigned_long_long=yes,
6974 + ac_cv_type_unsigned_long_long=no)])
6975 + if test $ac_cv_type_unsigned_long_long = yes; then
6976 + AC_DEFINE(HAVE_UNSIGNED_LONG_LONG, 1,
6977 + [Define if you have the unsigned long long type.])