From 4358a4e8984a5d27fe69a28cb9c01ff872858598 Mon Sep 17 00:00:00 2001 From: Andrew Borodin Date: Wed, 25 May 2011 17:51:18 +0400 Subject: [PATCH 1/4] Ticket #2560: get rid of autoconf obsolete macros. Use AS_HELP_STRING instead of AC_HELP_STRING. Signed-off-by: Andrew Borodin --- configure.ac | 4 ++-- m4.include/ac-glib.m4 | 2 +- m4.include/ax_path_lib_pcre.m4 | 2 +- m4.include/mc-check-search-type.m4 | 4 ++-- m4.include/mc-tests.m4 | 2 +- m4.include/mc-vfs.m4 | 2 +- m4.include/mc-with-screen-ncurses.m4 | 4 ++-- m4.include/mc-with-screen-slang.m4 | 4 ++-- m4.include/vfs/mc-vfs-cpiofs.m4 | 2 +- m4.include/vfs/mc-vfs-extfs.m4 | 2 +- m4.include/vfs/mc-vfs-fish.m4 | 2 +- m4.include/vfs/mc-vfs-ftp.m4 | 2 +- m4.include/vfs/mc-vfs-samba.m4 | 2 +- m4.include/vfs/mc-vfs-sfs.m4 | 2 +- m4.include/vfs/mc-vfs-tarfs.m4 | 2 +- m4.include/vfs/mc-vfs-undelfs.m4 | 2 +- 16 files changed, 20 insertions(+), 20 deletions(-) diff --git a/configure.ac b/configure.ac index 7176b4e77..4d5b4431d 100644 --- a/configure.ac +++ b/configure.ac @@ -53,7 +53,7 @@ dnl PKG_CHECK_MODULES([CHECK], [check >= 0.9.4]) AC_CHECK_GLIB AC_ARG_ENABLE([mclib], - [AS_HELP_STRING([--enable-mclib],[ Compile shared library libmc.so [no]])], + [AS_HELP_STRING([--enable-mclib], [Compile shared library libmc.so @<:@no@:>@])], [ if test "x$enableval" = "xno" ; then enable_mclib=no @@ -459,7 +459,7 @@ fi AC_ARG_ENABLE( [werror], - AC_HELP_STRING([--enable-werror], [Handle all compiler warnings as errors] ) + AS_HELP_STRING([--enable-werror], [Handle all compiler warnings as errors]) ) if test "x$enable_werror" = xyes; then diff --git a/m4.include/ac-glib.m4 b/m4.include/ac-glib.m4 index b3079ecc8..535314ad3 100644 --- a/m4.include/ac-glib.m4 +++ b/m4.include/ac-glib.m4 @@ -86,7 +86,7 @@ AC_DEFUN([AC_CHECK_GLIB], [ dnl AC_ARG_WITH([glib_static], - AC_HELP_STRING([--with-glib-static],[Link glib statically [[no]]])) + AS_HELP_STRING([--with-glib-static], [Link glib statically @<:@no@:>@])) glib_found=no PKG_CHECK_MODULES(GLIB, [glib-2.0 >= 2.8], [glib_found=yes], [:]) diff --git a/m4.include/ax_path_lib_pcre.m4 b/m4.include/ax_path_lib_pcre.m4 index dd26fe654..dc4a8be25 100644 --- a/m4.include/ax_path_lib_pcre.m4 +++ b/m4.include/ax_path_lib_pcre.m4 @@ -17,7 +17,7 @@ dnl @license GPLWithACException AC_DEFUN([AX_PATH_LIB_PCRE],[dnl AC_MSG_CHECKING([lib pcre]) AC_ARG_WITH([pcre], - AC_HELP_STRING([--with-pcre[[=prefix]]], [compile pcre part (via libpcre check)]), + AS_HELP_STRING([--with-pcre@<:@=prefix@:>@], [Compile pcre part (via libpcre check)]), , [with_pcre="yes"] ) diff --git a/m4.include/mc-check-search-type.m4 b/m4.include/mc-check-search-type.m4 index f3e1bbbb4..ea01ed123 100644 --- a/m4.include/mc-check-search-type.m4 +++ b/m4.include/mc-check-search-type.m4 @@ -32,8 +32,8 @@ AC_DEFUN([MC_CHECK_SEARCH_TYPE_GLIB],[ AC_DEFUN([MC_CHECK_SEARCH_TYPE],[ AC_ARG_WITH([search-engine], - AC_HELP_STRING([--with-search-engine=type], - [Select low-level search engine (since glib >= 2.14). [[glib|pcre]]]) + AS_HELP_STRING([--with-search-engine=type], + [Select low-level search engine (since glib >= 2.14) @<:@glib|pcre@:>@]) ) case x$with_search_engine in xglib) diff --git a/m4.include/mc-tests.m4 b/m4.include/mc-tests.m4 index 6e14a3056..6aedd4b6e 100644 --- a/m4.include/mc-tests.m4 +++ b/m4.include/mc-tests.m4 @@ -11,7 +11,7 @@ AC_DEFUN([MC_UNIT_TESTS],[ AC_ARG_ENABLE( [tests], - AC_HELP_STRING([--enable-tests], [Enable unit tests (see http://check.sourceforge.net/)] ) + AS_HELP_STRING([--enable-tests], [Enable unit tests (see http://check.sourceforge.net/)]) ) if test x$enable_tests != xno; then diff --git a/m4.include/mc-vfs.m4 b/m4.include/mc-vfs.m4 index 4192d81bd..1e1a0777c 100644 --- a/m4.include/mc-vfs.m4 +++ b/m4.include/mc-vfs.m4 @@ -50,7 +50,7 @@ AC_DEFUN([AC_MC_VFS_CHECKS], vfs_type="normal" AC_ARG_ENABLE([vfs], - AC_HELP_STRING([--disable-vfs], [Disable VFS]), + AS_HELP_STRING([--disable-vfs], [Disable VFS]), [ if test "x$enableval" = "xno"; then enable_vfs=no diff --git a/m4.include/mc-with-screen-ncurses.m4 b/m4.include/mc-with-screen-ncurses.m4 index 195235422..3e7f4821b 100644 --- a/m4.include/mc-with-screen-ncurses.m4 +++ b/m4.include/mc-with-screen-ncurses.m4 @@ -74,7 +74,7 @@ AC_DEFUN([MC_WITH_NCURSES], [ dnl get the user supplied include path AC_ARG_WITH([ncurses-includes], - AC_HELP_STRING([--with-ncurses-includes=@<:@DIR@:>@], + AS_HELP_STRING([--with-ncurses-includes=@<:@DIR@:>@], [set path to ncurses includes @<:@default=/usr/include@:>@; make sense only if --with-screen=ncurses; for /usr/local/include/ncurses specify /usr/local/include] ), [ac_ncurses_inc_path="$withval"], @@ -83,7 +83,7 @@ AC_DEFUN([MC_WITH_NCURSES], [ dnl get the user supplied lib path AC_ARG_WITH([ncurses-libs], - AC_HELP_STRING([--with-ncurses-libs=@<:@DIR@:>@], + AS_HELP_STRING([--with-ncurses-libs=@<:@DIR@:>@], [set path to ncurses library @<:@default=/usr/lib@:>@; make sense only if --with-screen=ncurses] ), [ac_ncurses_lib_path="$withval"], diff --git a/m4.include/mc-with-screen-slang.m4 b/m4.include/mc-with-screen-slang.m4 index 28dddb715..876b83935 100644 --- a/m4.include/mc-with-screen-slang.m4 +++ b/m4.include/mc-with-screen-slang.m4 @@ -177,7 +177,7 @@ AC_DEFUN([MC_WITH_SLANG], [ error_msg_slang="" AC_ARG_WITH([slang-includes], - AC_HELP_STRING([--with-slang-includes=@<:@DIR@:>@], + AS_HELP_STRING([--with-slang-includes=@<:@DIR@:>@], [set path to SLANG includes @<:@default=/usr/include@:>@; make sense only if --with-screen=slang] ), [ac_slang_inc_path="$withval"], @@ -185,7 +185,7 @@ AC_DEFUN([MC_WITH_SLANG], [ ) AC_ARG_WITH([slang-libs], - AC_HELP_STRING([--with-slang-libs=@<:@DIR@:>@], + AS_HELP_STRING([--with-slang-libs=@<:@DIR@:>@], [set path to SLANG library @<:@default=/usr/lib@:>@; make sense only if --with-screen=slang] ), [ac_slang_lib_path="$withval"], diff --git a/m4.include/vfs/mc-vfs-cpiofs.m4 b/m4.include/vfs/mc-vfs-cpiofs.m4 index e402ff5cb..2d104c615 100644 --- a/m4.include/vfs/mc-vfs-cpiofs.m4 +++ b/m4.include/vfs/mc-vfs-cpiofs.m4 @@ -2,7 +2,7 @@ dnl CPIO filesystem support AC_DEFUN([AC_MC_VFS_CPIOFS], [ AC_ARG_ENABLE([vfs-cpio], - AC_HELP_STRING([--enable-vfs-cpio], [Support for cpio filesystem [[yes]]])) + AS_HELP_STRING([--enable-vfs-cpio], [Support for cpio filesystem @<:@yes@:>@])) if test "$enable_vfs" = "yes" -a x"$enable_vfs_cpio" != x"no"; then enable_vfs_cpio="yes" AC_DEFINE([ENABLE_VFS_CPIO], [1], [Support for cpio filesystem]) diff --git a/m4.include/vfs/mc-vfs-extfs.m4 b/m4.include/vfs/mc-vfs-extfs.m4 index ff66cede9..17e090310 100644 --- a/m4.include/vfs/mc-vfs-extfs.m4 +++ b/m4.include/vfs/mc-vfs-extfs.m4 @@ -23,7 +23,7 @@ dnl Enable Extfs (classic) AC_DEFUN([AC_MC_VFS_EXTFS], [ AC_ARG_ENABLE([vfs-extfs], - AC_HELP_STRING([--enable-vfs-extfs], [Support for extfs filesystem [[yes]]])) + AS_HELP_STRING([--enable-vfs-extfs], [Support for extfs filesystem @<:@yes@:>@])) if test "$enable_vfs" = "yes" -a x"$enable_vfs_extfs" != x"no"; then AC_MC_EXTFS_CHECKS enable_vfs_extfs="yes" diff --git a/m4.include/vfs/mc-vfs-fish.m4 b/m4.include/vfs/mc-vfs-fish.m4 index c573e102a..e3ab0cf14 100644 --- a/m4.include/vfs/mc-vfs-fish.m4 +++ b/m4.include/vfs/mc-vfs-fish.m4 @@ -2,7 +2,7 @@ dnl Enable FISH protocol (classic) AC_DEFUN([AC_MC_VFS_FISH], [ AC_ARG_ENABLE([vfs-fish], - AC_HELP_STRING([--enable-vfs-fish], [Support for FISH filesystem [[yes]]])) + AS_HELP_STRING([--enable-vfs-fish], [Support for FISH filesystem @<:@yes@:>@])) if test "$enable_vfs" = "yes" -a "x$enable_vfs_fish" != xno; then enable_vfs_fish="yes" AC_MC_VFS_ADDNAME([fish]) diff --git a/m4.include/vfs/mc-vfs-ftp.m4 b/m4.include/vfs/mc-vfs-ftp.m4 index 54b9ea2e7..08146e568 100644 --- a/m4.include/vfs/mc-vfs-ftp.m4 +++ b/m4.include/vfs/mc-vfs-ftp.m4 @@ -2,7 +2,7 @@ dnl Enable FTP filesystem (classic) AC_DEFUN([AC_MC_VFS_FTP], [ AC_ARG_ENABLE([vfs-ftp], - AC_HELP_STRING([--enable-vfs-ftp], [Support for FTP filesystem [[yes]]])) + AS_HELP_STRING([--enable-vfs-ftp], [Support for FTP filesystem @<:@yes@:>@])) if test "$enable_vfs" != "no" -a x"$enable_vfs_ftp" != x"no"; then enable_vfs_ftp="yes" AC_MC_VFS_ADDNAME([ftp]) diff --git a/m4.include/vfs/mc-vfs-samba.m4 b/m4.include/vfs/mc-vfs-samba.m4 index b0812139e..1c7960aac 100644 --- a/m4.include/vfs/mc-vfs-samba.m4 +++ b/m4.include/vfs/mc-vfs-samba.m4 @@ -2,7 +2,7 @@ dnl Samba support AC_DEFUN([AC_MC_VFS_SMB], [ AC_ARG_ENABLE([vfs-smb], - AC_HELP_STRING([--enable-vfs-smb], [Support for SMB filesystem [[no]]]), + AS_HELP_STRING([--enable-vfs-smb], [Support for SMB filesystem @<:@no@:>@]), [ if test "x$enableval" = "xno"; then enable_vfs_smb=no diff --git a/m4.include/vfs/mc-vfs-sfs.m4 b/m4.include/vfs/mc-vfs-sfs.m4 index 8c23b0780..83075eb42 100644 --- a/m4.include/vfs/mc-vfs-sfs.m4 +++ b/m4.include/vfs/mc-vfs-sfs.m4 @@ -2,7 +2,7 @@ dnl SFS support AC_DEFUN([AC_MC_VFS_SFS], [ AC_ARG_ENABLE([vfs-sfs], - AC_HELP_STRING([--enable-vfs-sfs], [Support for sfs filesystem [[yes]]])) + AS_HELP_STRING([--enable-vfs-sfs], [Support for sfs filesystem @<:@yes@:>@])) if test "$enable_vfs" = "yes" -a x"$enable_vfs_sfs" != x"no"; then enable_vfs_sfs="yes" AC_MC_VFS_ADDNAME([sfs]) diff --git a/m4.include/vfs/mc-vfs-tarfs.m4 b/m4.include/vfs/mc-vfs-tarfs.m4 index 2d7f9a8b1..ac023b578 100644 --- a/m4.include/vfs/mc-vfs-tarfs.m4 +++ b/m4.include/vfs/mc-vfs-tarfs.m4 @@ -2,7 +2,7 @@ dnl TAR filesystem support AC_DEFUN([AC_MC_VFS_TARFS], [ AC_ARG_ENABLE([vfs-tar], - AC_HELP_STRING([--enable-vfs-tar], [Support for tar filesystem [[yes]]])) + AS_HELP_STRING([--enable-vfs-tar], [Support for tar filesystem @<:@yes@:>@])) if test "$enable_vfs" = "yes" -a x"$enable_vfs_tar" != x"no"; then enable_vfs_tar="yes" AC_MC_VFS_ADDNAME([tar]) diff --git a/m4.include/vfs/mc-vfs-undelfs.m4 b/m4.include/vfs/mc-vfs-undelfs.m4 index 7c0e2e9c9..a65d20d05 100644 --- a/m4.include/vfs/mc-vfs-undelfs.m4 +++ b/m4.include/vfs/mc-vfs-undelfs.m4 @@ -48,7 +48,7 @@ dnl AC_DEFUN([AC_MC_VFS_UNDELFS], [ AC_ARG_ENABLE([vfs-undelfs], - AC_HELP_STRING([--enable-vfs-undelfs], [Support for ext2 undelete filesystem [[no]]]), + AS_HELP_STRING([--enable-vfs-undelfs], [Support for ext2 undelete filesystem @<:@no@:>@]), [ if test "x$enableval" = "xno"; then enable_vfs_undelfs=no From 726991fc91bbbaeafd1fd0df5ab3a56baf20b7cd Mon Sep 17 00:00:00 2001 From: Andrew Borodin Date: Wed, 25 May 2011 17:59:27 +0400 Subject: [PATCH 2/4] Remove check of uintptr_t type ...because we don't have the regex.c file anymore (see 9db4ae7e2f7a11864293419d1d986ee8ef6dc1b8). Signed-off-by: Andrew Borodin --- autogen.sh | 2 +- configure.ac | 6 ------ maint/send-po | 2 +- 3 files changed, 2 insertions(+), 8 deletions(-) diff --git a/autogen.sh b/autogen.sh index f1453c32e..7c3ed501b 100755 --- a/autogen.sh +++ b/autogen.sh @@ -43,7 +43,7 @@ $AUTOPOINT --force || exit 1 $XGETTEXT --keyword=_ --keyword=N_ --keyword=Q_ --output=- \ `find . -name '*.[ch]'` | sed -ne '/^#:/{s/#://;s/:[0-9]*/\ /g;s/ //g;p;}' | \ - grep -v '^$' | sort | uniq | grep -v 'regex.c' >po/POTFILES.in + grep -v '^$' | sort | uniq >po/POTFILES.in $LIBTOOLIZE diff --git a/configure.ac b/configure.ac index 4d5b4431d..7c730c722 100644 --- a/configure.ac +++ b/configure.ac @@ -216,12 +216,6 @@ AC_CHECK_TYPES([socklen_t],,, #include ]) -dnl This is needed for regex.c only -AC_CHECK_TYPE(uintptr_t, - [AC_DEFINE(HAVE_UINTPTR_T, 1, - [Define if you have the `uintptr_t' type.]) -]) - AC_FUNC_ALLOCA AC_FUNC_STRCOLL diff --git a/maint/send-po b/maint/send-po index 939639e38..5bb2c637f 100755 --- a/maint/send-po +++ b/maint/send-po @@ -16,7 +16,7 @@ XGETTEXT=xgettext MSGMERGE=msgmerge files=`find . -name '*.[ch]' | xargs $XGETTEXT $XGETTEXT_OPTIONS --output=- | \ - sed -ne '/^#:/{s/#://;s/:[0-9]*/\n/g;s/ //g;p;}' | sort -u | grep -v 'regex.c'` + sed -ne '/^#:/{s/#://;s/:[0-9]*/\n/g;s/ //g;p;}' | sort -u` $XGETTEXT --default-domain=$DOMAIN --directory=. \ --add-comments=TRANSLATORS: $XGETTEXT_OPTIONS \ From 3778c9590493e41b71d309715b607b35c9c8976f Mon Sep 17 00:00:00 2001 From: Andrew Borodin Date: Wed, 25 May 2011 18:18:30 +0400 Subject: [PATCH 3/4] Avoid of double check of nlink_t and socklen_t types. Signed-off-by: Andrew Borodin --- configure.ac | 6 ------ 1 file changed, 6 deletions(-) diff --git a/configure.ac b/configure.ac index 7c730c722..bc3a3ab5d 100644 --- a/configure.ac +++ b/configure.ac @@ -209,12 +209,6 @@ AC_TYPE_OFF_T AC_CHECK_SIZEOF(off_t) AC_TYPE_PID_T AC_TYPE_UID_T -AC_CHECK_TYPE(nlink_t, unsigned int) -AC_CHECK_TYPES([socklen_t],,, -[ -#include -#include -]) AC_FUNC_ALLOCA AC_FUNC_STRCOLL From ad9f03da69f42d8d1902ad5aee0aa6851d6c6ba8 Mon Sep 17 00:00:00 2001 From: Andrew Borodin Date: Wed, 25 May 2011 18:19:39 +0400 Subject: [PATCH 4/4] Get rid of obsolete form of AC_CHECK_TYPE macro. Signed-off-by: Andrew Borodin --- m4.include/mc-vfs.m4 | 4 +++- m4.include/vfs/mc-vfs-undelfs.m4 | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/m4.include/mc-vfs.m4 b/m4.include/mc-vfs.m4 index 1e1a0777c..7d7325958 100644 --- a/m4.include/mc-vfs.m4 +++ b/m4.include/mc-vfs.m4 @@ -32,7 +32,9 @@ AC_DEFUN([MC_ENABLE_VFS_NET], dnl FIXME: network checks should probably be in their own macro. AC_REQUIRE_SOCKET if test x"$have_socket" = xyes; then - AC_CHECK_TYPE(nlink_t, unsigned int) + AC_CHECK_TYPE([nlink_t], , + [AC_DEFINE_UNQUOTED([nlink_t], [unsigned int], + [Define to `unsigned int' if does not define.])]) AC_CHECK_TYPES([socklen_t],,, [ #include diff --git a/m4.include/vfs/mc-vfs-undelfs.m4 b/m4.include/vfs/mc-vfs-undelfs.m4 index a65d20d05..43f12ee90 100644 --- a/m4.include/vfs/mc-vfs-undelfs.m4 +++ b/m4.include/vfs/mc-vfs-undelfs.m4 @@ -22,8 +22,8 @@ AC_DEFUN([MC_UNDELFS_CHECKS], [ if test x"$ext2fs_ext2fs_h" = xyes; then ext2fs_undel=yes EXT2FS_UNDEL_LIBS="-lext2fs -lcom_err" - AC_CHECK_TYPE(ext2_ino_t, , - [AC_DEFINE(ext2_ino_t, ino_t, + AC_CHECK_TYPE([ext2_ino_t], , + [AC_DEFINE_UNQUOTED([ext2_ino_t], [ino_t], [Define to ino_t if undefined.])], [ #include