1
0
mirror of https://github.com/nmap/nmap.git synced 2026-01-09 16:09:03 +00:00

Add --enable-nls and --disable-nls options to configure. These are used

to control whether translations of man pages are installed (by default
they will be). Even though we're not using gettext for translations, I
tried to make this interface as similar as possible to the gettext
configuration interface. Use can use the environment variable LINGUAS to
control which man pages get installed if you don't want all of them, for
example LINGUAS="es de". The translated man pages are not yet committed.
This commit is contained in:
david
2009-11-05 19:50:33 +00:00
parent 02625c9677
commit 6b87459a58
4 changed files with 76 additions and 0 deletions

View File

@@ -51,6 +51,16 @@ LIBS = @LIBNBASE_LIBS@ @LIBNSOCK_LIBS@ @LIBPCRE_LIBS@ @LIBPCAP_LIBS@ @OPENSSL_L
INSTALL = @INSTALL@
# MAKEDEPEND = @MAKEDEPEND@
export RPMTDIR=$(HOME)/rpm
# Whether the user wants to install translated man pages. If "yes", then
# all translated man pages are installed, unless a subset is specified
# with the LINGUAS environment variable.
USE_NLS = @USE_NLS@
# A space-separated list of language codes supported (for man page
# installation). The user can install a subset of these with the LINGUAS
# environment variable or none of them with --disable-nls.
ALL_LINGUAS =
# A space-separated list of language codes requested by the user.
LINGUAS ?= $(ALL_LINGUAS)
# DESTDIR is used by some package maintainers to install Nmap under
@@ -203,6 +213,12 @@ install-nmap: $(TARGET)
# http://seclists.org/nmap-dev/2007/q4/0272.html.
$(STRIP) -x $(DESTDIR)$(bindir)/nmap
$(INSTALL) -c -m 644 docs/$(TARGET).1 $(DESTDIR)$(mandir)/man1/
if [ "$(USE_NLS)" = "yes" ]; then \
for ll in $(LINGUAS); do \
$(INSTALL) -d $(DESTDIR)$(mandir)/$$ll/man1; \
$(INSTALL) -c -m 644 docs/$(TARGET)-$$ll.1 $(DESTDIR)$(mandir)/$$ll/man1/$(TARGET).1; \
done; \
fi
$(INSTALL) -c -m 644 docs/nmap.xsl $(DESTDIR)$(nmapdatadir)/
$(INSTALL) -c -m 644 docs/nmap.dtd $(DESTDIR)$(nmapdatadir)/
$(INSTALL) -c -m 644 nmap-services $(DESTDIR)$(nmapdatadir)/
@@ -277,6 +293,7 @@ uninstall: uninstall-nmap $(UNINSTALLZENMAP) @NCAT_UNINSTALL@
uninstall-nmap:
rm -f $(DESTDIR)$(bindir)/$(TARGET)
rm -f $(DESTDIR)$(mandir)/man1/$(TARGET).1
rm -f $(DESTDIR)$(mandir)/*/man1/$(TARGET).1
rm -rf $(DESTDIR)$(nmapdatadir)
uninstall-zenmap:

32
aclocal.m4 vendored
View File

@@ -11,6 +11,38 @@
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
# nls.m4 serial 3 (gettext-0.15)
dnl Copyright (C) 1995-2003, 2005-2006 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
dnl
dnl This file can can be used in projects which are not available under
dnl the GNU General Public License or the GNU Library General Public
dnl License but which still want to provide support for the GNU gettext
dnl functionality.
dnl Please note that the actual code of the GNU gettext library is covered
dnl by the GNU Library General Public License, and the rest of the GNU
dnl gettext package package is covered by the GNU General Public License.
dnl They are *not* in the public domain.
dnl Authors:
dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003.
AC_PREREQ(2.50)
AC_DEFUN([AM_NLS],
[
AC_MSG_CHECKING([whether NLS is requested])
dnl Default is enabled NLS
AC_ARG_ENABLE(nls,
[ --disable-nls do not use Native Language Support],
USE_NLS=$enableval, USE_NLS=yes)
AC_MSG_RESULT($USE_NLS)
AC_SUBST(USE_NLS)
])
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008, 2009
# Free Software Foundation, Inc.
#

23
configure vendored
View File

@@ -724,6 +724,7 @@ build_cpu
build
pcredir
libpcapdir
USE_NLS
target_alias
host_alias
build_alias
@@ -764,6 +765,7 @@ SHELL'
ac_subst_files=''
ac_user_opts='
enable_option_checking
enable_nls
with_localdirs
with_ndiff
with_zenmap
@@ -1412,6 +1414,12 @@ if test -n "$ac_init_help"; then
cat <<\_ACEOF
Optional Features:
--disable-option-checking ignore unrecognized --enable/--with options
--disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
--enable-FEATURE[=ARG] include FEATURE [ARG=yes]
--disable-nls do not use Native Language Support
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
--without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
@@ -1894,6 +1902,21 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
{ $as_echo "$as_me:$LINENO: checking whether NLS is requested" >&5
$as_echo_n "checking whether NLS is requested... " >&6; }
# Check whether --enable-nls was given.
if test "${enable_nls+set}" = set; then
enableval=$enable_nls; USE_NLS=$enableval
else
USE_NLS=yes
fi
{ $as_echo "$as_me:$LINENO: result: $USE_NLS" >&5
$as_echo "$USE_NLS" >&6; }
# Check whether --with-localdirs was given.
if test "${with_localdirs+set}" = set; then
withval=$with_localdirs; case "$with_localdirs" in

View File

@@ -4,6 +4,10 @@ AC_PREREQ(2.13)
dnl Process this file with autoconf to produce a configure script.
AC_INIT(nmap.cc)
dnl Give us the --enable-nls option, to choose which translated man pages get
dnl installed. This gets replaced with AM_GNU_GETTEXT for full gettext support.
AM_NLS
AC_ARG_WITH(localdirs,
AC_HELP_STRING([--with-localdirs], [Explicitly ask compiler to use /usr/local/{include,libs} if they exist ]),
[ case "$with_localdirs" in