diff options
| author | Chris Larson <clarson@kergoth.com> | 2004-11-09 00:36:47 +0000 |
|---|---|---|
| committer | Chris Larson <clarson@kergoth.com> | 2004-11-09 00:36:47 +0000 |
| commit | f96441b9faf769c9ecdd4d338b605ea3d0cc4010 (patch) | |
| tree | edb17ec2c4ea13c5acb1c7350957a249a820e28d /dialog | |
| parent | b6588aa6851fb220cedc387d21c51513ef8d67f4 (diff) | |
Disable bk EOLN_NATIVE conversions on all files in packages FILESPATHs, to prevent it screwing up patches.
BKrev: 4190111fA4MuVozAqwE7xOSL9fr-TA
Diffstat (limited to 'dialog')
| -rw-r--r-- | dialog/dialog-0.9b-20031207/configure.patch | 37 | ||||
| -rw-r--r-- | dialog/dialog-0.9b-20031207/m4.patch | 6468 |
2 files changed, 6505 insertions, 0 deletions
diff --git a/dialog/dialog-0.9b-20031207/configure.patch b/dialog/dialog-0.9b-20031207/configure.patch index e69de29bb2..754243ad45 100644 --- a/dialog/dialog-0.9b-20031207/configure.patch +++ b/dialog/dialog-0.9b-20031207/configure.patch @@ -0,0 +1,37 @@ + +# +# Patch managed by http://www.mn-logistik.de/unsupported/pxa250/patcher +# + +--- dialog-0.9b-20031207/configure.in~configure ++++ dialog-0.9b-20031207/configure.in +@@ -6,6 +6,8 @@ + AC_CONFIG_HEADER(dlg_config.h:config.hin) + + CF_VERSION_INFO(dialog) ++AH_TEMPLATE([DIALOG_VERSION], [Define to dialog version]) ++AH_TEMPLATE([DIALOG_PATCHDATE], [Define to dialog patchdate]) + + DESTDIR= + AC_SUBST(DESTDIR) +@@ -146,6 +148,20 @@ + wget_wch \ + ) + ++AH_TEMPLATE([HAVE_COLOR], ++ [Define if you have the start_color function]) ++AH_TEMPLATE([HAVE_FORMBOX], ++ [Define if you want the form dialog]) ++AH_TEMPLATE([HAVE_GAUGE], ++ [Define if you want the gauge dialog]) ++AH_TEMPLATE([HAVE_TAILBOX], ++ [Define if you want the tailbox dialog]) ++AH_TEMPLATE([HAVE_XDIALOG], ++ [Define if you want Xdialog-style dialogs]) ++AH_TEMPLATE([HAVE_RC_FILE], ++ [Define if you want the config-file support]) ++AH_TEMPLATE([USE_WIDE_CURSES], [Define if using wide curses]) ++ + AC_CHECK_FUNC(start_color,[AC_DEFINE(HAVE_COLOR)]) + CF_CURSES_CHTYPE + CF_FUNC_WAIT diff --git a/dialog/dialog-0.9b-20031207/m4.patch b/dialog/dialog-0.9b-20031207/m4.patch index e69de29bb2..62387dddae 100644 --- a/dialog/dialog-0.9b-20031207/m4.patch +++ b/dialog/dialog-0.9b-20031207/m4.patch @@ -0,0 +1,6468 @@ + +# +# Patch managed by http://www.mn-logistik.de/unsupported/pxa250/patcher +# + +--- /dev/null ++++ dialog-0.9b-20031207/acinclude.m4 +@@ -0,0 +1,1953 @@ ++dnl --------------------------------------------------------------------------- ++dnl CF_AC_PREREQ version: 2 updated: 1997/09/06 13:24:56 ++dnl ------------ ++dnl Conditionally generate script according to whether we're using the release ++dnl version of autoconf, or a patched version (using the ternary component as ++dnl the patch-version). ++define(CF_AC_PREREQ, ++[CF_PREREQ_COMPARE( ++AC_PREREQ_CANON(AC_PREREQ_SPLIT(AC_ACVERSION)), ++AC_PREREQ_CANON(AC_PREREQ_SPLIT([$1])), [$1], [$2], [$3])])dnl ++dnl --------------------------------------------------------------------------- ++dnl CF_ADD_INCDIR version: 4 updated: 2002/12/21 14:25:52 ++dnl ------------- ++dnl Add an include-directory to $CPPFLAGS. Don't add /usr/include, since it's ++dnl redundant. We don't normally need to add -I/usr/local/include for gcc, ++dnl but old versions (and some misinstalled ones) need that. To make things ++dnl worse, gcc 3.x gives error messages if -I/usr/local/include is added to ++dnl the include-path). ++AC_DEFUN([CF_ADD_INCDIR], ++[ ++for cf_add_incdir in $1 ++do ++ while true ++ do ++ case $cf_add_incdir in ++ /usr/include) # (vi ++ ;; ++ /usr/local/include) # (vi ++ if test "$GCC" = yes ++ then ++ cf_save_CPPFLAGS="$CPPFLAGS" ++ CPPFLAGS="$CPPFLAGS -I$cf_add_incdir" ++ AC_TRY_COMPILE([#include <stdio.h>], ++ [printf("Hello")], ++ [], ++ [CPPFLAGS="$cf_save_CPPFLAGS"]) ++ fi ++ ;; ++ *) # (vi ++ CPPFLAGS="$CPPFLAGS -I$cf_add_incdir" ++ ;; ++ esac ++ cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'` ++ test "$cf_top_incdir" = "$cf_add_incdir" && break ++ cf_add_incdir="$cf_top_incdir" ++ done ++done ++])dnl ++dnl --------------------------------------------------------------------------- ++dnl CF_ARG_DISABLE version: 3 updated: 1999/03/30 17:24:31 ++dnl -------------- ++dnl Allow user to disable a normally-on option. ++AC_DEFUN([CF_ARG_DISABLE], ++[CF_ARG_OPTION($1,[$2],[$3],[$4],yes)])dnl ++dnl --------------------------------------------------------------------------- ++dnl CF_ARG_ENABLE version: 3 updated: 1999/03/30 17:24:31 ++dnl ------------- ++dnl Allow user to enable a normally-off option. ++AC_DEFUN([CF_ARG_ENABLE], ++[CF_ARG_OPTION($1,[$2],[$3],[$4],no)])dnl ++dnl --------------------------------------------------------------------------- ++dnl CF_ARG_MSG_ENABLE version: 2 updated: 2000/07/29 19:32:03 ++dnl ----------------- ++dnl Verbose form of AC_ARG_ENABLE: ++dnl ++dnl Parameters: ++dnl $1 = message ++dnl $2 = option name ++dnl $3 = help-string ++dnl $4 = action to perform if option is enabled ++dnl $5 = action if perform if option is disabled ++dnl $6 = default option value (either 'yes' or 'no') ++AC_DEFUN([CF_ARG_MSG_ENABLE],[ ++AC_MSG_CHECKING($1) ++AC_ARG_ENABLE($2,[$3],,enableval=ifelse($6,,no,$6)) ++AC_MSG_RESULT($enableval) ++if test "$enableval" != no ; then ++ifelse($4,,[ :],$4) ++else ++ifelse($5,,[ :],$5) ++fi ++])dnl ++dnl --------------------------------------------------------------------------- ++dnl CF_ARG_OPTION version: 3 updated: 1997/10/18 14:42:41 ++dnl ------------- ++dnl Restricted form of AC_ARG_ENABLE that ensures user doesn't give bogus ++dnl values. ++dnl ++dnl Parameters: ++dnl $1 = option name ++dnl $2 = help-string ++dnl $3 = action to perform if option is not default ++dnl $4 = action if perform if option is default ++dnl $5 = default option value (either 'yes' or 'no') ++AC_DEFUN([CF_ARG_OPTION], ++[AC_ARG_ENABLE($1,[$2],[test "$enableval" != ifelse($5,no,yes,no) && enableval=ifelse($5,no,no,yes) ++ if test "$enableval" != "$5" ; then ++ifelse($3,,[ :]dnl ++,[ $3]) ifelse($4,,,[ ++ else ++ $4]) ++ fi],[enableval=$5 ifelse($4,,,[ ++ $4 ++])dnl ++ ])])dnl ++dnl --------------------------------------------------------------------------- ++dnl CF_BUNDLED_INTL version: 10 updated: 2003/09/14 18:49:13 ++dnl --------------- ++dnl Top-level macro for configuring an application with a bundled copy of ++dnl the intl and po directories for gettext. ++dnl ++dnl $1 specifies either Makefile or makefile, defaulting to the former. ++dnl $2 if nonempty sets the option to --enable-nls rather than to --disable-nls ++dnl ++dnl Sets variables which can be used to substitute in makefiles: ++dnl INTLDIR_MAKE - to make ./intl directory ++dnl MSG_DIR_MAKE - to make ./po directory ++dnl SUB_MAKEFILE - list of makefiles in ./intl, ./po directories ++dnl Defines ++dnl HAVE_LIBGETTEXT_H if we're using ./intl ++dnl ++dnl Environment: ++dnl ALL_LINGUAS if set, lists the root names of the ".po" files. ++dnl CONFIG_H assumed to be "config.h" ++dnl VERSION may be set, otherwise extract from "VERSION" file. ++dnl ++AH_TEMPLATE([HAVE_LIBGETTEXT_H], [Define if we're using ./intl.]) ++AC_DEFUN([CF_BUNDLED_INTL],[ ++cf_makefile=ifelse($1,,Makefile,$1) ++ ++dnl Set of available languages (based on source distribution). Note that ++dnl setting $LINGUAS overrides $ALL_LINGUAS. Some environments set $LINGUAS ++dnl rather than $LC_ALL ++test -z "$ALL_LINGUAS" && ALL_LINGUAS=`test -d $srcdir/po && cd $srcdir/po && echo *.po|sed -e 's/\.po//g' -e 's/*//'` ++ ++# Allow override of "config.h" definition: ++: ${CONFIG_H=config.h} ++AC_SUBST(CONFIG_H) ++ ++if test -z "$VERSION" ; then ++if test -f $srcdir/VERSION ; then ++ VERSION=`sed -e '2,$d' $srcdir/VERSION|cut -f1` ++else ++ VERSION=unknown ++fi ++fi ++AC_SUBST(VERSION) ++ ++AM_GNU_GETTEXT(,,,[$2]) ++ ++INTLDIR_MAKE= ++MSG_DIR_MAKE= ++SUB_MAKEFILE= ++ ++dnl this updates SUB_MAKEFILE and MSG_DIR_MAKE: ++CF_OUR_MESSAGES($1) ++ ++if test "$USE_INCLUDED_LIBINTL" = yes ; then ++ if test "$nls_cv_force_use_gnu_gettext" = yes ; then ++ : ++ elif test "$nls_cv_use_gnu_gettext" = yes ; then ++ : ++ else ++ INTLDIR_MAKE="#" ++ fi ++ if test -z "$INTLDIR_MAKE"; then ++ AC_DEFINE(HAVE_LIBGETTEXT_H) ++ for cf_makefile in \ ++ $srcdir/intl/Makefile.in \ ++ $srcdir/intl/makefile.in ++ do ++ if test -f "$cf_makefile" ; then ++ SUB_MAKEFILE="$SUB_MAKEFILE `echo ${cf_makefile}|sed -e 's/\.in$//'`:${cf_makefile}" ++ break ++ fi ++ done ++ fi ++else ++ INTLDIR_MAKE="#" ++ if test "$USE_NLS" = yes ; then ++ AC_CHECK_HEADERS(libintl.h) ++ fi ++fi ++ ++if test -z "$INTLDIR_MAKE" ; then ++ CPPFLAGS="-I../intl $CPPFLAGS" ++fi ++ ++dnl FIXME: we use this in lynx (the alternative is a spurious dependency upon ++dnl GNU make) ++if test "$BUILD_INCLUDED_LIBINTL" = yes ; then ++ GT_YES="#" ++ GT_NO= ++else ++ GT_YES= ++ GT_NO="#" ++fi ++ ++AC_SUBST(INTLDIR_MAKE) ++AC_SUBST(MSG_DIR_MAKE) ++AC_SUBST(GT_YES) ++AC_SUBST(GT_NO) ++ ++dnl FIXME: the underlying AM_GNU_GETTEXT macro either needs some fixes or a ++dnl little documentation. It doesn't define anything so that we can ifdef our ++dnl own code, except ENABLE_NLS, which is too vague to be of any use. ++ ++if test "$USE_INCLUDED_LIBINTL" = yes ; then ++ if test "$nls_cv_force_use_gnu_gettext" = yes ; then ++ AC_DEFINE(HAVE_GETTEXT) ++ elif test "$nls_cv_use_gnu_gettext" = yes ; then ++ AC_DEFINE(HAVE_GETTEXT) ++ fi ++ if test -n "$nls_cv_header_intl" ; then ++ AC_DEFINE(HAVE_LIBINTL_H) ++ fi ++fi ++])dnl ++dnl --------------------------------------------------------------------------- ++dnl CF_CHECK_CACHE version: 7 updated: 2001/12/19 00:50:10 ++dnl -------------- ++dnl Check if we're accidentally using a cache from a different machine. ++dnl Derive the system name, as a check for reusing the autoconf cache. ++dnl ++dnl If we've packaged config.guess and config.sub, run that (since it does a ++dnl better job than uname). Normally we'll use AC_CANONICAL_HOST, but allow ++dnl an extra parameter that we may override, e.g., for AC_CANONICAL_SYSTEM ++dnl which is useful in cross-compiles. ++AC_DEFUN([CF_CHECK_CACHE], ++[ ++if test -f $srcdir/config.guess ; then ++ ifelse([$1],,[AC_CANONICAL_HOST],[$1]) ++ system_name="$host_os" ++else ++ system_name="`(uname -s -r) 2>/dev/null`" ++ if test -z "$system_name" ; then ++ system_name="`(hostname) 2>/dev/null`" ++ fi ++fi ++AH_TEMPLATE([SYSTEM_NAME], [Set to the system name]) ++test -n "$system_name" && AC_DEFINE_UNQUOTED(SYSTEM_NAME,"$system_name") ++AC_CACHE_VAL(cf_cv_system_name,[cf_cv_system_name="$system_name"]) ++ ++test -z "$system_name" && system_name="$cf_cv_system_name" ++test -n "$cf_cv_system_name" && AC_MSG_RESULT(Configuring for $cf_cv_system_name) ++ ++if test ".$system_name" != ".$cf_cv_system_name" ; then ++ AC_MSG_RESULT(Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)) ++ AC_ERROR("Please remove config.cache and try again.") ++fi ++])dnl ++dnl --------------------------------------------------------------------------- ++dnl CF_CURSES_CHTYPE version: 6 updated: 2003/11/06 19:59:57 ++dnl ---------------- ++dnl Test if curses defines 'chtype' (usually a 'long' type for SysV curses). ++AH_TEMPLATE([HAVE_TYPE_CHTYPE], [Define if curses defines 'chtype'.]) ++AH_TEMPLATE([TYPE_CHTYPE_IS_SCALAR], [Define if chtype is scalar rather than a struct.]) ++AC_DEFUN([CF_CURSES_CHTYPE], ++[ ++AC_REQUIRE([CF_CURSES_CPPFLAGS])dnl ++AC_CACHE_CHECK(for chtype typedef,cf_cv_chtype_decl,[ ++ AC_TRY_COMPILE([#include <${cf_cv_ncurses_header-curses.h}>], ++ [chtype foo], ++ [cf_cv_chtype_decl=yes], ++ [cf_cv_chtype_decl=no])]) ++if test $cf_cv_chtype_decl = yes ; then ++ AC_DEFINE(HAVE_TYPE_CHTYPE) ++ AC_CACHE_CHECK(if chtype is scalar or struct,cf_cv_chtype_type,[ ++ AC_TRY_COMPILE([#include <${cf_cv_ncurses_header-curses.h}>], ++ [chtype foo; long x = foo], ++ [cf_cv_chtype_type=scalar], ++ [cf_cv_chtype_type=struct])]) ++ if test $cf_cv_chtype_type = scalar ; then ++ AC_DEFINE(TYPE_CHTYPE_IS_SCALAR) ++ fi ++fi ++])dnl ++dnl --------------------------------------------------------------------------- ++dnl CF_CURSES_CPPFLAGS version: 7 updated: 2003/06/06 00:48:41 ++dnl ------------------ ++dnl Look for the curses headers. ++AC_DEFUN([CF_CURSES_CPPFLAGS],[ ++ ++AC_CACHE_CHECK(for extra include directories,cf_cv_curses_incdir,[ ++cf_cv_curses_incdir=no ++case $host_os in #(vi ++hpux10.*|hpux11.*) #(vi ++ test -d /usr/include/curses_colr && \ ++ cf_cv_curses_incdir="-I/usr/include/curses_colr" ++ ;; ++sunos3*|sunos4*) ++ test -d /usr/5lib && \ ++ test -d /usr/5include && \ ++ cf_cv_curses_incdir="-I/usr/5include" ++ ;; ++esac ++]) ++test "$cf_cv_curses_incdir" != no && CPPFLAGS="$cf_cv_curses_incdir $CPPFLAGS" ++ ++AC_CACHE_CHECK(if we have identified curses headers,cf_cv_ncurses_header,[ ++cf_cv_ncurses_header=none ++for cf_header in \ ++ curses.h \ ++ ncurses.h \ ++ ncurses/curses.h \ ++ ncurses/ncurses.h ++do ++AC_TRY_COMPILE([#include <${cf_header}>], ++ [initscr(); tgoto("?", 0,0)], ++ [cf_cv_ncurses_header=$cf_header; break],[]) ++done ++]) ++ ++if test "$cf_cv_ncurses_header" = none ; then ++ AC_MSG_ERROR(No curses header-files found) ++fi ++ ++# cheat, to get the right #define's for HAVE_NCURSES_H, etc. ++AC_CHECK_HEADERS($cf_cv_ncurses_header) ++ ++])dnl ++dnl --------------------------------------------------------------------------- ++dnl CF_CURSES_FUNCS version: 12 updated: 2003/11/06 19:59:57 ++dnl --------------- ++dnl Curses-functions are a little complicated, since a lot of them are macros. ++AC_DEFUN([CF_CURSES_FUNCS], ++[ ++AC_REQUIRE([CF_CURSES_CPPFLAGS])dnl ++AC_REQUIRE([CF_XOPEN_CURSES]) ++AC_REQUIRE([CF_CURSES_TERM_H]) ++for cf_func in $1 ++do ++ CF_UPPER(cf_tr_func,$cf_func) ++ AC_MSG_CHECKING(for ${cf_func}) ++ CF_MSG_LOG(${cf_func}) ++ AC_CACHE_VAL(cf_cv_func_$cf_func,[ ++ eval cf_result='$ac_cv_func_'$cf_func ++ if test ".$cf_result" != ".no"; then ++ AC_TRY_LINK([ ++#ifdef HAVE_XCURSES ++#include <xcurses.h> ++char * XCursesProgramName = "test"; ++#else ++#include <${cf_cv_ncurses_header-curses.h}> ++#if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H) ++#include <ncursesw/term.h> ++#else ++#if defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H) ++#include <ncurses/term.h> ++#else ++#ifdef HAVE_TERM_H ++#include <term.h> ++#endif ++#endif ++#endif ++#endif], ++ [ ++#ifndef ${cf_func} ++long foo = (long)(&${cf_func}); ++exit(foo == 0); ++#endif ++ ], ++ [cf_result=yes], ++ [cf_result=no]) ++ fi ++ eval 'cf_cv_func_'$cf_func'=$cf_result' ++ ]) ++ # use the computed/retrieved cache-value: ++ eval 'cf_result=$cf_cv_func_'$cf_func ++ AC_MSG_RESULT($cf_result) ++ if test $cf_result != no; then ++ AC_DEFINE_UNQUOTED(HAVE_${cf_tr_func}) ++ fi ++done ++])dnl ++dnl --------------------------------------------------------------------------- ++dnl CF_CURSES_LIBS version: 23 updated: 2003/11/06 19:59:57 ++dnl -------------- ++dnl Look for the curses libraries. Older curses implementations may require ++dnl termcap/termlib to be linked as well. Call CF_CURSES_CPPFLAGS first. ++AC_DEFUN([CF_CURSES_LIBS],[ ++ ++AC_REQUIRE([CF_CURSES_CPPFLAGS])dnl ++AC_MSG_CHECKING(if we have identified curses libraries) ++AC_TRY_LINK([#include <${cf_cv_ncurses_header-curses.h}>], ++ [initscr(); tgoto("?", 0,0)], ++ cf_result=yes, ++ cf_result=no) ++AC_MSG_RESULT($cf_result) ++ ++if test "$cf_result" = no ; then ++case $host_os in #(vi ++freebsd*) #(vi ++ AC_CHECK_LIB(mytinfo,tgoto,[LIBS="-lmytinfo $LIBS"]) ++ ;; ++hpux10.*|hpux11.*) #(vi ++ AC_CHECK_LIB(cur_colr,initscr,[ ++ LIBS="-lcur_colr $LIBS" ++ ac_cv_func_initscr=yes ++ ],[ ++ AC_CHECK_LIB(Hcurses,initscr,[ ++ # HP's header uses __HP_CURSES, but user claims _HP_CURSES. ++ LIBS="-lHcurses $LIBS" ++ CPPFLAGS="-D__HP_CURSES -D_HP_CURSES $CPPFLAGS" ++ ac_cv_func_initscr=yes ++ ])]) ++ ;; ++linux*) # Suse Linux does not follow /usr/lib convention ++ LIBS="$LIBS -L/lib" ++ ;; ++sunos3*|sunos4*) ++ test -d /usr/5lib && \ ++ LIBS="$LIBS -L/usr/5lib -lcurses -ltermcap" ++ ac_cv_func_initscr=yes ++ ;; ++esac ++ ++if test ".$ac_cv_func_initscr" != .yes ; then ++ cf_save_LIBS="$LIBS" ++ cf_term_lib="" ++ cf_curs_lib="" ++ ++ if test ".${cf_cv_ncurses_version-no}" != .no ++ then ++ cf_check_list="ncurses curses cursesX" ++ else ++ cf_check_list="cursesX curses ncurses" ++ fi ++ ++ # Check for library containing tgoto. Do this before curses library ++ # because it may be needed to link the test-case for initscr. ++ AC_CHECK_FUNC(tgoto,[cf_term_lib=predefined],[ ++ for cf_term_lib in $cf_check_list termcap termlib unknown ++ do ++ AC_CHECK_LIB($cf_term_lib,tgoto,[break]) ++ done ++ ]) ++ ++ # Check for library containing initscr ++ test "$cf_term_lib" != predefined && test "$cf_term_lib" != unknown && LIBS="-l$cf_term_lib $cf_save_LIBS" ++ for cf_curs_lib in $cf_check_list xcurses jcurses unknown ++ do ++ AC_CHECK_LIB($cf_curs_lib,initscr,[break]) ++ done ++ test $cf_curs_lib = unknown && AC_ERROR(no curses library found) ++ ++ LIBS="-l$cf_curs_lib $cf_save_LIBS" ++ if test "$cf_term_lib" = unknown ; then ++ AC_MSG_CHECKING(if we can link with $cf_curs_lib library) ++ AC_TRY_LINK([#include <${cf_cv_ncurses_header-curses.h}>], ++ [initscr()], ++ [cf_result=yes], ++ [cf_result=no]) ++ AC_MSG_RESULT($cf_result) ++ test $cf_result = no && AC_ERROR(Cannot link curses library) ++ elif test "$cf_curs_lib" = "$cf_term_lib" ; then ++ : ++ elif test "$cf_term_lib" != predefined ; then ++ AC_MSG_CHECKING(if we need both $cf_curs_lib and $cf_term_lib libraries) ++ AC_TRY_LINK([#include <${cf_cv_ncurses_header-curses.h}>], ++ [initscr(); tgoto((char *)0, 0, 0);], ++ [cf_result=no], ++ [ ++ LIBS="-l$cf_curs_lib -l$cf_term_lib $cf_save_LIBS" ++ AC_TRY_LINK([#include <${cf_cv_ncurses_header-curses.h}>], ++ [initscr()], ++ [cf_result=yes], ++ [cf_result=error]) ++ ]) ++ AC_MSG_RESULT($cf_result) ++ fi ++fi ++fi ++ ++])dnl ++dnl --------------------------------------------------------------------------- ++dnl CF_CURSES_TERM_H version: 6 updated: 2003/11/06 19:59:57 ++dnl ---------------- ++dnl SVr4 curses should have term.h as well (where it puts the definitions of ++dnl the low-level interface). This may not be true in old/broken implementations, ++dnl as well as in misconfigured systems (e.g., gcc configured for Solaris 2.4 ++dnl running with Solaris 2.5.1). ++AC_DEFUN([CF_CURSES_TERM_H], ++[ ++AC_CACHE_CHECK(for term.h, cf_cv_term_header,[ ++ ++AC_REQUIRE([CF_CURSES_CPPFLAGS])dnl ++# If we found <ncurses/curses.h>, look for <ncurses/term.h>, but always look ++# for <term.h> if we do not find the variant. ++for cf_header in \ ++ `echo ${cf_cv_ncurses_header-curses.h} | sed -e 's%/.*%/%'`term.h \ ++ term.h ++do ++ AC_TRY_COMPILE([ ++#include <${cf_cv_ncurses_header-curses.h}> ++#include <${cf_header}>], ++ [WINDOW *x], ++ [cf_cv_term_header=$cf_header ++ break], ++ [cf_cv_term_header=no]) ++done ++]) ++ ++AH_TEMPLATE([HAVE_TERM_H], [define if you have term.h]) ++AH_TEMPLATE([HAVE_NCURSES_TERM_H], [define if you have ncurses/term.h]) ++AH_TEMPLATE([HAVE_NCURSESW_TERM_H], [define if you have ncursesw/term.h]) ++case $cf_cv_term_header in #(vi ++term.h) #(vi ++ AC_DEFINE(HAVE_TERM_H) ++ ;; ++ncurses/term.h) ++ AC_DEFINE(HAVE_NCURSES_TERM_H) ++ ;; ++ncursesw/term.h) ++ AC_DEFINE(HAVE_NCURSESW_TERM_H) ++ ;; ++esac ++])dnl ++dnl --------------------------------------------------------------------------- ++dnl CF_DIRNAME version: 4 updated: 2002/12/21 19:25:52 ++dnl ---------- ++dnl "dirname" is not portable, so we fake it with a shell script. ++AC_DEFUN([CF_DIRNAME],[$1=`echo $2 | sed -e 's%/[[^/]]*$%%'`])dnl ++dnl --------------------------------------------------------------------------- ++dnl CF_DISABLE_ECHO version: 10 updated: 2003/04/17 22:27:11 ++dnl --------------- ++dnl You can always use "make -n" to see the actual options, but it's hard to ++dnl pick out/analyze warning messages when the compile-line is long. ++dnl ++dnl Sets: ++dnl ECHO_LT - symbol to control if libtool is verbose ++dnl ECHO_LD - symbol to prefix "cc -o" lines ++dnl RULE_CC - symbol to put before implicit "cc -c" lines (e.g., .c.o) ++dnl SHOW_CC - symbol to put before explicit "cc -c" lines ++dnl ECHO_CC - symbol to put before any "cc" line ++dnl ++AC_DEFUN([CF_DISABLE_ECHO],[ ++AC_MSG_CHECKING(if you want to see long compiling messages) ++CF_ARG_DISABLE(echo, ++ [ --disable-echo display "compiling" commands], ++ [ ++ ECHO_LT='--silent' ++ ECHO_LD='@echo linking [$]@;' ++ RULE_CC=' @echo compiling [$]<' ++ SHOW_CC=' @echo compiling [$]@' ++ ECHO_CC='@' ++],[ ++ ECHO_LT='' ++ ECHO_LD='' ++ RULE_CC='# compiling' ++ SHOW_CC='# compiling' ++ ECHO_CC='' ++]) ++AC_MSG_RESULT($enableval) ++AC_SUBST(ECHO_LT) ++AC_SUBST(ECHO_LD) ++AC_SUBST(RULE_CC) ++AC_SUBST(SHOW_CC) ++AC_SUBST(ECHO_CC) ++])dnl ++dnl --------------------------------------------------------------------------- ++dnl CF_FIND_LIBRARY version: 7 updated: 2000/04/13 21:38:04 ++dnl --------------- ++dnl Look for a non-standard library, given parameters for AC_TRY_LINK. We ++dnl prefer a standard location, and use -L options only if we do not find the ++dnl library in the standard library location(s). ++dnl $1 = library name ++dnl $2 = library class, usually the same as library name ++dnl $3 = includes ++dnl $4 = code fragment to compile/link ++dnl $5 = corresponding function-name ++dnl $6 = flag, nonnull if failure causes an error-exit ++dnl ++dnl Sets the variable "$cf_libdir" as a side-effect, so we can see if we had ++dnl to use a -L option. ++AC_DEFUN([CF_FIND_LIBRARY], ++[ ++ eval 'cf_cv_have_lib_'$1'=no' ++ cf_libdir="" ++ AC_CHECK_FUNC($5, ++ eval 'cf_cv_have_lib_'$1'=yes',[ ++ cf_save_LIBS="$LIBS" ++ AC_MSG_CHECKING(for $5 in -l$1) ++ LIBS="-l$1 $LIBS" ++ AC_TRY_LINK([$3],[$4], ++ [AC_MSG_RESULT(yes) ++ eval 'cf_cv_have_lib_'$1'=yes' ++ ], ++ [AC_MSG_RESULT(no) ++ CF_LIBRARY_PATH(cf_search,$2) ++ for cf_libdir in $cf_search ++ do ++ AC_MSG_CHECKING(for -l$1 in $cf_libdir) ++ LIBS="-L$cf_libdir -l$1 $cf_save_LIBS" ++ AC_TRY_LINK([$3],[$4], ++ [AC_MSG_RESULT(yes) ++ eval 'cf_cv_have_lib_'$1'=yes' ++ break], ++ [AC_MSG_RESULT(no) ++ LIBS="$cf_save_LIBS"]) ++ done ++ ]) ++ ]) ++eval 'cf_found_library=[$]cf_cv_have_lib_'$1 ++ifelse($6,,[ ++if test $cf_found_library = no ; then ++ AC_ERROR(Cannot link $1 library) ++fi ++]) ++])dnl ++dnl --------------------------------------------------------------------------- ++dnl CF_FUNC_WAIT version: 2 updated: 1997/10/21 19:45:33 ++dnl ------------ ++dnl Test for the presence of <sys/wait.h>, 'union wait', arg-type of 'wait()' ++dnl and/or 'waitpid()'. ++dnl ++dnl Note that we cannot simply grep for 'union wait' in the wait.h file, ++dnl because some Posix systems turn this on only when a BSD variable is ++dnl defined. ++dnl ++dnl I don't use AC_HEADER_SYS_WAIT, because it defines HAVE_SYS_WAIT_H, which ++dnl would conflict with an attempt to test that header directly. ++dnl ++AH_TEMPLATE([WAIT_USES_UNION], [Define if wait uses union]) ++AH_TEMPLATE([WAITPID_USES_UNION], [Define if waitpid uses union]) ++AC_DEFUN([CF_FUNC_WAIT], ++[ ++AC_REQUIRE([CF_UNION_WAIT]) ++if test $cf_cv_type_unionwait = yes; then ++ ++ AC_MSG_CHECKING(if union wait can be used as wait-arg) ++ AC_CACHE_VAL(cf_cv_arg_union_wait,[ ++ AC_TRY_COMPILE($cf_wait_headers, ++ [union wait x; wait(&x)], ++ [cf_cv_arg_union_wait=yes], ++ [cf_cv_arg_union_wait=no]) ++ ]) ++ AC_MSG_RESULT($cf_cv_arg_union_wait) ++ test $cf_cv_arg_union_wait = yes && AC_DEFINE(WAIT_USES_UNION) ++ ++ AC_MSG_CHECKING(if union wait can be used as waitpid-arg) ++ AC_CACHE_VAL(cf_cv_arg_union_waitpid,[ ++ AC_TRY_COMPILE($cf_wait_headers, ++ [union wait x; waitpid(0, &x, 0)], ++ [cf_cv_arg_union_waitpid=yes], ++ [cf_cv_arg_union_waitpid=no]) ++ ]) ++ AC_MSG_RESULT($cf_cv_arg_union_waitpid) ++ test $cf_cv_arg_union_waitpid = yes && AC_DEFINE(WAITPID_USES_UNION) ++ ++fi ++])dnl ++dnl --------------------------------------------------------------------------- ++dnl CF_GCC_ATTRIBUTES version: 9 updated: 2002/12/21 19:25:52 ++dnl ----------------- ++dnl Test for availability of useful gcc __attribute__ directives to quiet ++dnl compiler warnings. Though useful, not all are supported -- and contrary ++dnl to documentation, unrecognized directives cause older compilers to barf. ++AC_DEFUN([CF_GCC_ATTRIBUTES], ++[ ++if test "$GCC" = yes ++then ++cat > conftest.i <<EOF ++#ifndef GCC_PRINTF ++#define GCC_PRINTF 0 ++#endif ++#ifndef GCC_SCANF ++#define GCC_SCANF 0 ++#endif ++#ifndef GCC_NORETURN ++#define GCC_NORETURN /* nothing */ ++#endif ++#ifndef GCC_UNUSED ++#define GCC_UNUSED /* nothing */ ++#endif ++EOF ++if test "$GCC" = yes ++then ++ AC_CHECKING([for $CC __attribute__ directives]) ++cat > conftest.$ac_ext <<EOF ++#line __oline__ "configure" ++#include "confdefs.h" ++#include "conftest.h" ++#include "conftest.i" ++#if GCC_PRINTF ++#define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var))) ++#else ++#define GCC_PRINTFLIKE(fmt,var) /*nothing*/ ++#endif ++#if GCC_SCANF ++#define GCC_SCANFLIKE(fmt,var) __attribute__((format(scanf,fmt,var))) ++#else ++#define GCC_SCANFLIKE(fmt,var) /*nothing*/ ++#endif ++extern void wow(char *,...) GCC_SCANFLIKE(1,2); ++extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN; ++extern void foo(void) GCC_NORETURN; ++int main(int argc GCC_UNUSED, char *argv[[]] GCC_UNUSED) { return 0; } ++EOF ++ for cf_attribute in scanf printf unused noreturn ++ do ++ CF_UPPER(CF_ATTRIBUTE,$cf_attribute) ++ cf_directive="__attribute__(($cf_attribute))" ++ echo "checking for $CC $cf_directive" 1>&AC_FD_CC ++ case $cf_attribute in ++ scanf|printf) ++ cat >conftest.h <<EOF ++#define GCC_$CF_ATTRIBUTE 1 ++EOF ++ ;; ++ *) ++ cat >conftest.h <<EOF ++#define GCC_$CF_ATTRIBUTE $cf_directive ++EOF ++ ;; ++ esac ++ if AC_TRY_EVAL(ac_compile); then ++ test -n "$verbose" && AC_MSG_RESULT(... $cf_attribute) ++ cat conftest.h >>confdefs.h ++ fi ++ done ++else ++ fgrep define conftest.i >>confdefs.h ++fi ++rm -rf conftest* ++fi ++])dnl ++dnl --------------------------------------------------------------------------- ++dnl CF_GCC_VERSION version: 3 updated: 2003/09/06 19:16:57 ++dnl -------------- ++dnl Find version of gcc ++AC_DEFUN([CF_GCC_VERSION],[ ++AC_REQUIRE([AC_PROG_CC]) ++GCC_VERSION=none ++if test "$GCC" = yes ; then ++ AC_MSG_CHECKING(version of $CC) ++ GCC_VERSION="`${CC} --version|sed -e '2,$d' -e 's/^[[^0-9.]]*//' -e 's/[[^0-9.]].*//'`" ++ test -z "$GCC_VERSION" && GCC_VERSION=unknown ++ AC_MSG_RESULT($GCC_VERSION) ++fi ++])dnl ++dnl --------------------------------------------------------------------------- ++dnl CF_GCC_WARNINGS version: 15 updated: 2003/07/05 18:42:30 ++dnl --------------- ++dnl Check if the compiler supports useful warning options. There's a few that ++dnl we don't use, simply because they're too noisy: ++dnl ++dnl -Wconversion (useful in older versions of gcc, but not in gcc 2.7.x) ++dnl -Wredundant-decls (system headers make this too noisy) ++dnl -Wtraditional (combines too many unrelated messages, only a few useful) ++dnl -Wwrite-strings (too noisy, but should review occasionally). This ++dnl is enabled for ncurses using "--enable-const". ++dnl -pedantic ++dnl ++AC_DEFUN([CF_GCC_WARNINGS], ++[ ++AC_REQUIRE([CF_GCC_VERSION]) ++if test "$GCC" = yes ++then ++ cat > conftest.$ac_ext <<EOF ++#line __oline__ "configure" ++int main(int argc, char *argv[[]]) { return (argv[[argc-1]] == 0) ; } ++EOF ++ AC_CHECKING([for $CC warning options]) ++ cf_save_CFLAGS="$CFLAGS" ++ EXTRA_CFLAGS="-W -Wall" ++ cf_warn_CONST="" ++ test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings" ++ for cf_opt in \ ++ Wbad-function-cast \ ++ Wcast-align \ ++ Wcast-qual \ ++ Winline \ ++ Wmissing-declarations \ ++ Wmissing-prototypes \ ++ Wnested-externs \ ++ Wpointer-arith \ ++ Wshadow \ ++ Wstrict-prototypes \ ++ Wundef $cf_warn_CONST ++ do ++ CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt" ++ if AC_TRY_EVAL(ac_compile); then ++ test -n "$verbose" && AC_MSG_RESULT(... -$cf_opt) ++ case $cf_opt in #(vi ++ Wcast-qual) #(vi ++ CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES" ++ ;; ++ Winline) #(vi ++ case $GCC_VERSION in ++ 3.3*) ++ CF_VERBOSE(feature is broken in gcc $GCC_VERSION) ++ continue;; ++ esac ++ ;; ++ esac ++ EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt" ++ fi ++ done ++ rm -f conftest* ++ CFLAGS="$cf_save_CFLAGS" ++fi ++AC_SUBST(EXTRA_CFLAGS) ++])dnl ++dnl --------------------------------------------------------------------------- ++dnl CF_GNU_SOURCE version: 3 updated: 2000/10/29 23:30:53 ++dnl ------------- ++dnl Check if we must define _GNU_SOURCE to get a reasonable value for ++dnl _XOPEN_SOURCE, upon which many POSIX definitions depend. This is a defect ++dnl (or misfeature) of glibc2, which breaks portability of many applications, ++dnl since it is interwoven with GNU extensions. ++dnl ++dnl Well, yes we could work around it... ++AC_DEFUN([CF_GNU_SOURCE], ++[ ++AC_CACHE_CHECK(if we must define _GNU_SOURCE,cf_cv_gnu_source,[ ++AC_TRY_COMPILE([#include <sys/types.h>],[ ++#ifndef _XOPEN_SOURCE ++make an error ++#endif], ++ [cf_cv_gnu_source=no], ++ [cf_save="$CPPFLAGS" ++ CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE" ++ AC_TRY_COMPILE([#include <sys/types.h>],[ ++#ifdef _XOPEN_SOURCE ++make an error ++#endif], ++ [cf_cv_gnu_source=no], ++ [cf_cv_gnu_source=yes]) ++ CPPFLAGS="$cf_save" ++ ]) ++]) ++test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE" ++])dnl ++dnl --------------------------------------------------------------------------- ++dnl CF_HEADER_PATH version: 8 updated: 2002/11/10 14:46:59 ++dnl -------------- ++dnl Construct a search-list for a nonstandard header-file ++AC_DEFUN([CF_HEADER_PATH], ++[CF_SUBDIR_PATH($1,$2,include) ++test "$includedir" != NONE && \ ++test "$includedir" != "/usr/include" && \ ++test -d "$includedir" && { ++ test -d $includedir && $1="[$]$1 $includedir" ++ test -d $includedir/$2 && $1="[$]$1 $includedir/$2" ++} ++ ++test "$oldincludedir" != NONE && \ ++test "$oldincludedir" != "/usr/include" && \ ++test -d "$oldincludedir" && { ++ test -d $oldincludedir && $1="[$]$1 $oldincludedir" ++ test -d $oldincludedir/$2 && $1="[$]$1 $oldincludedir/$2" ++} ++ ++])dnl ++dnl --------------------------------------------------------------------------- ++dnl CF_HELP_MESSAGE version: 3 updated: 1998/01/14 10:56:23 ++dnl --------------- ++dnl Insert text into the help-message, for readability, from AC_ARG_WITH. ++AC_DEFUN([CF_HELP_MESSAGE], ++[AC_DIVERT_HELP([$1])dnl ++])dnl ++dnl --------------------------------------------------------------------------- ++dnl CF_INCLUDE_DIRS version: 4 updated: 2002/12/01 00:12:15 ++dnl --------------- ++dnl Construct the list of include-options according to whether we're building ++dnl in the source directory or using '--srcdir=DIR' option. If we're building ++dnl with gcc, don't append the includedir if it happens to be /usr/include, ++dnl since that usually breaks gcc's shadow-includes. ++AC_DEFUN([CF_INCLUDE_DIRS], ++[ ++CPPFLAGS="-I. -I../include $CPPFLAGS" ++if test "$srcdir" != "."; then ++ CPPFLAGS="-I\$(srcdir)/../include $CPPFLAGS" ++fi ++if test "$GCC" != yes; then ++ CPPFLAGS="$CPPFLAGS -I\$(includedir)" ++elif test "$includedir" != "/usr/include"; then ++ if test "$includedir" = '${prefix}/include' ; then ++ if test $prefix != /usr ; then ++ CPPFLAGS="$CPPFLAGS -I\$(includedir)" ++ fi ++ else ++ CPPFLAGS="$CPPFLAGS -I\$(includedir)" ++ fi ++fi ++AC_SUBST(CPPFLAGS) ++])dnl ++dnl --------------------------------------------------------------------------- ++dnl CF_INCLUDE_PATH version: 4 updated: 2001/04/15 21:21:45 ++dnl --------------- ++dnl Adds to the include-path ++dnl ++dnl Autoconf 1.11 should have provided a way to add include path options to ++dnl the cpp-tests. ++dnl ++AC_DEFUN([CF_INCLUDE_PATH], ++[ ++for cf_path in $1 ++do ++ cf_result="no" ++ AC_MSG_CHECKING(for directory $cf_path) ++ if test -d $cf_path ++ then ++ INCLUDES="$INCLUDES -I$cf_path" ++ ac_cpp="${ac_cpp} -I$cf_path" ++ CFLAGS="$CFLAGS -I$cf_path" ++ cf_result="yes" ++ case $cf_path in ++ /usr/include|/usr/include/*) ++ ;; ++ *) ++ CF_DIRNAME(cf_temp,$cf_path) ++ case $cf_temp in ++ */include) ++ INCLUDES="$INCLUDES -I$cf_temp" ++ ac_cpp="${ac_cpp} -I$cf_temp" ++ CFLAGS="$CFLAGS -I$cf_temp" ++ ;; ++ esac ++ esac ++ fi ++ AC_MSG_RESULT($cf_result) ++done ++])dnl ++dnl --------------------------------------------------------------------------- ++dnl CF_LIBRARY_PATH version: 7 updated: 2002/11/10 14:46:59 ++dnl --------------- ++dnl Construct a search-list for a nonstandard library-file ++AC_DEFUN([CF_LIBRARY_PATH], ++[CF_SUBDIR_PATH($1,$2,lib)])dnl ++dnl --------------------------------------------------------------------------- ++dnl CF_LIB_PREFIX version: 7 updated: 2001/01/12 01:23:48 ++dnl ------------- ++dnl Compute the library-prefix for the given host system ++dnl $1 = variable to set ++AC_DEFUN([CF_LIB_PREFIX], ++[ ++ case $cf_cv_system_name in ++ OS/2*) LIB_PREFIX='' ;; ++ os2*) LIB_PREFIX='' ;; ++ *) LIB_PREFIX='lib' ;; ++ esac ++ifelse($1,,,[$1=$LIB_PREFIX]) ++ AC_SUBST(LIB_PREFIX) ++])dnl ++dnl --------------------------------------------------------------------------- ++dnl CF_MAKEFLAGS version: 9 updated: 2001/12/30 18:17:27 ++dnl ------------ ++dnl Some 'make' programs support $(MAKEFLAGS), some $(MFLAGS), to pass 'make' ++dnl options to lower-levels. It's very useful for "make -n" -- if we have it. ++dnl (GNU 'make' does both, something POSIX 'make', which happens to make the ++dnl $(MAKEFLAGS) variable incompatible because it adds the assignments :-) ++AC_DEFUN([CF_MAKEFLAGS], ++[ ++AC_CACHE_CHECK(for makeflags variable, cf_cv_makeflags,[ ++ cf_cv_makeflags='' ++ for cf_option in '-$(MAKEFLAGS)' '$(MFLAGS)' ++ do ++ cat >cf_makeflags.tmp <<CF_EOF ++SHELL = /bin/sh ++all : ++ @ echo '.$cf_option' ++CF_EOF ++ cf_result=`${MAKE-make} -k -f cf_makeflags.tmp 2>/dev/null` ++ case "$cf_result" in ++ .*k) ++ cf_result=`${MAKE-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null` ++ case "$cf_result" in ++ .*CC=*) cf_cv_makeflags= ++ ;; ++ *) cf_cv_makeflags=$cf_option ++ ;; ++ esac ++ break ++ ;; ++ *) echo no match "$cf_result" ++ ;; ++ esac ++ done ++ rm -f cf_makeflags.tmp ++]) ++ ++AC_SUBST(cf_cv_makeflags) ++])dnl ++dnl --------------------------------------------------------------------------- ++dnl CF_MAKE_TAGS version: 2 updated: 2000/10/04 09:18:40 ++dnl ------------ ++dnl Generate tags/TAGS targets for makefiles. Do not generate TAGS if we have ++dnl a monocase filesystem. ++AC_DEFUN([CF_MAKE_TAGS],[ ++AC_REQUIRE([CF_MIXEDCASE_FILENAMES]) ++AC_CHECK_PROG(MAKE_LOWER_TAGS, ctags, yes, no) ++ ++if test "$cf_cv_mixedcase" = yes ; then ++ AC_CHECK_PROG(MAKE_UPPER_TAGS, etags, yes, no) ++else ++ MAKE_UPPER_TAGS=no ++fi |
