Merge branch '2560_ac_obsolete_macros'

* 2560_ac_obsolete_macros:
  Get rid of obsolete form of AC_CHECK_TYPE macro.
  Avoid of double check of nlink_t and socklen_t types.
  Remove check of uintptr_t type
  Ticket #2560: get rid of autoconf obsolete macros.
This commit is contained in:
Andrew Borodin 2011-07-07 13:04:35 +04:00
commit f3ae923a6d
18 changed files with 27 additions and 37 deletions

View File

@ -43,7 +43,7 @@ $AUTOPOINT --force || exit 1
$XGETTEXT --keyword=_ --keyword=N_ --keyword=Q_ --output=- \ $XGETTEXT --keyword=_ --keyword=N_ --keyword=Q_ --output=- \
`find . -name '*.[ch]'` | sed -ne '/^#:/{s/#://;s/:[0-9]*/\ `find . -name '*.[ch]'` | sed -ne '/^#:/{s/#://;s/:[0-9]*/\
/g;s/ //g;p;}' | \ /g;s/ //g;p;}' | \
grep -v '^$' | sort | uniq | grep -v 'regex.c' >po/POTFILES.in grep -v '^$' | sort | uniq >po/POTFILES.in
$LIBTOOLIZE $LIBTOOLIZE

View File

@ -53,7 +53,7 @@ dnl PKG_CHECK_MODULES([CHECK], [check >= 0.9.4])
AC_CHECK_GLIB AC_CHECK_GLIB
AC_ARG_ENABLE([mclib], 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 if test "x$enableval" = "xno" ; then
enable_mclib=no enable_mclib=no
@ -209,18 +209,6 @@ AC_TYPE_OFF_T
AC_CHECK_SIZEOF(off_t) AC_CHECK_SIZEOF(off_t)
AC_TYPE_PID_T AC_TYPE_PID_T
AC_TYPE_UID_T AC_TYPE_UID_T
AC_CHECK_TYPE(nlink_t, unsigned int)
AC_CHECK_TYPES([socklen_t],,,
[
#include <sys/types.h>
#include <sys/socket.h>
])
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_ALLOCA
AC_FUNC_STRCOLL AC_FUNC_STRCOLL
@ -459,7 +447,7 @@ fi
AC_ARG_ENABLE( AC_ARG_ENABLE(
[werror], [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 if test "x$enable_werror" = xyes; then

View File

@ -86,7 +86,7 @@ AC_DEFUN([AC_CHECK_GLIB], [
dnl dnl
AC_ARG_WITH([glib_static], 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 glib_found=no
PKG_CHECK_MODULES(GLIB, [glib-2.0 >= 2.8], [glib_found=yes], [:]) PKG_CHECK_MODULES(GLIB, [glib-2.0 >= 2.8], [glib_found=yes], [:])

View File

@ -17,7 +17,7 @@ dnl @license GPLWithACException
AC_DEFUN([AX_PATH_LIB_PCRE],[dnl AC_DEFUN([AX_PATH_LIB_PCRE],[dnl
AC_MSG_CHECKING([lib pcre]) AC_MSG_CHECKING([lib pcre])
AC_ARG_WITH([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"] [with_pcre="yes"]
) )

View File

@ -32,8 +32,8 @@ AC_DEFUN([MC_CHECK_SEARCH_TYPE_GLIB],[
AC_DEFUN([MC_CHECK_SEARCH_TYPE],[ AC_DEFUN([MC_CHECK_SEARCH_TYPE],[
AC_ARG_WITH([search-engine], AC_ARG_WITH([search-engine],
AC_HELP_STRING([--with-search-engine=type], AS_HELP_STRING([--with-search-engine=type],
[Select low-level search engine (since glib >= 2.14). [[glib|pcre]]]) [Select low-level search engine (since glib >= 2.14) @<:@glib|pcre@:>@])
) )
case x$with_search_engine in case x$with_search_engine in
xglib) xglib)

View File

@ -11,7 +11,7 @@ AC_DEFUN([MC_UNIT_TESTS],[
AC_ARG_ENABLE( AC_ARG_ENABLE(
[tests], [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 if test x$enable_tests != xno; then

View File

@ -32,7 +32,9 @@ AC_DEFUN([MC_ENABLE_VFS_NET],
dnl FIXME: network checks should probably be in their own macro. dnl FIXME: network checks should probably be in their own macro.
AC_REQUIRE_SOCKET AC_REQUIRE_SOCKET
if test x"$have_socket" = xyes; then 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 <sys/types.h> does not define.])])
AC_CHECK_TYPES([socklen_t],,, AC_CHECK_TYPES([socklen_t],,,
[ [
#include <sys/types.h> #include <sys/types.h>
@ -50,7 +52,7 @@ AC_DEFUN([AC_MC_VFS_CHECKS],
vfs_type="normal" vfs_type="normal"
AC_ARG_ENABLE([vfs], AC_ARG_ENABLE([vfs],
AC_HELP_STRING([--disable-vfs], [Disable VFS]), AS_HELP_STRING([--disable-vfs], [Disable VFS]),
[ [
if test "x$enableval" = "xno"; then if test "x$enableval" = "xno"; then
enable_vfs=no enable_vfs=no

View File

@ -74,7 +74,7 @@ AC_DEFUN([MC_WITH_NCURSES], [
dnl get the user supplied include path dnl get the user supplied include path
AC_ARG_WITH([ncurses-includes], 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] [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"], [ac_ncurses_inc_path="$withval"],
@ -83,7 +83,7 @@ AC_DEFUN([MC_WITH_NCURSES], [
dnl get the user supplied lib path dnl get the user supplied lib path
AC_ARG_WITH([ncurses-libs], 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] [set path to ncurses library @<:@default=/usr/lib@:>@; make sense only if --with-screen=ncurses]
), ),
[ac_ncurses_lib_path="$withval"], [ac_ncurses_lib_path="$withval"],

View File

@ -177,7 +177,7 @@ AC_DEFUN([MC_WITH_SLANG], [
error_msg_slang="" error_msg_slang=""
AC_ARG_WITH([slang-includes], 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] [set path to SLANG includes @<:@default=/usr/include@:>@; make sense only if --with-screen=slang]
), ),
[ac_slang_inc_path="$withval"], [ac_slang_inc_path="$withval"],
@ -185,7 +185,7 @@ AC_DEFUN([MC_WITH_SLANG], [
) )
AC_ARG_WITH([slang-libs], 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] [set path to SLANG library @<:@default=/usr/lib@:>@; make sense only if --with-screen=slang]
), ),
[ac_slang_lib_path="$withval"], [ac_slang_lib_path="$withval"],

View File

@ -2,7 +2,7 @@ dnl CPIO filesystem support
AC_DEFUN([AC_MC_VFS_CPIOFS], AC_DEFUN([AC_MC_VFS_CPIOFS],
[ [
AC_ARG_ENABLE([vfs-cpio], 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 if test "$enable_vfs" = "yes" -a x"$enable_vfs_cpio" != x"no"; then
enable_vfs_cpio="yes" enable_vfs_cpio="yes"
AC_DEFINE([ENABLE_VFS_CPIO], [1], [Support for cpio filesystem]) AC_DEFINE([ENABLE_VFS_CPIO], [1], [Support for cpio filesystem])

View File

@ -23,7 +23,7 @@ dnl Enable Extfs (classic)
AC_DEFUN([AC_MC_VFS_EXTFS], AC_DEFUN([AC_MC_VFS_EXTFS],
[ [
AC_ARG_ENABLE([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 if test "$enable_vfs" = "yes" -a x"$enable_vfs_extfs" != x"no"; then
AC_MC_EXTFS_CHECKS AC_MC_EXTFS_CHECKS
enable_vfs_extfs="yes" enable_vfs_extfs="yes"

View File

@ -2,7 +2,7 @@ dnl Enable FISH protocol (classic)
AC_DEFUN([AC_MC_VFS_FISH], AC_DEFUN([AC_MC_VFS_FISH],
[ [
AC_ARG_ENABLE([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 if test "$enable_vfs" = "yes" -a "x$enable_vfs_fish" != xno; then
enable_vfs_fish="yes" enable_vfs_fish="yes"
AC_MC_VFS_ADDNAME([fish]) AC_MC_VFS_ADDNAME([fish])

View File

@ -2,7 +2,7 @@ dnl Enable FTP filesystem (classic)
AC_DEFUN([AC_MC_VFS_FTP], AC_DEFUN([AC_MC_VFS_FTP],
[ [
AC_ARG_ENABLE([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 if test "$enable_vfs" != "no" -a x"$enable_vfs_ftp" != x"no"; then
enable_vfs_ftp="yes" enable_vfs_ftp="yes"
AC_MC_VFS_ADDNAME([ftp]) AC_MC_VFS_ADDNAME([ftp])

View File

@ -2,7 +2,7 @@ dnl Samba support
AC_DEFUN([AC_MC_VFS_SMB], AC_DEFUN([AC_MC_VFS_SMB],
[ [
AC_ARG_ENABLE([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 if test "x$enableval" = "xno"; then
enable_vfs_smb=no enable_vfs_smb=no

View File

@ -2,7 +2,7 @@ dnl SFS support
AC_DEFUN([AC_MC_VFS_SFS], AC_DEFUN([AC_MC_VFS_SFS],
[ [
AC_ARG_ENABLE([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 if test "$enable_vfs" = "yes" -a x"$enable_vfs_sfs" != x"no"; then
enable_vfs_sfs="yes" enable_vfs_sfs="yes"
AC_MC_VFS_ADDNAME([sfs]) AC_MC_VFS_ADDNAME([sfs])

View File

@ -2,7 +2,7 @@ dnl TAR filesystem support
AC_DEFUN([AC_MC_VFS_TARFS], AC_DEFUN([AC_MC_VFS_TARFS],
[ [
AC_ARG_ENABLE([vfs-tar], 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 if test "$enable_vfs" = "yes" -a x"$enable_vfs_tar" != x"no"; then
enable_vfs_tar="yes" enable_vfs_tar="yes"
AC_MC_VFS_ADDNAME([tar]) AC_MC_VFS_ADDNAME([tar])

View File

@ -22,8 +22,8 @@ AC_DEFUN([MC_UNDELFS_CHECKS], [
if test x"$ext2fs_ext2fs_h" = xyes; then if test x"$ext2fs_ext2fs_h" = xyes; then
ext2fs_undel=yes ext2fs_undel=yes
EXT2FS_UNDEL_LIBS="-lext2fs -lcom_err" EXT2FS_UNDEL_LIBS="-lext2fs -lcom_err"
AC_CHECK_TYPE(ext2_ino_t, , AC_CHECK_TYPE([ext2_ino_t], ,
[AC_DEFINE(ext2_ino_t, ino_t, [AC_DEFINE_UNQUOTED([ext2_ino_t], [ino_t],
[Define to ino_t if undefined.])], [Define to ino_t if undefined.])],
[ [
#include <errno.h> #include <errno.h>
@ -48,7 +48,7 @@ dnl
AC_DEFUN([AC_MC_VFS_UNDELFS], AC_DEFUN([AC_MC_VFS_UNDELFS],
[ [
AC_ARG_ENABLE([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 if test "x$enableval" = "xno"; then
enable_vfs_undelfs=no enable_vfs_undelfs=no

View File

@ -16,7 +16,7 @@ XGETTEXT=xgettext
MSGMERGE=msgmerge MSGMERGE=msgmerge
files=`find . -name '*.[ch]' | xargs $XGETTEXT $XGETTEXT_OPTIONS --output=- | \ 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=. \ $XGETTEXT --default-domain=$DOMAIN --directory=. \
--add-comments=TRANSLATORS: $XGETTEXT_OPTIONS \ --add-comments=TRANSLATORS: $XGETTEXT_OPTIONS \