aboutsummaryrefslogtreecommitdiffstats
path: root/conf
diff options
context:
space:
mode:
authorFritz Elfert <felfert@to.com>2001-03-01 00:08:20 +0000
committerFritz Elfert <felfert@to.com>2001-03-01 00:08:20 +0000
commitd8ae774198cf180fcaa4a2512dd94b4dbfdfd72d (patch)
tree2726deb32ce6ce1cc2cbb6c19644ea4eac3b772e /conf
parent525e42374b0d22fb5529a2c8f39d27d4b542583c (diff)
downloadplptools-d8ae774198cf180fcaa4a2512dd94b4dbfdfd72d.tar.gz
plptools-d8ae774198cf180fcaa4a2512dd94b4dbfdfd72d.tar.bz2
plptools-d8ae774198cf180fcaa4a2512dd94b4dbfdfd72d.zip
Modified am_edit to handle GNU-gettext generated Makefiles.
Added NLS related m4 macros.
Diffstat (limited to 'conf')
-rw-r--r--conf/am_edit5
-rw-r--r--conf/m4/kde/AM_KDE_GNU_GETTEXT.m469
-rw-r--r--conf/m4/kde/AM_KDE_WITH_NLS.m460
-rw-r--r--conf/m4/kde/AM_PATH_PROG_WITH_TEST_KDE.m443
4 files changed, 175 insertions, 2 deletions
diff --git a/conf/am_edit b/conf/am_edit
index f400ce9..e648033 100644
--- a/conf/am_edit
+++ b/conf/am_edit
@@ -1237,9 +1237,10 @@ sub tag_POFILES ()
else
{
$tmp =~ s/\034/ /g;
+ $tmp =~ s/\@POFILES\@//g;
$pofiles = $tmp;
}
- return 1 if (!$pofiles); # Nothing to do
+ return 1 if ($pofiles =~ /^[ \t]*$/); # Nothing to do
handle_POFILES($pofiles, $kdelang);
@@ -1701,7 +1702,7 @@ sub updateMakefile ()
open (FILEOUT, "> $makefile")
|| die "Could not create $makefile: $!\n";
- print FILEOUT "\# $progId - " . '$Revision: 1.208 $ ' . "\n";
+ print FILEOUT "\# $progId - " . '$Revision: 1.1 $ ' . "\n";
$MakefileData =~ s/\034/\\\n/g; # Restore continuation lines
print FILEOUT $MakefileData;
close FILEOUT;
diff --git a/conf/m4/kde/AM_KDE_GNU_GETTEXT.m4 b/conf/m4/kde/AM_KDE_GNU_GETTEXT.m4
new file mode 100644
index 0000000..79c0a15
--- /dev/null
+++ b/conf/m4/kde/AM_KDE_GNU_GETTEXT.m4
@@ -0,0 +1,69 @@
+# Macro to add for using GNU gettext.
+# Ulrich Drepper <drepper@cygnus.com>, 1995.
+
+# serial 1
+# Stephan Kulow: I put a KDE in it to avoid name conflicts
+
+AC_DEFUN(AM_KDE_GNU_GETTEXT,
+ [AC_REQUIRE([AC_PROG_MAKE_SET])dnl
+ AC_REQUIRE([AC_PROG_RANLIB])dnl
+ AC_REQUIRE([AC_HEADER_STDC])dnl
+ AC_REQUIRE([AC_C_INLINE])dnl
+ AC_REQUIRE([AC_TYPE_OFF_T])dnl
+ AC_REQUIRE([AC_TYPE_SIZE_T])dnl
+ AC_REQUIRE([AC_FUNC_ALLOCA])dnl
+ AC_REQUIRE([AC_FUNC_MMAP])dnl
+ AC_REQUIRE([AM_KDE_WITH_NLS])dnl
+ AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h string.h \
+unistd.h values.h alloca.h])
+ AC_CHECK_FUNCS([getcwd munmap putenv setenv setlocale strchr strcasecmp \
+__argz_count __argz_stringify __argz_next])
+
+ AC_MSG_CHECKING(for stpcpy)
+ AC_CACHE_VAL(kde_cv_func_stpcpy,
+ [
+ kde_safe_cxxflags=$CXXFLAGS
+ CXXFLAGS="-Wmissing-prototypes -Werror"
+ AC_LANG_SAVE
+ AC_LANG_CPLUSPLUS
+ AC_TRY_COMPILE([
+ #include <string.h>
+ ],
+ [
+ char buffer[200];
+ stpcpy(buffer, buffer);
+ ],
+ kde_cv_func_stpcpy=yes,
+ kde_cv_func_stpcpy=no)
+ AC_LANG_RESTORE
+ CXXFLAGS=$kde_safe_cxxflags
+ ])
+ AC_MSG_RESULT($kde_cv_func_stpcpy)
+ if eval "test \"`echo $kde_cv_func_stpcpy`\" = yes"; then
+ AC_DEFINE(HAVE_STPCPY, 1, [Define if you have stpcpy])
+ fi
+
+ AM_LC_MESSAGES
+
+ if test "x$CATOBJEXT" != "x"; then
+ if test "x$ALL_LINGUAS" = "x"; then
+ LINGUAS=
+ else
+ AC_MSG_CHECKING(for catalogs to be installed)
+ NEW_LINGUAS=
+ for lang in ${LINGUAS=$ALL_LINGUAS}; do
+ case "$ALL_LINGUAS" in
+ *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
+ esac
+ done
+ LINGUAS=$NEW_LINGUAS
+ AC_MSG_RESULT($LINGUAS)
+ fi
+
+ dnl Construct list of names of catalog files to be constructed.
+ if test -n "$LINGUAS"; then
+ for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
+ fi
+ fi
+
+ ])
diff --git a/conf/m4/kde/AM_KDE_WITH_NLS.m4 b/conf/m4/kde/AM_KDE_WITH_NLS.m4
new file mode 100644
index 0000000..27e5b8c
--- /dev/null
+++ b/conf/m4/kde/AM_KDE_WITH_NLS.m4
@@ -0,0 +1,60 @@
+dnl This is a merge of some macros out of the gettext aclocal.m4
+dnl since we don't need anything, I took the things we need
+dnl the copyright for them is:
+dnl >
+dnl Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
+dnl This Makefile.in 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 This program is distributed in the hope that it will be useful,
+dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+dnl PARTICULAR PURPOSE.
+dnl >
+dnl for this file it is relicensed under LGPL
+
+AC_DEFUN(AM_KDE_WITH_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)
+
+ dnl If we use NLS figure out what method
+ if test "$USE_NLS" = "yes"; then
+ AC_DEFINE(ENABLE_NLS, 1, [Define if NLS is requested])
+
+ AM_PATH_PROG_WITH_TEST_KDE(MSGFMT, msgfmt,
+ [test -n "`$ac_dir/$ac_word --version 2>&1 | grep 'GNU gettext'`"], msgfmt)
+ AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
+
+ if test -z "`$GMSGFMT --version 2>&1 | grep 'GNU gettext'`"; then
+ AC_MSG_RESULT([found msgfmt program is not GNU msgfmt; ignore it])
+ GMSGFMT=":"
+ fi
+ MSGFMT=$GMSGFMT
+ AC_SUBST(GMSGFMT)
+ AC_SUBST(MSGFMT)
+
+ AM_PATH_PROG_WITH_TEST_KDE(XGETTEXT, xgettext,
+ [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
+
+ dnl Test whether we really found GNU xgettext.
+ if test "$XGETTEXT" != ":"; then
+ dnl If it is no GNU xgettext we define it as : so that the
+ dnl Makefiles still can work.
+ if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
+ : ;
+ else
+ AC_MSG_RESULT(
+ [found xgettext programs is not GNU xgettext; ignore it])
+ XGETTEXT=":"
+ fi
+ fi
+ AC_SUBST(XGETTEXT)
+ fi
+
+ ])
diff --git a/conf/m4/kde/AM_PATH_PROG_WITH_TEST_KDE.m4 b/conf/m4/kde/AM_PATH_PROG_WITH_TEST_KDE.m4
new file mode 100644
index 0000000..511fcb3
--- /dev/null
+++ b/conf/m4/kde/AM_PATH_PROG_WITH_TEST_KDE.m4
@@ -0,0 +1,43 @@
+# Search path for a program which passes the given test.
+# Ulrich Drepper <drepper@cygnus.com>, 1996.
+
+# serial 1
+# Stephan Kulow: I appended a _KDE against name conflicts
+
+dnl AM_PATH_PROG_WITH_TEST_KDE(VARIABLE, PROG-TO-CHECK-FOR,
+dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
+AC_DEFUN(AM_PATH_PROG_WITH_TEST_KDE,
+[# Extract the first word of "$2", so it can be a program name with args.
+set dummy $2; ac_word=[$]2
+AC_MSG_CHECKING([for $ac_word])
+AC_CACHE_VAL(ac_cv_path_$1,
+[case "[$]$1" in
+ /*)
+ ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
+ ;;
+ *)
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+ for ac_dir in ifelse([$5], , $PATH, [$5]); do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ if [$3]; then
+ ac_cv_path_$1="$ac_dir/$ac_word"
+ break
+ fi
+ fi
+ done
+ IFS="$ac_save_ifs"
+dnl If no 4th arg is given, leave the cache variable unset,
+dnl so AC_PATH_PROGS will keep looking.
+ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
+])dnl
+ ;;
+esac])dnl
+$1="$ac_cv_path_$1"
+if test -n "[$]$1"; then
+ AC_MSG_RESULT([$]$1)
+else
+ AC_MSG_RESULT(no)
+fi
+AC_SUBST($1)dnl
+])