Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Update dialog to 1.2-20130923.

Approved by:	re (marius)
  • Loading branch information...
commit 6633bf70ed24c304037f64ca2f28e6ea8d2a0b47 1 parent 8a88ce9
@devinteske devinteske authored
Showing with 4,846 additions and 1,966 deletions.
  1. +31 −2 contrib/dialog/CHANGES
  2. +1 −1  contrib/dialog/VERSION
  3. +1,039 −80 contrib/dialog/aclocal.m4
  4. +4 −3 contrib/dialog/arrows.c
  5. +9 −23 contrib/dialog/buildlist.c
  6. +9 −23 contrib/dialog/checklist.c
  7. +94 −73 contrib/dialog/config.guess
  8. +46 −41 contrib/dialog/config.sub
  9. +2,681 −1,425 contrib/dialog/configure
  10. +34 −10 contrib/dialog/configure.in
  11. +36 −15 contrib/dialog/dialog.1
  12. +92 −2 contrib/dialog/dialog.3
  13. +6 −1 contrib/dialog/dialog.c
  14. +9 −1 contrib/dialog/dialog.h
  15. +4 −8 contrib/dialog/formbox.c
  16. +61 −25 contrib/dialog/guage.c
  17. +177 −129 contrib/dialog/inputstr.c
  18. +21 −10 contrib/dialog/makefile.in
  19. +6 −9 contrib/dialog/menubox.c
  20. +4 −8 contrib/dialog/mixedform.c
  21. +12 −0 contrib/dialog/package/debian/changelog
  22. +3 −3 contrib/dialog/package/debian/copyright
  23. +2 −2 contrib/dialog/package/dialog.spec
  24. +48 −0 contrib/dialog/package/freebsd/Makefile
  25. +2 −0  contrib/dialog/package/freebsd/distinfo
  26. +9 −0 contrib/dialog/package/freebsd/pkg-descr
  27. +203 −0 contrib/dialog/package/freebsd/pkg-plist
  28. +113 −0 contrib/dialog/po/fa.po
  29. +30 −30 contrib/dialog/po/lt.po
  30. +5 −4 contrib/dialog/samples/inputbox6-utf8
  31. +3 −3 contrib/dialog/samples/report-tempfile
  32. +9 −23 contrib/dialog/treeview.c
  33. +42 −11 contrib/dialog/util.c
  34. +1 −1  gnu/lib/libdialog/dlg_config.h
View
33 contrib/dialog/CHANGES
@@ -1,9 +1,38 @@
--- $Id: CHANGES,v 1.458 2013/05/24 00:23:22 tom Exp $
+-- $Id: CHANGES,v 1.476 2013/09/24 00:06:47 tom Exp $
-- Thomas E. Dickey <dickey@invisible-island.net>
This version of dialog was originally from a Debian snapshot. I've done this
to it:
+2013/09/23
+ + fix samples/inputbox6-utf8, which had depended unnecessarily on bash.
+ + improve memory caching for wide-character manipulation in gauge
+ widget (report by Devin Teske).
+ + add dlg_reallocate_gauge (discussion with Devin Teske).
+ + updated configure macros to use msys changes from ncurses.
+ + update config.guess, config.sub
+
+2013/09/02
+ + modify makefile rule to make the ".png" filenames created by groff
+ predictable.
+ + add option --help-tags to allow scripts to get the item's tag field
+ consistently from help- and help-item button results rather than
+ getting the item's text for the latter (discussion with Florent
+ Rougon).
+ + correct manpage discussion of DIALOG_ITEM_HELP versus --item-help,
+ as well as --help-button return status (report by Florent Rougon).
+ + correct limit used for --hline option (report by Devin Teske,
+ cf: 2011/06/30).
+ + do not print empty "[]" if a --hline option was given with an empty
+ value (report by Devin Teske).
+ + miscellaneous configure script fixes/updates. In particular, add
+ option --with-shared which builds shared libraries without a libtool
+ dependency.
+ + add FreeBSD port-files for test-builds.
+ + update lt.po, add fa.po from
+ http://translationproject.org/latest/dialog/
+ + update config.guess, config.sub
+
2013/05/23
+ modify ifdef in arrows.c to work around packages which use the
wide-character ncursesw headers with the ncurses library (report
@@ -298,7 +327,7 @@ to it:
separate ncurses' header files.
+ CF_DISABLE_RPATH_HACK, fix garbled message
+ CF_LD_RPATH_OPT, add mirbsd
- + CF_MAKEFLAGS, filter out GNU make's entering/leaving messages.
+ + CF_MAKEFLAGS, filter out GNU make's entering/leaving messages.
This only appeared when using the macro in a dpkg script, though it
should have in other cases.
+ CF_RPATH_HACK, add a check for libraries not found, e.g., from
View
2  contrib/dialog/VERSION
@@ -1 +1 @@
-11:1:0 1.2 20130523
+11:1:0 1.2 20130923
View
1,119 contrib/dialog/aclocal.m4
@@ -1,7 +1,7 @@
dnl macros used for DIALOG configure script
-dnl $Id: aclocal.m4,v 1.90 2012/12/02 20:07:30 tom Exp $
+dnl $Id: aclocal.m4,v 1.94 2013/09/22 14:26:24 tom Exp $
dnl ---------------------------------------------------------------------------
-dnl Copyright 1999-2011,2012 -- Thomas E. Dickey
+dnl Copyright 1999-2012,2013 -- Thomas E. Dickey
dnl
dnl Permission is hereby granted, free of charge, to any person obtaining a
dnl copy of this software and associated documentation files (the
@@ -590,7 +590,7 @@ changequote([,])dnl
AC_SUBST(GENCAT)
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_ACVERSION_CHECK version: 3 updated: 2012/10/03 18:39:53
+dnl CF_ACVERSION_CHECK version: 4 updated: 2013/03/04 19:52:56
dnl ------------------
dnl Conditionally generate script according to whether we're using a given autoconf.
dnl
@@ -599,6 +599,7 @@ dnl $2 = code to use if AC_ACVERSION is at least as high as $1.
dnl $3 = code to use if AC_ACVERSION is older than $1.
define([CF_ACVERSION_CHECK],
[
+ifdef([AC_ACVERSION], ,[m4_copy([m4_PACKAGE_VERSION],[AC_ACVERSION])])dnl
ifdef([m4_version_compare],
[m4_if(m4_version_compare(m4_defn([AC_ACVERSION]), [$1]), -1, [$3], [$2])],
[CF_ACVERSION_COMPARE(
@@ -1125,6 +1126,27 @@ if test ".$system_name" != ".$cf_cv_system_name" ; then
fi
])dnl
dnl ---------------------------------------------------------------------------
+dnl CF_CHECK_LIBTOOL_VERSION version: 1 updated: 2013/04/06 18:03:09
+dnl ------------------------
+dnl Show the version of libtool
+dnl
+dnl Save the version in a cache variable - this is not entirely a good thing,
+dnl but the version string from libtool is very ugly, and for bug reports it
+dnl might be useful to have the original string.
+AC_DEFUN([CF_CHECK_LIBTOOL_VERSION],[
+if test -n "$LIBTOOL" && test "$LIBTOOL" != none
+then
+ AC_MSG_CHECKING(version of $LIBTOOL)
+ CF_LIBTOOL_VERSION
+ AC_MSG_RESULT($cf_cv_libtool_version)
+ if test -z "$cf_cv_libtool_version" ; then
+ AC_MSG_ERROR(This is not GNU libtool)
+ fi
+else
+ AC_MSG_ERROR(GNU libtool has not been found)
+fi
+])dnl
+dnl ---------------------------------------------------------------------------
dnl CF_CLANG_COMPILER version: 1 updated: 2012/06/16 14:55:39
dnl -----------------
dnl Check if the given compiler is really clang. clang's C driver defines
@@ -1293,7 +1315,7 @@ fi
AC_CHECK_HEADERS($cf_cv_ncurses_header)
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_CURSES_LIBS version: 36 updated: 2012/07/07 21:02:48
+dnl CF_CURSES_LIBS version: 37 updated: 2013/02/09 17:33:50
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.
@@ -1330,7 +1352,7 @@ hpux10.*) #(vi
ac_cv_func_initscr=yes
])])
fi
- ;;
+ ;;
linux*)
case `arch 2>/dev/null` in
x86_64)
@@ -1345,7 +1367,7 @@ linux*)
CF_ADD_LIBDIR(/lib)
;;
esac
- ;;
+ ;;
sunos3*|sunos4*)
if test "x$cf_cv_screen" = "xcurses_5lib"
then
@@ -1359,59 +1381,63 @@ sunos3*|sunos4*)
esac
if test ".$ac_cv_func_initscr" != .yes ; then
- cf_save_LIBS="$LIBS"
- cf_term_lib=""
- cf_curs_lib=""
+ cf_save_LIBS="$LIBS"
- if test ".${cf_cv_ncurses_version:-no}" != .no
- then
- cf_check_list="ncurses curses cursesX"
- else
- cf_check_list="cursesX curses ncurses"
- fi
+ 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 otermcap termcap tinfo termlib unknown
- do
- AC_CHECK_LIB($cf_term_lib,tgoto,[break])
- done
- ])
+ # Check for library containing tgoto. Do this before curses library
+ # because it may be needed to link the test-case for initscr.
+ if test "x$cf_term_lib" = x
+ then
+ AC_CHECK_FUNC(tgoto,[cf_term_lib=predefined],[
+ for cf_term_lib in $cf_check_list otermcap termcap tinfo termlib unknown
+ do
+ AC_CHECK_LIB($cf_term_lib,tgoto,[break])
+ done
+ ])
+ fi
- # 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 pdcurses unknown
- do
- AC_CHECK_LIB($cf_curs_lib,initscr,[break])
- done
- test $cf_curs_lib = unknown && AC_MSG_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_MSG_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
+ # Check for library containing initscr
+ test "$cf_term_lib" != predefined && test "$cf_term_lib" != unknown && LIBS="-l$cf_term_lib $cf_save_LIBS"
+ if test "x$cf_curs_lib" = x
+ then
+ for cf_curs_lib in $cf_check_list xcurses jcurses pdcurses unknown
+ do
+ AC_CHECK_LIB($cf_curs_lib,initscr,[break])
+ done
+ fi
+ test $cf_curs_lib = unknown && AC_MSG_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_MSG_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
@@ -1708,6 +1734,20 @@ if test "$cf_disable_rpath_hack" = no ; then
fi
])
dnl ---------------------------------------------------------------------------
+dnl CF_ENABLE_RPATH version: 2 updated: 2010/03/27 18:39:42
+dnl ---------------
+dnl Check if the rpath option should be used, setting cache variable
+dnl cf_cv_enable_rpath if so.
+AC_DEFUN([CF_ENABLE_RPATH],
+[
+AC_MSG_CHECKING(if rpath option should be used)
+AC_ARG_ENABLE(rpath,
+[ --enable-rpath use rpath option when generating shared libraries],
+[cf_cv_enable_rpath=$enableval],
+[cf_cv_enable_rpath=no])
+AC_MSG_RESULT($cf_cv_enable_rpath)
+])dnl
+dnl ---------------------------------------------------------------------------
dnl CF_FIND_LIBRARY version: 9 updated: 2008/03/23 14:48:54
dnl ---------------
dnl Look for a non-standard library, given parameters for AC_TRY_LINK. We
@@ -1888,6 +1928,15 @@ ifelse([$5],,AC_MSG_WARN(Cannot find $3 library),[$5])
fi
])dnl
dnl ---------------------------------------------------------------------------
+dnl CF_FORGET_TOOL version: 1 updated: 2013/04/06 18:03:09
+dnl --------------
+dnl Forget that we saw the given tool.
+AC_DEFUN([CF_FORGET_TOOL],[
+unset ac_cv_prog_ac_ct_$1
+unset ac_ct_$1
+unset $1
+])dnl
+dnl ---------------------------------------------------------------------------
dnl CF_FUNC_WAIT version: 3 updated: 2012/10/06 08:57:51
dnl ------------
dnl Test for the presence of <sys/wait.h>, 'union wait', arg-type of 'wait()'
@@ -2256,7 +2305,7 @@ test -d "$oldincludedir" && {
$1="[$]$1 $cf_header_path_list"
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_INTEL_COMPILER version: 4 updated: 2010/05/26 05:38:42
+dnl CF_INTEL_COMPILER version: 5 updated: 2013/02/10 10:41:05
dnl -----------------
dnl Check if the given compiler is really the Intel compiler for Linux. It
dnl tries to imitate gcc, but does not return an error when it finds a mismatch
@@ -2270,6 +2319,7 @@ dnl $1 = GCC (default) or GXX
dnl $2 = INTEL_COMPILER (default) or INTEL_CPLUSPLUS
dnl $3 = CFLAGS (default) or CXXFLAGS
AC_DEFUN([CF_INTEL_COMPILER],[
+AC_REQUIRE([AC_CANONICAL_HOST])
ifelse([$2],,INTEL_COMPILER,[$2])=no
if test "$ifelse([$1],,[$1],GCC)" = yes ; then
@@ -2415,6 +2465,18 @@ CF_SUBDIR_PATH($1,$2,lib)
$1="$cf_library_path_list [$]$1"
])dnl
dnl ---------------------------------------------------------------------------
+dnl CF_LIBTOOL_VERSION version: 1 updated: 2013/04/06 18:03:09
+dnl ------------------
+AC_DEFUN([CF_LIBTOOL_VERSION],[
+if test -n "$LIBTOOL" && test "$LIBTOOL" != none
+then
+ cf_cv_libtool_version=`$LIBTOOL --version 2>&1 | sed -e '/^$/d' |sed -e '2,$d' -e 's/([[^)]]*)//g' -e 's/^[[^1-9]]*//' -e 's/[[^0-9.]].*//'`
+else
+ cf_cv_libtool_version=
+fi
+test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
+])dnl
+dnl ---------------------------------------------------------------------------
dnl CF_LIB_PREFIX version: 9 updated: 2012/01/21 19:28:10
dnl -------------
dnl Compute the library-prefix for the given host system
@@ -2432,6 +2494,69 @@ ifelse($1,,,[$1=$LIB_PREFIX])
AC_SUBST(LIB_PREFIX)
])dnl
dnl ---------------------------------------------------------------------------
+dnl CF_LIB_SUFFIX version: 22 updated: 2013/09/07 13:54:05
+dnl -------------
+dnl Compute the library file-suffix from the given model name
+dnl $1 = model name
+dnl $2 = variable to set (the nominal library suffix)
+dnl $3 = dependency variable to set (actual filename)
+dnl The variable $LIB_SUFFIX, if set, prepends the variable to set.
+AC_DEFUN([CF_LIB_SUFFIX],
+[
+ case X$1 in #(vi
+ Xlibtool) #(vi
+ $2='.la'
+ $3=[$]$2
+ ;;
+ Xdebug) #(vi
+ $2='_g.a'
+ $3=[$]$2
+ ;;
+ Xprofile) #(vi
+ $2='_p.a'
+ $3=[$]$2
+ ;;
+ Xshared) #(vi
+ case $cf_cv_system_name in
+ aix[[5-7]]*) #(vi
+ $2='.a'
+ $3=[$]$2
+ ;;
+ cygwin*|msys*|mingw*) #(vi
+ $2='.dll'
+ $3='.dll.a'
+ ;;
+ darwin*) #(vi
+ $2='.dylib'
+ $3=[$]$2
+ ;;
+ hpux*) #(vi
+ case $target in
+ ia64*) #(vi
+ $2='.so'
+ $3=[$]$2
+ ;;
+ *) #(vi
+ $2='.sl'
+ $3=[$]$2
+ ;;
+ esac
+ ;;
+ *) #(vi
+ $2='.so'
+ $3=[$]$2
+ ;;
+ esac
+ ;;
+ *)
+ $2='.a'
+ $3=[$]$2
+ ;;
+ esac
+ test -n "$LIB_SUFFIX" && $2="${LIB_SUFFIX}[$]{$2}"
+ test -n "$LIB_SUFFIX" && $3="${LIB_SUFFIX}[$]{$3}"
+])dnl
+dnl ---------------------------------------------------------------------------
dnl CF_MAKEFLAGS version: 14 updated: 2011/03/31 19:29:46
dnl ------------
dnl Some 'make' programs support ${MAKEFLAGS}, some ${MFLAGS}, to pass 'make'
@@ -2569,7 +2694,7 @@ if test "$cf_cv_mbstate_t" != unknown ; then
fi
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_MIXEDCASE_FILENAMES version: 4 updated: 2012/10/02 20:55:03
+dnl CF_MIXEDCASE_FILENAMES version: 5 updated: 2013/09/07 13:54:05
dnl ----------------------
dnl Check if the file-system supports mixed-case filenames. If we're able to
dnl create a lowercase name and see it as uppercase, it doesn't support that.
@@ -2578,7 +2703,7 @@ AC_DEFUN([CF_MIXEDCASE_FILENAMES],
AC_CACHE_CHECK(if filesystem supports mixed-case filenames,cf_cv_mixedcase,[
if test "$cross_compiling" = yes ; then
case $target_alias in #(vi
- *-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-mingw32*|*-uwin*) #(vi
+ *-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw32*|*-uwin*) #(vi
cf_cv_mixedcase=no
;;
*)
@@ -2959,6 +3084,25 @@ case .$with_cflags in #(vi
esac
])dnl
dnl ---------------------------------------------------------------------------
+dnl CF_NUMBER_SYNTAX version: 1 updated: 2003/09/20 18:12:49
+dnl ----------------
+dnl Check if the given variable is a number. If not, report an error.
+dnl $1 is the variable
+dnl $2 is the message
+AC_DEFUN([CF_NUMBER_SYNTAX],[
+if test -n "$1" ; then
+ case $1 in #(vi
+ [[0-9]]*) #(vi
+ ;;
+ *)
+ AC_MSG_ERROR($2 is not a number: $1)
+ ;;
+ esac
+else
+ AC_MSG_ERROR($2 value is empty)
+fi
+])dnl
+dnl ---------------------------------------------------------------------------
dnl CF_OUR_MESSAGES version: 7 updated: 2004/09/12 19:45:55
dnl ---------------
dnl Check if we use the messages included with this program
@@ -3049,6 +3193,40 @@ case ".[$]$1" in #(vi
esac
])dnl
dnl ---------------------------------------------------------------------------
+dnl CF_PKG_CONFIG version: 7 updated: 2011/04/29 04:53:22
+dnl -------------
+dnl Check for the package-config program, unless disabled by command-line.
+AC_DEFUN([CF_PKG_CONFIG],
+[
+AC_MSG_CHECKING(if you want to use pkg-config)
+AC_ARG_WITH(pkg-config,
+ [ --with-pkg-config{=path} enable/disable use of pkg-config],
+ [cf_pkg_config=$withval],
+ [cf_pkg_config=yes])
+AC_MSG_RESULT($cf_pkg_config)
+
+case $cf_pkg_config in #(vi
+no) #(vi
+ PKG_CONFIG=none
+ ;;
+yes) #(vi
+ CF_ACVERSION_CHECK(2.52,
+ [AC_PATH_TOOL(PKG_CONFIG, pkg-config, none)],
+ [AC_PATH_PROG(PKG_CONFIG, pkg-config, none)])
+ ;;
+*)
+ PKG_CONFIG=$withval
+ ;;
+esac
+
+test -z "$PKG_CONFIG" && PKG_CONFIG=none
+if test "$PKG_CONFIG" != none ; then
+ CF_PATH_SYNTAX(PKG_CONFIG)
+fi
+
+AC_SUBST(PKG_CONFIG)
+])dnl
+dnl ---------------------------------------------------------------------------
dnl CF_POSIX_C_SOURCE version: 8 updated: 2010/05/26 05:38:42
dnl -----------------
dnl Define _POSIX_C_SOURCE to the given level, and _POSIX_SOURCE if needed.
@@ -3168,6 +3346,28 @@ AC_CHECK_PROGS(LINT, tdlint lint alint splint lclint)
AC_SUBST(LINT_OPTS)
])dnl
dnl ---------------------------------------------------------------------------
+dnl CF_PROG_LN_S version: 2 updated: 2010/08/14 18:25:37
+dnl ------------
+dnl Combine checks for "ln -s" and "ln -sf", updating $LN_S to include "-f"
+dnl option if it is supported.
+AC_DEFUN([CF_PROG_LN_S],[
+AC_PROG_LN_S
+AC_MSG_CHECKING(if $LN_S -f options work)
+
+rm -f conf$$.src conf$$dst
+echo >conf$$.dst
+echo first >conf$$.src
+if $LN_S -f conf$$.src conf$$.dst 2>/dev/null; then
+ cf_prog_ln_sf=yes
+else
+ cf_prog_ln_sf=no
+fi
+rm -f conf$$.dst conf$$src
+AC_MSG_RESULT($cf_prog_ln_sf)
+
+test "$cf_prog_ln_sf" = yes && LN_S="$LN_S -f"
+])dnl
+dnl ---------------------------------------------------------------------------
dnl CF_REMOVE_DEFINE version: 3 updated: 2010/01/09 11:05:50
dnl ----------------
dnl Remove all -U and -D options that refer to the given symbol from a list
@@ -3185,7 +3385,7 @@ $1=`echo "$2" | \
-e 's/-[[UD]]'"$3"'\(=[[^ ]]*\)\?[$]//g'`
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_RPATH_HACK version: 9 updated: 2011/02/13 13:31:33
+dnl CF_RPATH_HACK version: 11 updated: 2013/09/01 13:02:00
dnl -------------
AC_DEFUN([CF_RPATH_HACK],
[
@@ -3202,8 +3402,8 @@ if test -n "$LD_RPATH_OPT" ; then
AC_TRY_LINK([#include <stdio.h>],
[printf("Hello");],
- [cf_rpath_oops=`$cf_ldd_prog conftest$ac_exeext | fgrep ' not found' | sed -e 's% =>.*$%%' |sort -u`
- cf_rpath_list=`$cf_ldd_prog conftest$ac_exeext | fgrep / | sed -e 's%^.*[[ ]]/%/%' -e 's%/[[^/]][[^/]]*$%%' |sort -u`])
+ [cf_rpath_oops=`$cf_ldd_prog conftest$ac_exeext | fgrep ' not found' | sed -e 's% =>.*$%%' |sort | uniq`
+ cf_rpath_list=`$cf_ldd_prog conftest$ac_exeext | fgrep / | sed -e 's%^.*[[ ]]/%/%' -e 's%/[[^/]][[^/]]*$%%' |sort | uniq`])
# If we passed the link-test, but get a "not found" on a given library,
# this could be due to inept reconfiguration of gcc to make it only
@@ -3236,6 +3436,8 @@ AC_TRY_LINK([#include <stdio.h>],
CF_RPATH_HACK_2(LIBS)
CF_VERBOSE(...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS)
+else
+ AC_MSG_RESULT(no)
fi
AC_SUBST(EXTRA_LDFLAGS)
])dnl
@@ -3300,6 +3502,440 @@ CF_VERBOSE(...checked $1 [$]$1)
AC_SUBST(EXTRA_LDFLAGS)
])dnl
dnl ---------------------------------------------------------------------------
+dnl CF_SHARED_OPTS version: 83 updated: 2013/09/21 17:34:53
+dnl --------------
+dnl --------------
+dnl Attempt to determine the appropriate CC/LD options for creating a shared
+dnl library.
+dnl
+dnl Notes:
+dnl a) ${LOCAL_LDFLAGS} is used to link executables that will run within
+dnl the build-tree, i.e., by making use of the libraries that are compiled in
+dnl $rel_builddir/lib We avoid compiling-in a $rel_builddir/lib path for the
+dnl shared library since that can lead to unexpected results at runtime.
+dnl b) ${LOCAL_LDFLAGS2} has the same intention but assumes that the shared
+dnl libraries are compiled in ../../lib
+dnl
+dnl The variable 'cf_cv_do_symlinks' is used to control whether we configure
+dnl to install symbolic links to the rel/abi versions of shared libraries.
+dnl
+dnl The variable 'cf_cv_shlib_version' controls whether we use the rel or abi
+dnl version when making symbolic links.
+dnl
+dnl The variable 'cf_cv_shlib_version_infix' controls whether shared library
+dnl version numbers are infix (ex: libncurses.<ver>.dylib) or postfix
+dnl (ex: libncurses.so.<ver>).
+dnl
+dnl Some loaders leave 'so_locations' lying around. It's nice to clean up.
+AC_DEFUN([CF_SHARED_OPTS],
+[
+ AC_REQUIRE([CF_LD_RPATH_OPT])
+ RM_SHARED_OPTS=
+ LOCAL_LDFLAGS=
+ LOCAL_LDFLAGS2=
+ LD_SHARED_OPTS=
+ INSTALL_LIB="-m 644"
+ : ${rel_builddir:=.}
+
+ cf_cv_do_symlinks=no
+ cf_ld_rpath_opt=
+ test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
+
+ AC_MSG_CHECKING(if release/abi version should be used for shared libs)
+ AC_ARG_WITH(shlib-version,
+ [ --with-shlib-version=X Specify rel or abi version for shared libs],
+ [test -z "$withval" && withval=auto
+ case $withval in #(vi
+ yes) #(vi
+ cf_cv_shlib_version=auto
+ ;;
+ rel|abi|auto|no) #(vi
+ cf_cv_shlib_version=$withval
+ ;;
+ *)
+ AC_MSG_ERROR([option value must be one of: rel, abi, auto or no])
+ ;;
+ esac
+ ],[cf_cv_shlib_version=auto])
+ AC_MSG_RESULT($cf_cv_shlib_version)
+
+ cf_cv_rm_so_locs=no
+ cf_try_cflags=
+
+ # Some less-capable ports of gcc support only -fpic
+ CC_SHARED_OPTS=
+ if test "$GCC" = yes
+ then
+ AC_MSG_CHECKING(which $CC option to use)
+ cf_save_CFLAGS="$CFLAGS"
+ for CC_SHARED_OPTS in -fPIC -fpic ''
+ do
+ CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
+ AC_TRY_COMPILE([#include <stdio.h>],[int x = 1],[break],[])
+ done
+ AC_MSG_RESULT($CC_SHARED_OPTS)
+ CFLAGS="$cf_save_CFLAGS"
+ fi
+
+ cf_cv_shlib_version_infix=no
+
+ case $cf_cv_system_name in #(vi
+ aix4.[3-9]*|aix[[5-7]]*) #(vi
+ if test "$GCC" = yes; then
+ CC_SHARED_OPTS=
+ MK_SHARED_LIB='${CC} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o [$]@'
+ else
+ # CC_SHARED_OPTS='-qpic=large -G'
+ # perhaps "-bM:SRE -bnoentry -bexpall"
+ MK_SHARED_LIB='${CC} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o [$]@'
+ fi
+ ;;
+ beos*) #(vi
+ MK_SHARED_LIB='${CC} ${CFLAGS} -o $[@] -Xlinker -soname=`basename $[@]` -nostart -e 0'
+ ;;
+ cygwin*) #(vi
+ CC_SHARED_OPTS=
+ MK_SHARED_LIB='sh '$rel_builddir'/mk_shared_lib.sh [$]@ [$]{CC} [$]{CFLAGS}'
+ RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
+ cf_cv_shlib_version=cygdll
+ cf_cv_shlib_version_infix=cygdll
+ cat >mk_shared_lib.sh <<-CF_EOF
+ #!/bin/sh
+ SHARED_LIB=\[$]1
+ IMPORT_LIB=\`echo "\[$]1" | sed -e 's/cyg/lib/' -e 's/[[0-9]]*\.dll[$]/.dll.a/'\`
+ shift
+ cat <<-EOF
+ Linking shared library
+ ** SHARED_LIB \[$]SHARED_LIB
+ ** IMPORT_LIB \[$]IMPORT_LIB
+EOF
+ exec \[$]* -shared -Wl,--out-implib=\[$]{IMPORT_LIB} -Wl,--export-all-symbols -o \[$]{SHARED_LIB}
+CF_EOF
+ chmod +x mk_shared_lib.sh
+ ;;
+ msys*) #(vi
+ CC_SHARED_OPTS=
+ MK_SHARED_LIB='sh '$rel_builddir'/mk_shared_lib.sh [$]@ [$]{CC} [$]{CFLAGS}'
+ RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
+ cf_cv_shlib_version=msysdll
+ cf_cv_shlib_version_infix=msysdll
+ cat >mk_shared_lib.sh <<-CF_EOF
+ #!/bin/sh
+ SHARED_LIB=\[$]1
+ IMPORT_LIB=\`echo "\[$]1" | sed -e 's/msys-/lib/' -e 's/[[0-9]]*\.dll[$]/.dll.a/'\`
+ shift
+ cat <<-EOF
+ Linking shared library
+ ** SHARED_LIB \[$]SHARED_LIB
+ ** IMPORT_LIB \[$]IMPORT_LIB
+EOF
+ exec \[$]* -shared -Wl,--out-implib=\[$]{IMPORT_LIB} -Wl,--export-all-symbols -o \[$]{SHARED_LIB}
+CF_EOF
+ chmod +x mk_shared_lib.sh
+ ;;
+ darwin*) #(vi
+ cf_try_cflags="no-cpp-precomp"
+ CC_SHARED_OPTS="-dynamic"
+ MK_SHARED_LIB='${CC} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $[@]` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $[@]'
+ test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
+ cf_cv_shlib_version_infix=yes
+ AC_CACHE_CHECK([if ld -search_paths_first works], cf_cv_ldflags_search_paths_first, [
+ cf_save_LDFLAGS=$LDFLAGS
+ LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
+ AC_TRY_LINK(, [int i;], cf_cv_ldflags_search_paths_first=yes, cf_cv_ldflags_search_paths_first=no)
+ LDFLAGS=$cf_save_LDFLAGS])
+ if test $cf_cv_ldflags_search_paths_first = yes; then
+ LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
+ fi
+ ;;
+ hpux[[7-8]]*) #(vi
+ # HP-UX 8.07 ld lacks "+b" option used for libdir search-list
+ if test "$GCC" != yes; then
+ CC_SHARED_OPTS='+Z'
+ fi
+ MK_SHARED_LIB='${LD} -b -o $[@]'
+ INSTALL_LIB="-m 555"
+ ;;
+ hpux*) #(vi
+ # (tested with gcc 2.7.2 -- I don't have c89)
+ if test "$GCC" = yes; then
+ LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
+ else
+ CC_SHARED_OPTS='+Z'
+ LD_SHARED_OPTS='-Wl,+b,${libdir}'
+ fi
+ MK_SHARED_LIB='${LD} +b ${libdir} -b -o $[@]'
+ # HP-UX shared libraries must be executable, and should be
+ # readonly to exploit a quirk in the memory manager.
+ INSTALL_LIB="-m 555"
+ ;;
+ interix*)
+ test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
+ if test "$cf_cv_shlib_version" = rel; then
+ cf_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
+ else
+ cf_shared_soname='`basename $@`'
+ fi
+ CC_SHARED_OPTS=
+ MK_SHARED_LIB='${CC} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_soname' -o $@'
+ ;;
+ irix*) #(vi
+ if test "$cf_cv_enable_rpath" = yes ; then
+ EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
+ fi
+ # tested with IRIX 5.2 and 'cc'.
+ if test "$GCC" != yes; then
+ CC_SHARED_OPTS='-KPIC'
+ MK_SHARED_LIB='${CC} -shared -rdata_shared -soname `basename $[@]` -o $[@]'
+ else
+ MK_SHARED_LIB='${CC} -shared -Wl,-soname,`basename $[@]` -o $[@]'
+ fi
+ cf_cv_rm_so_locs=yes
+ ;;
+ linux*|gnu*|k*bsd*-gnu) #(vi
+ if test "$DFT_LWR_MODEL" = "shared" ; then
+ LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
+ LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
+ fi
+ if test "$cf_cv_enable_rpath" = yes ; then
+ EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
+ fi
+ CF_SHARED_SONAME
+ MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $[@]'
+ ;;
+ mingw*) #(vi
+ cf_cv_shlib_version=mingw
+ cf_cv_shlib_version_infix=mingw
+ if test "$DFT_LWR_MODEL" = "shared" ; then
+ LOCAL_LDFLAGS="-Wl,--enable-auto-import"
+ LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
+ EXTRA_LDFLAGS="-Wl,--enable-auto-import $EXTRA_LDFLAGS"
+ fi
+ CC_SHARED_OPTS=
+ MK_SHARED_LIB='sh '$rel_builddir'/mk_shared_lib.sh [$]@ [$]{CC} [$]{CFLAGS}'
+ RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
+ cat >mk_shared_lib.sh <<-CF_EOF
+ #!/bin/sh
+ SHARED_LIB=\[$]1
+ IMPORT_LIB=\`echo "\[$]1" | sed -e 's/[[0-9]]*\.dll[$]/.dll.a/'\`
+ shift
+ cat <<-EOF
+ Linking shared library
+ ** SHARED_LIB \[$]SHARED_LIB
+ ** IMPORT_LIB \[$]IMPORT_LIB
+EOF
+ exec \[$]* -shared -Wl,--enable-auto-import,--out-implib=\[$]{IMPORT_LIB} -Wl,--export-all-symbols -o \[$]{SHARED_LIB}
+CF_EOF
+ chmod +x mk_shared_lib.sh
+ ;;
+ openbsd[[2-9]].*|mirbsd*) #(vi
+ if test "$DFT_LWR_MODEL" = "shared" ; then
+ LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
+ LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
+ fi
+ if test "$cf_cv_enable_rpath" = yes ; then
+ EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
+ fi
+ CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
+ CF_SHARED_SONAME
+ MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $[@]'
+ ;;
+ nto-qnx*|openbsd*|freebsd[[12]].*) #(vi
+ CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
+ MK_SHARED_LIB='${LD} -Bshareable -o $[@]'
+ test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
+ ;;
+ dragonfly*|freebsd*) #(vi
+ CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
+ if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
+ LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
+ LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${RPATH_LIST} $LOCAL_LDFLAGS"
+ EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
+ fi
+ CF_SHARED_SONAME
+ MK_SHARED_LIB='${LD} -shared -Bshareable -soname=`basename $[@]` -o $[@]'
+ ;;
+ netbsd*) #(vi
+ CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
+ if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
+ LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
+ LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
+ EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
+ if test "$cf_cv_shlib_version" = auto; then
+ if test -f /usr/libexec/ld.elf_so; then
+ cf_cv_shlib_version=abi
+ else
+ cf_cv_shlib_version=rel
+ fi
+ fi
+ CF_SHARED_SONAME
+ MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $[@]'
+ else
+ MK_SHARED_LIB='${CC} -Wl,-shared -Wl,-Bshareable -o $[@]'
+ fi
+ ;;
+ osf*|mls+*) #(vi
+ # tested with OSF/1 V3.2 and 'cc'
+ # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
+ # link with shared libs).
+ MK_SHARED_LIB='${LD} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $[@]`'
+ case $host_os in #(vi
+ osf4*)
+ MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
+ ;;
+ esac
+ MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $[@]'
+ if test "$DFT_LWR_MODEL" = "shared" ; then
+ LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
+ LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
+ fi
+ cf_cv_rm_so_locs=yes
+ ;;
+ sco3.2v5*) # (also uw2* and UW7: hops 13-Apr-98
+ # tested with osr5.0.5
+ if test "$GCC" != yes; then
+ CC_SHARED_OPTS='-belf -KPIC'
+ fi
+ MK_SHARED_LIB='${LD} -dy -G -h `basename $[@] .${REL_VERSION}`.${ABI_VERSION} -o [$]@'
+ if test "$cf_cv_enable_rpath" = yes ; then
+ # only way is to set LD_RUN_PATH but no switch for it
+ RUN_PATH=$libdir
+ fi
+ test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
+ LINK_PROGS='LD_RUN_PATH=${libdir}'
+ LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
+ ;;
+ sunos4*) #(vi
+ # tested with SunOS 4.1.1 and gcc 2.7.0
+ if test "$GCC" != yes; then
+ CC_SHARED_OPTS='-KPIC'
+ fi
+ MK_SHARED_LIB='${LD} -assert pure-text -o $[@]'
+ test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
+ ;;
+ solaris2*) #(vi
+ # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
+ # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
+ if test "$DFT_LWR_MODEL" = "shared" ; then
+ LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
+ LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
+ fi
+ if test "$cf_cv_enable_rpath" = yes ; then
+ EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
+ fi
+ CF_SHARED_SONAME
+ if test "$GCC" != yes; then
+ cf_save_CFLAGS="$CFLAGS"
+ for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
+ do
+ CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
+ AC_TRY_COMPILE([#include <stdio.h>],[printf("Hello\n");],[break])
+ done
+ CFLAGS="$cf_save_CFLAGS"
+ CC_SHARED_OPTS=$cf_shared_opts
+ MK_SHARED_LIB='${CC} -dy -G -h '$cf_cv_shared_soname' -o $[@]'
+ else
+ MK_SHARED_LIB='${CC} -shared -dy -G -h '$cf_cv_shared_soname' -o $[@]'
+ fi
+ ;;
+ sysv5uw7*|unix_sv*) #(vi
+ # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
+ if test "$GCC" != yes; then
+ CC_SHARED_OPTS='-KPIC'
+ fi
+ MK_SHARED_LIB='${LD} -d y -G -o [$]@'
+ ;;
+ *)
+ CC_SHARED_OPTS='unknown'
+ MK_SHARED_LIB='echo unknown'
+ ;;
+ esac
+
+ # This works if the last tokens in $MK_SHARED_LIB are the -o target.
+ case "$cf_cv_shlib_version" in #(vi
+ rel|abi)
+ case "$MK_SHARED_LIB" in #(vi
+ *'-o $[@]') #(vi
+ test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
+ ;;
+ *)
+ AC_MSG_WARN(ignored --with-shlib-version)
+ ;;
+ esac
+ ;;
+ esac
+
+ if test -n "$cf_try_cflags"
+ then
+cat > conftest.$ac_ext <<EOF
+#line __oline__ "${as_me:-configure}"
+#include <stdio.h>
+int main(int argc, char *argv[[]])
+{
+ printf("hello\n");
+ return (argv[[argc-1]] == 0) ;
+}
+EOF
+ cf_save_CFLAGS="$CFLAGS"
+ for cf_opt in $cf_try_cflags
+ do
+ CFLAGS="$cf_save_CFLAGS -$cf_opt"
+ AC_MSG_CHECKING(if CFLAGS option -$cf_opt works)
+ if AC_TRY_EVAL(ac_compile); then
+ AC_MSG_RESULT(yes)
+ cf_save_CFLAGS="$CFLAGS"
+ else
+ AC_MSG_RESULT(no)
+ fi
+ done
+ CFLAGS="$cf_save_CFLAGS"
+ fi
+
+
+ # RPATH_LIST is a colon-separated list of directories
+ test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${RPATH_LIST}"
+ test -z "$RPATH_LIST" && RPATH_LIST="\${libdir}"
+
+ test $cf_cv_rm_so_locs = yes && RM_SHARED_OPTS="$RM_SHARED_OPTS so_locations"
+
+ CF_VERBOSE(CC_SHARED_OPTS: $CC_SHARED_OPTS)
+ CF_VERBOSE(MK_SHARED_LIB: $MK_SHARED_LIB)
+
+ AC_SUBST(CC_SHARED_OPTS)
+ AC_SUBST(LD_RPATH_OPT)
+ AC_SUBST(LD_SHARED_OPTS)
+ AC_SUBST(MK_SHARED_LIB)
+ AC_SUBST(RM_SHARED_OPTS)
+
+ AC_SUBST(LINK_PROGS)
+ AC_SUBST(LINK_TESTS)
+
+ AC_SUBST(EXTRA_LDFLAGS)
+ AC_SUBST(LOCAL_LDFLAGS)
+ AC_SUBST(LOCAL_LDFLAGS2)
+
+ AC_SUBST(INSTALL_LIB)
+ AC_SUBST(RPATH_LIST)
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_SHARED_SONAME version: 3 updated: 2008/09/08 18:34:43
+dnl ----------------
+dnl utility macro for CF_SHARED_OPTS, constructs "$cf_cv_shared_soname" for
+dnl substitution into MK_SHARED_LIB string for the "-soname" (or similar)
+dnl option.
+dnl
+dnl $1 is the default that should be used for "$cf_cv_shlib_version".
+dnl If missing, use "rel".
+define([CF_SHARED_SONAME],
+[
+ test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=ifelse($1,,rel,$1)
+ if test "$cf_cv_shlib_version" = rel; then
+ cf_cv_shared_soname='`basename $[@] .${REL_VERSION}`.${ABI_VERSION}'
+ else
+ cf_cv_shared_soname='`basename $[@]`'
+ fi
+])
+dnl ---------------------------------------------------------------------------
dnl CF_SUBDIR_PATH version: 6 updated: 2010/04/21 06:20:50
dnl --------------
dnl Construct a search-list for a nonstandard header/lib-file
@@ -3492,7 +4128,7 @@ AC_DEFUN([CF_VERBOSE],
CF_MSG_LOG([$1])
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_VERSION_INFO version: 5 updated: 2012/10/06 08:57:51
+dnl CF_VERSION_INFO version: 6 updated: 2013/06/16 10:25:53
dnl ---------------
dnl Define several useful symbols derived from the VERSION file. A separate
dnl file is preferred to embedding the version numbers in various scripts.
@@ -3557,7 +4193,7 @@ else
fi
# show the actual data that we have for versions:
-CF_VERBOSE(VERSION $VERSION)
+CF_VERBOSE(ABI VERSION $VERSION)
CF_VERBOSE(VERSION_MAJOR $VERSION_MAJOR)
CF_VERBOSE(VERSION_MINOR $VERSION_MINOR)
CF_VERBOSE(VERSION_PATCH $VERSION_PATCH)
@@ -3611,6 +4247,26 @@ fi
fi
])dnl
dnl ---------------------------------------------------------------------------
+dnl CF_WITH_ABI_VERSION version: 1 updated: 2003/09/20 18:12:49
+dnl -------------------
+dnl Allow library's ABI to be overridden. Generally this happens when a
+dnl packager has incremented the ABI past that used in the original package,
+dnl and wishes to keep doing this.
+dnl
+dnl $1 is the package name, if any, to derive a corresponding {package}_ABI
+dnl symbol.
+AC_DEFUN([CF_WITH_ABI_VERSION],[
+test -z "$cf_cv_abi_version" && cf_cv_abi_version=0
+AC_ARG_WITH(abi-version,
+[ --with-abi-version=XXX override derived ABI version],
+[AC_MSG_WARN(overriding ABI version $cf_cv_abi_version to $withval)
+ cf_cv_abi_version=$withval])
+ CF_NUMBER_SYNTAX($cf_cv_abi_version,ABI version)
+ifelse($1,,,[
+$1_ABI=$cf_cv_abi_version
+])
+])dnl
+dnl ---------------------------------------------------------------------------
dnl CF_WITH_CURSES_DIR version: 3 updated: 2010/11/20 17:02:38
dnl ------------------
dnl Wrapper for AC_ARG_WITH to specify directory under which to look for curses
@@ -3665,7 +4321,7 @@ if test "$with_dmalloc" = yes ; then
fi
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_WITH_LIBTOOL version: 28 updated: 2011/07/02 15:40:32
+dnl CF_WITH_LIBTOOL version: 30 updated: 2013/09/07 13:54:05
dnl ---------------
dnl Provide a configure option to incorporate libtool. Define several useful
dnl symbols for the makefile rules.
@@ -3735,7 +4391,14 @@ ifdef([AC_PROG_LIBTOOL],[
CF_PATH_SYNTAX(with_libtool)
LIBTOOL=$with_libtool
else
- AC_PATH_PROG(LIBTOOL,libtool)
+ AC_CHECK_TOOLS(LIBTOOL,[libtool glibtool],none)
+ CF_LIBTOOL_VERSION
+ if test -z "$cf_cv_libtool_version" && test "$LIBTOOL" = libtool
+ then
+ CF_FORGET_TOOL(LIBTOOL)
+ AC_CHECK_TOOLS(LIBTOOL,[glibtool],none)
+ CF_LIBTOOL_VERSION
+ fi
fi
if test -z "$LIBTOOL" ; then
AC_MSG_ERROR(Cannot find libtool)
@@ -3751,22 +4414,12 @@ ifdef([AC_PROG_LIBTOOL],[
LIB_UNINSTALL='${LIBTOOL} --mode=uninstall'
LIB_PREP=:
- # Show the version of libtool
- AC_MSG_CHECKING(version of libtool)
-
- # Save the version in a cache variable - this is not entirely a good
- # thing, but the version string from libtool is very ugly, and for
- # bug reports it might be useful to have the original string. "("
- cf_cv_libtool_version=`$LIBTOOL --version 2>&1 | sed -e '/^$/d' |sed -e '2,$d' -e 's/([[^)]]*)//g' -e 's/^[[^1-9]]*//' -e 's/[[^0-9.]].*//'`
- AC_MSG_RESULT($cf_cv_libtool_version)
- if test -z "$cf_cv_libtool_version" ; then
- AC_MSG_ERROR(This is not GNU libtool)
- fi
+ CF_CHECK_LIBTOOL_VERSION
# special hack to add -no-undefined (which libtool should do for itself)
LT_UNDEF=
case "$cf_cv_system_name" in #(vi
- cygwin*|mingw32*|uwin*|aix[[4-7]]) #(vi
+ cygwin*|msys*|mingw32*|uwin*|aix[[4-7]]) #(vi
LT_UNDEF=-no-undefined
;;
esac
@@ -3865,6 +4518,108 @@ CF_NO_LEAKS_OPTION(purify,
AC_SUBST(LINK_PREFIX)
])dnl
dnl ---------------------------------------------------------------------------
+dnl CF_WITH_REL_VERSION version: 1 updated: 2003/09/20 18:12:49
+dnl -------------------
+dnl Allow library's release-version to be overridden. Generally this happens when a
+dnl packager has incremented the release-version past that used in the original package,
+dnl and wishes to keep doing this.
+dnl
+dnl $1 is the package name, if any, to derive corresponding {package}_MAJOR
+dnl and {package}_MINOR symbols
+dnl symbol.
+AC_DEFUN([CF_WITH_REL_VERSION],[
+test -z "$cf_cv_rel_version" && cf_cv_rel_version=0.0
+AC_ARG_WITH(rel-version,
+[ --with-rel-version=XXX override derived release version],
+[AC_MSG_WARN(overriding release version $cf_cv_rel_version to $withval)
+ cf_cv_rel_version=$withval])
+ifelse($1,,[
+ CF_NUMBER_SYNTAX($cf_cv_rel_version,Release version)
+],[
+ $1_MAJOR=`echo "$cf_cv_rel_version" | sed -e 's/\..*//'`
+ $1_MINOR=`echo "$cf_cv_rel_version" | sed -e 's/^[[^.]]*//' -e 's/^\.//' -e 's/\..*//'`
+ CF_NUMBER_SYNTAX([$]$1_MAJOR,Release major-version)
+ CF_NUMBER_SYNTAX([$]$1_MINOR,Release minor-version)
+])
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_WITH_SHARED_OR_LIBTOOL version: 5 updated: 2013/09/02 09:17:44
+dnl -------------------------
+dnl Provide shared libraries using either autoconf macros (--with-shared) or
+dnl using the external libtool script (--with-libtool).
+dnl
+dnl $1 = program name (all caps preferred)
+dnl $1 = release version
+dnl $2 = ABI version
+define([CF_WITH_SHARED_OR_LIBTOOL],[
+
+REL_VERSION=$2
+ABI_VERSION=$3
+cf_cv_rel_version=$REL_VERSION
+AC_SUBST(ABI_VERSION)
+AC_SUBST(REL_VERSION)
+
+CF_WITH_REL_VERSION($1)
+CF_WITH_ABI_VERSION
+
+LIB_MODEL=static
+DFT_LWR_MODEL=$LIB_MODEL
+LIBTOOL_MAKE="#"
+
+# use to comment-out makefile lines
+MAKE_NORMAL=
+MAKE_STATIC=
+MAKE_SHARED="#"
+
+CF_WITH_LIBTOOL
+
+LIB_CREATE="$LIB_CREATE \[$]@"
+
+if test "$with_libtool" = "yes" ; then
+ OBJEXT="lo"
+ LIB_MODEL=libtool
+ DFT_LWR_MODEL=$LIB_MODEL
+ LIBTOOL_MAKE=
+ CF_WITH_LIBTOOL_OPTS
+ MAKE_NORMAL="#"
+ MAKE_STATIC="#"
+ MAKE_SHARED=
+else
+ AC_MSG_CHECKING(if you want to build shared libraries)
+ AC_ARG_WITH(shared,
+ [ --with-shared generate shared-libraries],
+ [with_shared=$withval],
+ [with_shared=no])
+ AC_MSG_RESULT($with_shared)
+ if test "$with_shared" = "yes" ; then
+ LIB_MODEL=shared
+ DFT_LWR_MODEL=$LIB_MODEL
+ CF_SHARED_OPTS
+ LIB_PREP=:
+ LIB_CREATE="[$]MK_SHARED_LIB"
+ CFLAGS="$CFLAGS $CC_SHARED_OPTS"
+ MAKE_NORMAL="#"
+ MAKE_STATIC="#"
+ MAKE_SHARED=
+ fi
+fi
+
+LIB_SUFFIX=
+CF_LIB_SUFFIX($LIB_MODEL, DFT_LIB_SUFFIX, DFT_DEP_SUFFIX)
+LIB_SUFFIX=$DFT_LIB_SUFFIX
+
+AC_SUBST(DFT_LWR_MODEL)
+AC_SUBST(DFT_LIB_SUFFIX)
+AC_SUBST(DFT_DEP_SUFFIX)
+AC_SUBST(LIB_MODEL)
+
+AC_SUBST(LIBTOOL_MAKE)
+
+AC_SUBST(MAKE_NORMAL)
+AC_SUBST(MAKE_SHARED)
+AC_SUBST(MAKE_STATIC)
+])dnl
+dnl ---------------------------------------------------------------------------
dnl CF_WITH_VALGRIND version: 1 updated: 2006/12/14 18:00:21
dnl ----------------
AC_DEFUN([CF_WITH_VALGRIND],[
@@ -3935,7 +4690,7 @@ AC_TRY_LINK([
test $cf_cv_need_xopen_extension = yes && CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_XOPEN_SOURCE version: 42 updated: 2012/01/07 08:26:49
+dnl CF_XOPEN_SOURCE version: 45 updated: 2013/09/07 14:06:25
dnl ---------------
dnl Try to get _XOPEN_SOURCE defined properly that we can use POSIX functions,
dnl or adapt to the vendor's definitions to get equivalent functionality,
@@ -3945,6 +4700,7 @@ dnl Parameters:
dnl $1 is the nominal value for _XOPEN_SOURCE
dnl $2 is the nominal value for _POSIX_C_SOURCE
AC_DEFUN([CF_XOPEN_SOURCE],[
+AC_REQUIRE([AC_CANONICAL_HOST])
cf_XOPEN_SOURCE=ifelse([$1],,500,[$1])
cf_POSIX_C_SOURCE=ifelse([$2],,199506L,[$2])
@@ -3954,7 +4710,7 @@ case $host_os in #(vi
aix[[4-7]]*) #(vi
cf_xopen_source="-D_ALL_SOURCE"
;;
-cygwin) #(vi
+cygwin|msys) #(vi
cf_XOPEN_SOURCE=600
;;
darwin[[0-8]].*) #(vi
@@ -4053,6 +4809,127 @@ make an error
fi
])
dnl ---------------------------------------------------------------------------
+dnl CF__ADD_SHLIB_RULES version: 4 updated: 2013/07/22 18:49:24
+dnl -------------------
+dnl Append rules for creating, installing, uninstalling and cleaning library.
+dnl In particular, this is needed for shared libraries since there are symbolic
+dnl links which depend on configuration choices.
+dnl
+dnl The logic is controlled by these cache variables:
+dnl $cf_cv_do_symlinks
+dnl $cf_cv_shlib_version
+dnl
+dnl The macro uses variables set by CF__DEFINE_SHLIB_VARS
+dnl
+dnl $1 = makefile to append to
+dnl $2 = model (static, shared, libtool)
+dnl $3 = objects (dependencies)
+dnl $4 = additional libraries needed to link the shared library
+define([CF__ADD_SHLIB_RULES],[
+
+CF__DEFINE_LIB_TARGET
+
+case x$2 in
+xlibtool|xshared) #(vi
+ cf_libdeps="ifelse($4,,,[$4])"
+ ;;
+x*)
+ cf_libdeps=
+ ;;
+esac
+
+cat >>$1 <<CF_EOF
+
+# generated by CF__ADD_SHLIB_RULES
+# libmodel: $2
+# symlinks: $cf_cv_do_symlinks
+# shlibver: $cf_cv_shlib_version
+
+CF_EOF
+
+cat >>$1 <<CF_EOF
+$cf_libname :: \\
+CF_EOF
+
+cat >>$1 <<CF_EOF
+ $3
+ @echo linking \[$]@
+ \$(LIBTOOL_CREATE) $3 $cf_libdeps
+CF_EOF
+
+if test "x$cf_cv_do_symlinks" = xyes
+then
+cat >>$1 <<CF_EOF
+ \$(LN_S) $cf_libname $cf_liblink
+ \$(LN_S) $cf_liblink $cf_libroot
+CF_EOF
+fi
+
+cat >>$1 <<CF_EOF
+
+install \\
+install.libs :: \$(DESTDIR)\$(libdir)/$cf_libname
+
+\$(DESTDIR)\$(libdir)/$cf_libname :: \\
+ \$(DESTDIR)\$(libdir) \\
+ $3
+ @echo linking \[$]@
+ \$(LIBTOOL_CREATE) $3 $cf_libdeps
+CF_EOF
+
+if test "x$cf_cv_do_symlinks" = xyes
+then
+cat >>$1 <<CF_EOF
+ cd \$(DESTDIR)\$(libdir) && (\$(LN_S) $cf_libname $cf_liblink; \$(LN_S) $cf_liblink $cf_libroot; )
+CF_EOF
+fi
+
+if test x$2 = xshared
+then
+cat >>$1 <<CF_EOF
+ - test -z "\$(DESTDIR)" && /sbin/ldconfig
+CF_EOF
+fi
+
+cat >>$1 <<CF_EOF
+
+uninstall \\
+uninstall.libs ::
+ @echo uninstalling \$(DESTDIR)\$(libdir)/$cf_libname
+CF_EOF
+
+if test "x$cf_cv_do_symlinks" = xyes
+then
+cat >>$1 <<CF_EOF
+ -rm -f \$(DESTDIR)\$(libdir)/$cf_libroot
+ -rm -f \$(DESTDIR)\$(libdir)/$cf_liblink
+CF_EOF
+fi
+
+cat >>$1 <<CF_EOF
+ -rm -f \$(DESTDIR)\$(libdir)/$cf_libname
+
+clean \\
+clean.libs ::
+CF_EOF
+
+if test "x$cf_cv_do_symlinks" = xyes
+then
+cat >>$1 <<CF_EOF
+ -rm -f $cf_libroot
+ -rm -f $cf_liblink
+CF_EOF
+fi
+
+cat >>$1 <<CF_EOF
+ -rm -f $cf_libname
+
+mostlyclean::
+ -rm -f $3
+# end generated by CF__ADD_SHLIB_RULES
+CF_EOF
+])dnl
+dnl ---------------------------------------------------------------------------
dnl CF__CURSES_HEAD version: 2 updated: 2010/10/23 15:54:49
dnl ---------------
dnl Define a reusable chunk which includes <curses.h> and <term.h> when they
@@ -4073,6 +4950,72 @@ char * XCursesProgramName = "test";
#endif
])
dnl ---------------------------------------------------------------------------
+dnl CF__CURSES_HEAD version: 2 updated: 2010/10/23 15:54:49
+dnl ---------------
+dnl Define a reusable chunk which includes <curses.h> and <term.h> when they
+dnl are both available.
+define([CF__CURSES_HEAD],[
+#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>
+#elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
+#include <ncurses/term.h>
+#elif defined(HAVE_TERM_H)
+#include <term.h>
+#endif
+#endif
+])
+dnl ---------------------------------------------------------------------------
+dnl CF__DEFINE_LIB_TARGET version: 1 updated: 2013/07/22 18:27:50
+dnl ---------------------
+define([CF__DEFINE_LIB_TARGET],[
+cf_libname=\${LIB_BASENAME}
+cf_liblink=$cf_libname
+cf_libroot=$cf_libname
+
+if test "x$cf_cv_do_symlinks" = xyes
+then
+ case "x$cf_cv_shlib_version" in #(vi
+ xrel) #(vi
+ cf_liblink="\${LIB_ABI_NAME}"
+ cf_libname="\${LIB_REL_NAME}"
+ ;;
+ xabi)
+ cf_liblink="\${LIB_REL_NAME}"
+ cf_libname="\${LIB_ABI_NAME}"
+ ;;
+ esac
+fi
+LIB_TARGET=$cf_libname
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF__DEFINE_SHLIB_VARS version: 2 updated: 2013/07/27 17:38:32
+dnl ---------------------
+dnl Substitute makefile variables useful for CF__ADD_SHLIB_RULES.
+dnl
+dnl The substitution requires these variables:
+dnl LIB_PREFI - "lib"
+dnl LIB_ROOTNAME - "foo"
+dnl LIB_SUFFIX - ".so"
+dnl REL_VERSION - "5.0"
+dnl ABI_VERSION - "4.2.4"
+define([CF__DEFINE_SHLIB_VARS],[
+CF__DEFINE_LIB_TARGET
+SET_SHLIB_VARS="# begin CF__DEFINE_SHLIB_VARS\\
+LIB_BASENAME = ${LIB_PREFIX}\${LIB_ROOTNAME}\${LIB_SUFFIX}\\
+LIB_REL_NAME = \${LIB_BASENAME}.\${REL_VERSION}\\
+LIB_ABI_NAME = \${LIB_BASENAME}.\${ABI_VERSION}\\
+LIB_TARGET = $LIB_TARGET\\
+RM_SHARED_OPTS = $RM_SHARED_OPTS\\
+# end CF__DEFINE_SHLIB_VARS"
+AC_SUBST(SET_SHLIB_VARS)
+AC_SUBST(LIB_TARGET)
+])dnl
+dnl ---------------------------------------------------------------------------
dnl CF__ICONV_BODY version: 2 updated: 2007/07/26 17:35:47
dnl --------------
dnl Test-code needed for iconv compile-checks
@@ -4090,6 +5033,22 @@ define([CF__ICONV_HEAD],[
#include <iconv.h>]
)dnl
dnl ---------------------------------------------------------------------------
+dnl CF__INIT_SHLIB_RULES version: 2 updated: 2013/07/27 17:38:32
+dnl --------------------
+dnl The third parameter to AC_OUTPUT, used to pass variables needed for
+dnl CF__ADD_SHLIB_RULES.
+define([CF__INIT_SHLIB_RULES],[
+ABI_VERSION="$ABI_VERSION"
+REL_VERSION="$REL_VERSION"
+LIB_MODEL="$LIB_MODEL"
+LIB_PREFIX="$LIB_PREFIX"
+LIB_ROOTNAME="$LIB_ROOTNAME"
+DFT_DEP_SUFFIX="$DFT_DEP_SUFFIX"
+RM_SHARED_OPTS="$RM_SHARED_OPTS"
+cf_cv_do_symlinks="$cf_cv_do_symlinks"
+cf_cv_shlib_version="$cf_cv_shlib_version"
+])
+dnl ---------------------------------------------------------------------------
dnl CF__INTL_BODY version: 1 updated: 2007/07/26 17:35:47
dnl -------------
dnl Test-code needed for libintl compile-checks
View
7 contrib/dialog/arrows.c
@@ -1,5 +1,5 @@
/*
- * $Id: arrows.c,v 1.50 2013/05/24 00:05:21 tom Exp $
+ * $Id: arrows.c,v 1.51 2013/09/02 15:10:09 tom Exp $
*
* arrows.c -- draw arrows to indicate end-of-range for lists
*
@@ -74,9 +74,10 @@ dlg_draw_helpline(WINDOW *win, bool decorations)
int bottom;
if (dialog_vars.help_line != 0
+ && dialog_vars.help_line[0] != 0
&& (bottom = getmaxy(win) - 1) > 0) {
chtype attr = A_NORMAL;
- const int *cols = dlg_index_columns(dialog_vars.help_line);
+ int cols = dlg_count_columns(dialog_vars.help_line);
int other = decorations ? (ON_LEFT + ON_RIGHT) : 0;
int avail = (getmaxx(win) - other - 2);
int limit = dlg_count_real_columns(dialog_vars.help_line) + 2;
@@ -86,7 +87,7 @@ dlg_draw_helpline(WINDOW *win, bool decorations)
other = decorations ? ON_LEFT : 0;
(void) wmove(win, bottom, other + (avail - limit) / 2);
waddch(win, '[');
- dlg_print_text(win, dialog_vars.help_line, cols[limit], &attr);
+ dlg_print_text(win, dialog_vars.help_line, cols, &attr);
waddch(win, ']');
wmove(win, cur_y, cur_x);
}
View
32 contrib/dialog/buildlist.c
@@ -1,5 +1,5 @@
/*
- * $Id: buildlist.c,v 1.57 2013/03/17 13:46:30 tom Exp $
+ * $Id: buildlist.c,v 1.59 2013/09/02 17:01:02 tom Exp $
*
* buildlist.c -- implements the buildlist dialog
*
@@ -1027,6 +1027,7 @@ dialog_buildlist(const char *title,
bool separate_output = dialog_vars.separate_output;
bool show_status = FALSE;
int current = 0;
+ char *help_result;
listitems = dlg_calloc(DIALOG_LISTITEM, (size_t) item_no + 1);
assert_ptr(listitems, "dialog_buildlist");
@@ -1060,31 +1061,16 @@ dialog_buildlist(const char *title,
show_status = TRUE;
break;
case DLG_EXIT_HELP:
- dlg_add_result("HELP ");
- show_status = dialog_vars.help_status;
- if (USE_ITEM_HELP(listitems[current].help)) {
- if (show_status) {
- if (separate_output) {
- dlg_add_string(listitems[current].help);
- dlg_add_separator();
- } else {
- dlg_add_quoted(listitems[current].help);
- }
+ dlg_add_help_listitem(&result, &help_result, &listitems[current]);
+ if ((show_status = dialog_vars.help_status)) {
+ if (separate_output) {
+ dlg_add_string(help_result);
+ dlg_add_separator();
} else {
- dlg_add_string(listitems[current].help);
+ dlg_add_quoted(help_result);
}
- result = DLG_EXIT_ITEM_HELP;
} else {
- if (show_status) {
- if (separate_output) {
- dlg_add_string(listitems[current].name);
- dlg_add_separator();
- } else {
- dlg_add_quoted(listitems[current].name);
- }
- } else {
- dlg_add_string(listitems[current].name);
- }
+ dlg_add_string(help_result);
}
break;
}
View
32 contrib/dialog/checklist.c
@@ -1,5 +1,5 @@
/*
- * $Id: checklist.c,v 1.151 2013/03/23 10:51:48 tom Exp $
+ * $Id: checklist.c,v 1.153 2013/09/02 17:01:02 tom Exp $
*
* checklist.c -- implements the checklist box
*
@@ -607,6 +607,7 @@ dialog_checklist(const char *title,
&& (dialog_vars.separate_output));
bool show_status = FALSE;
int current = 0;
+ char *help_result;
listitems = dlg_calloc(DIALOG_LISTITEM, (size_t) item_no + 1);
assert_ptr(listitems, "dialog_checklist");
@@ -640,31 +641,16 @@ dialog_checklist(const char *title,
show_status = TRUE;
break;
case DLG_EXIT_HELP:
- dlg_add_result("HELP ");
- show_status = dialog_vars.help_status;
- if (USE_ITEM_HELP(listitems[current].help)) {
- if (show_status) {
- if (separate_output) {
- dlg_add_string(listitems[current].help);
- dlg_add_separator();
- } else {
- dlg_add_quoted(listitems[current].help);
- }
+ dlg_add_help_listitem(&result, &help_result, &listitems[current]);
+ if ((show_status = dialog_vars.help_status)) {
+ if (separate_output) {
+ dlg_add_string(help_result);
+ dlg_add_separator();
} else {
- dlg_add_string(listitems[current].help);
+ dlg_add_quoted(help_result);
}
- result = DLG_EXIT_ITEM_HELP;
} else {
- if (show_status) {
- if (separate_output) {
- dlg_add_string(listitems[current].name);
- dlg_add_separator();
- } else {
- dlg_add_quoted(listitems[current].name);
- }
- } else {
- dlg_add_string(listitems[current].name);
- }
+ dlg_add_string(help_result);
}
break;
}
View
167 contrib/dialog/config.guess
@@ -1,14 +1,12 @@
#! /bin/sh
# Attempt to guess a canonical system name.
-# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
-# 2011, 2012 Free Software Foundation, Inc.
+# Copyright 1992-2013 Free Software Foundation, Inc.
-timestamp='2012-09-25'
+timestamp='2013-06-10'
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
+# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
@@ -22,19 +20,17 @@ timestamp='2012-09-25'
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-
-# Originally written by Per Bothner. Please send patches (context
-# diff format) to <config-patches@gnu.org> and include a ChangeLog
-# entry.
+# the same distribution terms that you use for the rest of that
+# program. This Exception is an additional permission under section 7
+# of the GNU General Public License, version 3 ("GPLv3").
#
-# This script attempts to guess a canonical system name similar to
-# config.sub. If it succeeds, it prints the system name on stdout, and
-# exits with 0. Otherwise, it exits with 1.
+# Originally written by Per Bothner.
#
# You can get the latest version of this script from:
# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
+#
+# Please send patches with a ChangeLog entry to config-patches@gnu.org.
+
me=`echo "$0" | sed -e 's,.*/,,'`
@@ -54,9 +50,7 @@ version="\
GNU config.guess ($timestamp)
Originally written by Per Bothner.
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
-Free Software Foundation, Inc.
+Copyright 1992-2013 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -138,6 +132,27 @@ UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
+case "${UNAME_SYSTEM}" in
+Linux|GNU|GNU/*)
+ # If the system lacks a compiler, then just pick glibc.
+ # We could probably try harder.
+ LIBC=gnu
+
+ eval $set_cc_for_build
+ cat <<-EOF > $dummy.c
+ #include <features.h>
+ #if defined(__UCLIBC__)
+ LIBC=uclibc
+ #elif defined(__dietlibc__)
+ LIBC=dietlibc
+ #else
+ LIBC=gnu
+ #endif
+ EOF
+ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
+ ;;
+esac
+
# Note: order is significant - the case branches are not exclusive.
case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
@@ -859,21 +874,21 @@ EOF
exit ;;
*:GNU:*:*)
# the GNU system
- echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
+ echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
exit ;;
*:GNU/*:*:*)
# other systems with GNU libc and userland
- echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
+ echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC}
exit ;;
i*86:Minix:*:*)
echo ${UNAME_MACHINE}-pc-minix
exit ;;
aarch64:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
aarch64_be:Linux:*:*)
UNAME_MACHINE=aarch64_be
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
alpha:Linux:*:*)
case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
@@ -886,59 +901,54 @@ EOF
EV68*) UNAME_MACHINE=alphaev68 ;;
esac
objdump --private-headers /bin/sh | grep -q ld.so.1
- if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
- echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
+ if test "$?" = 0 ; then LIBC="gnulibc1" ; fi
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ arc:Linux:*:* | arceb:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
arm*:Linux:*:*)
eval $set_cc_for_build
if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
| grep -q __ARM_EABI__
then
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
else
if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
| grep -q __ARM_PCS_VFP
then
- echo ${UNAME_MACHINE}-unknown-linux-gnueabi
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi
else
- echo ${UNAME_MACHINE}-unknown-linux-gnueabihf
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf
fi
fi
exit ;;
avr32*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
cris:Linux:*:*)
- echo ${UNAME_MACHINE}-axis-linux-gnu
+ echo ${UNAME_MACHINE}-axis-linux-${LIBC}
exit ;;
crisv32:Linux:*:*)
- echo ${UNAME_MACHINE}-axis-linux-gnu
+ echo ${UNAME_MACHINE}-axis-linux-${LIBC}
exit ;;
frv:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
hexagon:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
i*86:Linux:*:*)
- LIBC=gnu
- eval $set_cc_for_build
- sed 's/^ //' << EOF >$dummy.c
- #ifdef __dietlibc__
- LIBC=dietlibc
- #endif
-EOF
- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
- echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
+ echo ${UNAME_MACHINE}-pc-linux-${LIBC}
exit ;;
ia64:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
m32r*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
m68*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
mips:Linux:*:* | mips64:Linux:*:*)
eval $set_cc_for_build
@@ -957,54 +967,63 @@ EOF
#endif
EOF
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
- test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
+ test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
;;
+ or1k:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
or32:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
padre:Linux:*:*)
- echo sparc-unknown-linux-gnu
+ echo sparc-unknown-linux-${LIBC}
exit ;;
parisc64:Linux:*:* | hppa64:Linux:*:*)
- echo hppa64-unknown-linux-gnu
+ echo hppa64-unknown-linux-${LIBC}
exit ;;
parisc:Linux:*:* | hppa:Linux:*:*)
# Look for CPU level
case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
- PA7*) echo hppa1.1-unknown-linux-gnu ;;
- PA8*) echo hppa2.0-unknown-linux-gnu ;;
- *) echo hppa-unknown-linux-gnu ;;
+ PA7*) echo hppa1.1-unknown-linux-${LIBC} ;;
+ PA8*) echo hppa2.0-unknown-linux-${LIBC} ;;
+ *) echo hppa-unknown-linux-${LIBC} ;;
esac
exit ;;
ppc64:Linux:*:*)
- echo powerpc64-unknown-linux-gnu
+ echo powerpc64-unknown-linux-${LIBC}
exit ;;
ppc:Linux:*:*)
- echo powerpc-unknown-linux-gnu
+ echo powerpc-unknown-linux-${LIBC}
+ exit ;;
+ ppc64le:Linux:*:*)
+ echo powerpc64le-unknown-linux-${LIBC}
+ exit ;;
+ ppcle:Linux:*:*)
+ echo powerpcle-unknown-linux-${LIBC}
exit ;;
s390:Linux:*:* | s390x:Linux:*:*)
- echo ${UNAME_MACHINE}-ibm-linux
+ echo ${UNAME_MACHINE}-ibm-linux-${LIBC}
exit ;;
sh64*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
sh*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
sparc:Linux:*:* | sparc64:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
tile*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
vax:Linux:*:*)
- echo ${UNAME_MACHINE}-dec-linux-gnu
+ echo ${UNAME_MACHINE}-dec-linux-${LIBC}
exit ;;
x86_64:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
xtensa*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
i*86:DYNIX/ptx:4*:*)
# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
@@ -1237,19 +1256,21 @@ EOF
exit ;;
*:Darwin:*:*)
UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
- case $UNAME_PROCESSOR in
- i386)
- eval $set_cc_for_build
- if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
- if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
- (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
- grep IS_64BIT_ARCH >/dev/null
- then
- UNAME_PROCESSOR="x86_64"
- fi
- fi ;;
- unknown) UNAME_PROCESSOR=powerpc ;;
- esac
+ eval $set_cc_for_build
+ if test "$UNAME_PROCESSOR" = unknown ; then
+ UNAME_PROCESSOR=powerpc
+ fi
+ if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
+ if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
+ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
+ grep IS_64BIT_ARCH >/dev/null
+ then
+ case $UNAME_PROCESSOR in
+ i386) UNAME_PROCESSOR=x86_64 ;;
+ powerpc) UNAME_PROCESSOR=powerpc64 ;;
+ esac
+ fi
+ fi
echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
exit ;;
*:procnto*:*:* | *:QNX:[0123456789]*:*)
View
87 contrib/dialog/config.sub
@@ -1,24 +1,18 @@
#! /bin/sh
# Configuration validation subroutine script.
-# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
-# 2011, 2012 Free Software Foundation, Inc.
+# Copyright 1992-2013 Free Software Foundation, Inc.
-timestamp='2012-08-18'
+timestamp='2013-09-05'
-# This file is (in principle) common to ALL GNU software.
-# The presence of a machine in this file suggests that SOME GNU software
-# can handle that machine. It does not imply ALL GNU software can.
-#
-# This file is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
+# This file is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, see <http://www.gnu.org/licenses/>.
@@ -26,11 +20,12 @@ timestamp='2012-08-18'
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
+# the same distribution terms that you use for the rest of that
+# program. This Exception is an additional permission under section 7
+# of the GNU General Public License, version 3 ("GPLv3").
-# Please send patches to <config-patches@gnu.org>. Submit a context
-# diff and a properly formatted GNU ChangeLog entry.
+# Please send patches with a ChangeLog entry to config-patches@gnu.org.
#
# Configuration subroutine to validate and canonicalize a configuration type.
# Supply the specified configuration type as an argument.
@@ -73,9 +68,7 @@ Report bugs and patches to <config-patches@gnu.org>."
version="\
GNU config.sub ($timestamp)
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
-Free Software Foundation, Inc.
+Copyright 1992-2013 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -156,7 +149,7 @@ case $os in
-convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
-c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
-harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
- -apple | -axis | -knuth | -cray | -microblaze)
+ -apple | -axis | -knuth | -cray | -microblaze*)
os=
basic_machine=$1
;;
@@ -259,10 +252,12 @@ case $basic_machine in
| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
| am33_2.0 \
- | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
- | be32 | be64 \
+ | arc | arceb \
+ | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \
+ | avr | avr32 \
+ | be32 | be64 \
| bfin \
- | c4x | clipper \
+ | c4x | c8051 | clipper \
| d10v | d30v | dlx | dsp16xx \
| epiphany \
| fido | fr30 | frv \
@@ -273,7 +268,7 @@ case $basic_machine in
| le32 | le64 \
| lm32 \
| m32c | m32r | m32rle | m68000 | m68k | m88k \
- | maxq | mb | microblaze | mcore | mep | metag \
+ | maxq | mb | microblaze | microblazeel | mcore | mep | metag \
| mips | mipsbe | mipseb | mipsel | mipsle \
| mips16 \
| mips64 | mips64el \
@@ -291,16 +286,17 @@ case $basic_machine in
| mipsisa64r2 | mipsisa64r2el \
| mipsisa64sb1 | mipsisa64sb1el \
| mipsisa64sr71k | mipsisa64sr71kel \
+ | mipsr5900 | mipsr5900el \
| mipstx39 | mipstx39el \
| mn10200 | mn10300 \
| moxie \
| mt \
| msp430 \
| nds32 | nds32le | nds32be \
- | nios | nios2 \
+ | nios | nios2 | nios2eb | nios2el \
| ns16k | ns32k \
| open8 \
- | or32 \
+ | or1k | or32 \
| pdp10 | pdp11 | pj | pjl \
| powerpc | powerpc64 | powerpc64le | powerpcle \
| pyramid \
@@ -328,7 +324,7 @@ case $basic_machine in
c6x)
basic_machine=tic6x-unknown
;;
- m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | picochip)
+ m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip)
basic_machine=$basic_machine-unknown
os=-none
;;
@@ -370,13 +366,13 @@ case $basic_machine in
| aarch64-* | aarch64_be-* \
| alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
- | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
+ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \
| arm-* | armbe-* | armle-* | armeb-* | armv*-* \
| avr-* | avr32-* \
| be32-* | be64-* \
| bfin-* | bs2000-* \
| c[123]* | c30-* | [cjt]90-* | c4x-* \
- | clipper-* | craynv-* | cydra-* \
+ | c8051-* | clipper-* | craynv-* | cydra-* \
| d10v-* | d30v-* | dlx-* \
| elxsi-* \
| f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
@@ -389,7 +385,8 @@ case $basic_machine in
| lm32-* \
| m32c-* | m32r-* | m32rle-* \
| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
- | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \
+ | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \
+ | microblaze-* | microblazeel-* \
| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
| mips16-* \
| mips64-* | mips64el-* \
@@ -407,12 +404,13 @@ case $basic_machine in
| mipsisa64r2-* | mipsisa64r2el-* \
| mipsisa64sb1-* | mipsisa64sb1el-* \
| mipsisa64sr71k-* | mipsisa64sr71kel-* \
+ | mipsr5900-* | mipsr5900el-* \
| mipstx39-* | mipstx39el-* \
| mmix-* \
| mt-* \
| msp430-* \
| nds32-* | nds32le-* | nds32be-* \
- | nios-* | nios2-* \
+ | nios-* | nios2-* | nios2eb-* | nios2el-* \
| none-* | np1-* | ns16k-* | ns32k-* \
| open8-* \
| orion-* \
@@ -788,7 +786,7 @@ case $basic_machine in
basic_machine=ns32k-utek
os=-sysv
;;
- microblaze)
+ microblaze*)
basic_machine=microblaze-xilinx
;;
mingw64)
@@ -796,7 +794,7 @@ case $basic_machine in
os=-mingw64
;;
mingw32)
- basic_machine=i386-pc
+ basic_machine=i686-pc
os=-mingw32
;;
mingw32ce)
@@ -832,7 +830,7 @@ case $basic_machine in
basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
;;
msys)
- basic_machine=i386-pc
+ basic_machine=i686-pc
os=-msys
;;
mvs)
@@ -1023,7 +1021,11 @@ case $basic_machine in
basic_machine=i586-unknown
os=-pw32
;;
- rdos)
+ rdos | rdos64)
+ basic_machine=x86_64-pc
+ os=-rdos
+ ;;
+ rdos32)
basic_machine=i386-pc
os=-rdos
;;
@@ -1350,7 +1352,7 @@ case $os in
-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
| -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
| -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
- | -sym* | -kopensolaris* \
+ | -sym* | -kopensolaris* | -plan9* \
| -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
| -aos* | -aros* \
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
@@ -1496,9 +1498,6 @@ case $os in
-aros*)
os=-aros
;;
- -kaos*)
- os=-kaos
- ;;
-zvmoe)
os=-zvmoe
;;
@@ -1547,6 +1546,9 @@ case $basic_machine in
c4x-* | tic4x-*)
os=-coff
;;
+ c8051-*)
+ os=-elf
+ ;;
hexagon-*)
os=-elf
;;
@@ -1590,6 +1592,9 @@ case $basic_machine in
mips*-*)
os=-elf
;;
+ or1k-*)
+ os=-elf
+ ;;
or32-*)
os=-coff
;;
View
4,106 contrib/dialog/configure
2,681 additions, 1,425 deletions not shown
View
44 contrib/dialog/configure.in
@@ -1,4 +1,4 @@
-dnl $Id: configure.in,v 1.75 2012/12/30 22:38:00 tom Exp $
+dnl $Id: configure.in,v 1.79 2013/09/02 14:02:57 tom Exp $
dnl Process this file with autoconf to produce a configure script.
dnl ---------------------------------------------------------------------------
dnl Copyright 1999-2011,2012 -- Thomas E. Dickey
@@ -44,6 +44,7 @@ AC_PROG_CPP
AC_PROG_MAKE_SET
AC_PROG_RANLIB
AC_PROG_INSTALL
+CF_PROG_LN_S
CF_PROG_LINT
dnl needed for CF_WITH_LIBTOOL
@@ -59,23 +60,36 @@ CF_XOPEN_SOURCE
CF_LARGEFILE
CF_WITH_WARNINGS
+CF_PKG_CONFIG
dnl
dnl Allow dialog program and library to be renamed.
+AC_MSG_CHECKING(for this package's name)
AC_ARG_WITH(package,
[ --with-package=XXX rename dialog to XXX, library to libXXX.a, etc],
[PACKAGE=$withval],
[PACKAGE=dialog])
+AC_MSG_RESULT($PACKAGE)
CF_VERSION_INFO(dialog,$PACKAGE)
+CFG_ROOTNAME=$PACKAGE
+HDR_ROOTNAME=$PACKAGE
+LIB_ROOTNAME=$PACKAGE
+
+AC_SUBST(CFG_ROOTNAME)
+AC_SUBST(HDR_ROOTNAME)
+AC_SUBST(LIB_ROOTNAME)
+
dnl
dnl If package is renamed, it is useful to have the dlg_XXX headers in a
dnl subdirectory (using the package name) so that multiple versions of the
dnl headers can coexist.
+AC_MSG_CHECKING(if we should install dlg_XXX headers to subdirectory)
AC_ARG_ENABLE(header-subdir,
[ --enable-header-subdir install dlg_XXX headers to subdirectory],
[SUB_INC=$enableval],
[SUB_INC=no])
+AC_MSG_RESULT($SUB_INC)
AC_SUBST(SUB_INC)
dnl
@@ -93,17 +107,13 @@ CF_ARG_MSG_ENABLE([if you want --trace option],
[EXTRAOBJS="$EXTRAOBJS trace\$o"
AC_DEFINE(HAVE_DLG_TRACE,1,[Define to 1 to support --trace option])],,yes)
-LIBTOOL_MAKE="#"
-CF_WITH_LIBTOOL
-if test "$with_libtool" = "yes" ; then
- OBJEXT="lo"
- LIBTOOL_MAKE=
- CF_WITH_LIBTOOL_OPTS
-fi
-AC_SUBST(LIBTOOL_MAKE)
+CF_LD_RPATH_OPT
+CF_WITH_SHARED_OR_LIBTOOL(DIALOG,${VERSION_MAJOR}.${VERSION_MINOR},`echo "$VERSION" |sed -e 's/:/./g'`)
CF_WITH_CURSES_DIR
+CF_ENABLE_RPATH
+
use_ncurses=no
AC_ARG_WITH(ncurses,
[ --with-ncurses compile/link with ncurses library],
@@ -252,4 +262,18 @@ AC_TRY_LINK([#include <locale.h>],[setlocale(LC_ALL, "")],[AC_DEFINE(HAVE_SETLOC
CF_DISABLE_RPATH_HACK
-AC_OUTPUT(dialog-config makefile $EXTRA_OUTPUT $SUB_MAKEFILE,,,sort -u)
+CF__DEFINE_SHLIB_VARS
+
+AC_OUTPUT(
+ dialog-config
+ makefile
+ $EXTRA_OUTPUT
+ $SUB_MAKEFILE,[
+CF__ADD_SHLIB_RULES(
+ makefile,
+ $LIB_MODEL,
+ [\${LIB_OBJECT}],
+ [\${LIBS} \${LDFLAGS}])
+],[
+CF__INIT_SHLIB_RULES
+],[sort -u])
View
51 contrib/dialog/dialog.1
@@ -1,5 +1,5 @@
'\" t
-.\" $Id: dialog.1,v 1.165 2013/03/15 09:07:30 tom Exp $
+.\" $Id: dialog.1,v 1.167 2013/09/02 17:38:36 tom Exp $
.\" Copyright 2005-2012,2013 Thomas E. Dickey
.\"
.\" This program is free software; you can redistribute it and/or modify
@@ -41,7 +41,7 @@
.IP \(bu 4
..
.
-.TH \*D 1 "" "$Date: 2013/03/15 09:07:30 $"
+.TH \*D 1 "" "$Date: 2013/09/02 17:38:36 $"
.SH NAME
dialog \- display dialog boxes from shell scripts
.SH SYNOPSIS
@@ -318,11 +318,19 @@ or if an unrecognized option is given.
.IP "\fB--help-button"
Show a help-button after "OK" and "Cancel" buttons,
i.e., in checklist, radiolist and menu boxes.
-If "\fB--item-help\fR" is also given, on exit
-the return status will be the same as for the "OK" button,
-and the item-help text will be written to \fB\*p\fP's output after the token "HELP".
-Otherwise, the return status will indicate that the Help button was pressed,
-and no message printed.
+.IP
+On exit, the return status will indicate that the Help button was pressed.
+\fB\*L\fP will also write a message to its output after the token "HELP":
+.RS
+.bP
+If "\fB--item-help\fR" is also given, the item-help text will be written.
+.bP
+Otherwise, the item's tag (the first field) will be written.
+.RE
+.IP
+.IP
+You can use the \fB--help-tags\fP option and/or set the DIALOG_ITEM_HELP
+environment variable to modify these messages and exit-status.
.
.IP "\fB--help-label \fIstring"
Override the label used for "Help" buttons.
@@ -334,6 +342,11 @@ after the item-help "HELP" information.
This can be used to reconstruct the state of a checklist after processing
the help request.
.
+.IP "\fB--help-tags"
+Modify the messages written on exit for \fB--help-button\fP
+by making them always just the item's tag.
+This does not affect the exit status code.
+.
.IP "\fB--hfile \fIfilename"
Display the given file using a textbox when the user presses F1.
.
@@ -1411,9 +1424,7 @@ The default values and corresponding environment variables
that can override them are:
.TP 5
0
-if
-.BR \*p " is exited by pressing the " Yes " or " OK
-button (DIALOG_OK).
+if the \fBYES\fP or \fBOK\fP button is pressed (DIALOG_OK).
.TP 5
1
if the
@@ -1423,7 +1434,9 @@ button is pressed (DIALOG_CANCEL).
2
if the
.BR Help
-button is pressed (DIALOG_HELP).
+button is pressed (DIALOG_HELP),
+.br
+except as noted below about DIALOG_ITEM_HELP.
.TP 5
3
if the
@@ -1433,13 +1446,21 @@ button is pressed (DIALOG_EXTRA).
4
if the
.BR Help
-button is pressed (DIALOG_HELP),
-or the \fB--item-help\fP option is set
-when the \fBHelp\fP button is pressed (DIALOG_ITEM_HELP),
+button is pressed,
+.br
+and the \fB--item-help\fP option is set
+.br
+and the DIALOG_ITEM_HELP environment variable is set to 4.
+.IP
+While any of the exit-codes can be overridden using environment variables,
+this special case was introduced in 2004 to simplify compatibility.
+\fB\*L\fP uses DIALOG_ITEM_HELP(4) internally,
+but unless the environment variable is also set,
+it changes that to DIALOG_HELP(2) on exit.
.TP 5
-1
if errors occur inside \fB\*p\fP (DIALOG_ERROR)
-or \fB\*p\fP is exited by pressing the \fIESC\fP key (DIALOG_ESC).
+or \fB\*p\fP exits because the \fIESC\fP key (DIALOG_ESC) was pressed.
.
.\" ************************************************************************
.SH PORTABILITY
View
94 contrib/dialog/dialog.3
@@ -1,5 +1,5 @@
'\" t
-.\" $Id: dialog.3,v 1.91 2013/03/15 09:07:30 tom Exp $
+.\" $Id: dialog.3,v 1.93 2013/09/22 23:58:11 tom Exp $
.\" Copyright 2005-2012,2013 Thomas E. Dickey
.\"
.\" This program is free software; you can redistribute it and/or modify
@@ -39,7 +39,7 @@
.de bP
.IP \(bu 4
..
-.TH \*D 3 "" "$Date: 2013/03/15 09:07:30 $"
+.TH \*D 3 "" "$Date: 2013/09/22 23:58:11 $"
.SH NAME
dialog \- widgets and utilities for the \*p program
.SH SYNOPSIS
@@ -127,6 +127,11 @@ sizing (specifying 0 for height and width).
It represents width / height.
The default is 9, which means 9 characters wide to every 1 line high.
.\" ---------------------------------------------------------------------------
+.IP \fIDIALOG_STATE.finish_string
+When set to true, this allows calls to \fBdlg_finish_string\fP to discard the
+corresponding data which is created to speed up layout computations for the
+given string parameter. The \fBgauge\fP widget uses this feature.
+.\" ---------------------------------------------------------------------------
.IP \fIDIALOG_STATE.getc_callbacks
This is setup in \fIui_getc.c\fP to record windows which must be polled
for input, e.g,. to handle the background tailbox widget.
@@ -396,6 +401,14 @@ after the item-help "HELP" information.
This can be used to reconstruct the state of a checklist after processing
the help request.
.\" ---------------------------------------------------------------------------
+.IP \fIDIALOG_VARS.help_tags
+This corresponds to the command-line option "\fB--help-tags\fP".
+If true,
+\fBdlg_add_help_formitem\fP and
+\fBdlg_add_help_listitem\fP use the item's tag value consistently
+rather than using the tag's help-text value
+when \fIDIALOG_VARS.item_help\fP is set.
+.\" ---------------------------------------------------------------------------
.IP \fIDIALOG_VARS.input_length
This is nonzero if \fIDIALOG_VARS.input_result\fP is allocated,
versus being a pointer to the user's local variables.
@@ -879,6 +892,7 @@ implements the "\fB--gauge\fP" option.
Alternatively, a simpler or customized gauge widget can be
setup using
\fBdlg_allocate_gauge\fP,
+\fBdlg_reallocate_gauge\fP,
\fBdlg_update_gauge\fP and
\fBdlg_free_gauge\fP.
.RS
@@ -1386,6 +1400,38 @@ function to call when input ends, e.g., to free caller's additional data.
.RE
.\" ---------------------------------------------------------------------------
.TP 5
+.B dlg_add_help_formitem
+This is a utility function used enforce consistent behavior for
+the \fIDIALOG_VARS.help_tags\fP and \fIDIALOG_VARS.item_help\fP variables.
+.RS
+.TP 5
+.B int *\fIresult\fP
+this is updated to DLG_EXIT_ITEM_HELP if \fIDIALOG_VARS.item_help\fP is set.
+.TP 5
+.B char **\fItag\fP
+the tag- or help-text is stored here.
+.TP 5
+.B DIALOG_FORMITEM *\fIitem\fP
+contains the list item to use for tag- or help-text.
+.RE
+.\" ---------------------------------------------------------------------------
+.TP 5
+.B dlg_add_help_listitem
+This is a utility function used enforce consistent behavior for
+the \fIDIALOG_VARS.help_tags\fP and \fIDIALOG_VARS.item_help\fP variables.
+.RS
+.TP 5
+.B int *\fIresult\fP
+this is updated to DLG_EXIT_ITEM_HELP if \fIDIALOG_VARS.item_help\fP is set.
+.TP 5
+.B char **\fItag\fP
+the tag- or help-text is stored here.
+.TP 5
+.B DIALOG_LISTITEM *\fIitem\fP
+contains the list item to use for tag- or help-text.
+.RE
+.\" ---------------------------------------------------------------------------
+.TP 5
.B dlg_add_last_key
Report the last key entered by the user.
This implements the \fB\-\-last\-key\fP command-line option,
@@ -2518,6 +2564,18 @@ is the character-offset to find.
.RE
.\" ---------------------------------------------------------------------------
.TP 5
+.B dlg_finish_string
+If \fIDIALOG_STATE.finish_string\fP is true,
+this function discards data used to speed up layout computations.
+.RS
+.TP 5
+.B const char * \fIstring
+is the address of the string whose data should be discarded.
+The address rather than contents is used as the unique identifier because
+some of the caching is used for editable input-fields.
+.RE
+.\" ---------------------------------------------------------------------------
+.TP 5
.B dlg_flush_getc
Cancel the local data saved by \fBdlg_last_getc\fP.
.\" ---------------------------------------------------------------------------
@@ -3302,6 +3360,38 @@ Display the background title if \fBdialog_vars.backtitle\fP is non-null.
The background title is shown at the top of the screen.
.\" ---------------------------------------------------------------------------
.TP 5
+.B dlg_reallocate_gauge
+Allocates or reallocates a gauge widget (see \fBdlg_allocate_gauge\fP).
+Use \fBdlg_update_gauge\fP to display the result.
+.RS
+.TP 5
+.B void ** \fIobjptr
+If the pointer referenced by this parameter is null, the function creates
+a new gauge widget using \fBdlg_allocate_gauge\fP.
+Otherwise, it updates the title and cprompt values, reusing the window
+from the previous call on this function.
+As a side-effect, the function stores the updated object-pointer via
+the \fIobjptr\fP parameter.
+.TP 5
+.B const char * \fItitle
+is the title string to display at the top of the widget.
+.TP 5
+.B const char * \fIcprompt
+is the prompt text shown within the widget.
+.TP 5
+.B int \fIheight
+is the desired height of the box.
+If zero, the height is adjusted to use the available screen size.
+.TP 5
+.B int \fIwidth
+is the desired width of the box.
+If zero, the height is adjusted to use the available screen size.
+.TP 5
+.B int \fIpercent
+is the percentage to show in the progress bar.
+.RE
+.\" ---------------------------------------------------------------------------
+.TP 5
.B dlg_register_buttons
The widget developer should call this function after \fBdlg_register_window\fP,
for the list of button labels associated with the widget.
View
7 contrib/dialog/dialog.c
@@ -1,5 +1,5 @@
/*
- * $Id: dialog.c,v 1.230 2013/03/15 09:07:30 tom Exp $
+ * $Id: dialog.c,v 1.231 2013/09/02 17:20:09 tom Exp $
*
* cdialog - Display simple dialog boxes from shell scripts
*
@@ -71,6 +71,7 @@ typedef enum {
,o_help_label
,o_help_line
,o_help_status
+ ,o_help_tags
,o_icon
,o_ignore
,o_infobox
@@ -229,6 +230,7 @@ static const Options options[] = {
{ "help-button", o_help_button, 1, "" },
{ "help-label", o_help_label, 1, "<str>" },
{ "help-status", o_help_status, 1, "" },
+ { "help-tags", o_help_tags, 1, "" },
{ "hfile", o_help_file, 1, "<str>" },
{ "hline", o_help_line, 1, "<str>" },