Skip to content

Commit bc71f47

Browse files
committed
Some improvements in autotools
But couldn't find how put translations working with intltoolize ...
1 parent 88aa023 commit bc71f47

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+71167
-66612
lines changed

Makefile.am

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
SUBDIRS =
22

33
if COMPILE_NLS
4-
SUBDIRS += intl po
4+
SUBDIRS += po
55
endif
66

77
SUBDIRS += docs src unittests

autogen.sh

Lines changed: 3 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/sh
22
# Helps bootstrapping 'aMule' when checked out from the source control system.
3-
# Requires GNU autoconf, GNU automake and GNU which.
3+
# Requires GNU autoconf, GNU automake, intltool and GNU which.
44

55
WANT_AUTOMAKE="1.9"
66
export WANT_AUTOMAKE
@@ -24,61 +24,11 @@ if expr "$WANT_AUTOMAKE" \> "$automake_version" >/dev/null; then
2424
exit 1
2525
fi
2626

27-
# Determine version of gettext.
28-
gettext_version=`gettext --version | head -n 1 | sed -e 's/[^0]*\(0\.[0-9][^ ]*\).*/\1/'`
29-
confver=`cat configure.in | grep '^AM_GNU_GETTEXT_VERSION(' | sed -e 's/^AM_GNU_GETTEXT_VERSION(\([^()]*\))/\1/p' | sed -e 's/^\[\(.*\)\]$/\1/' | sed -e 1q`
30-
31-
# Require version as specified in configure.in.
32-
if expr "$confver" \> "$gettext_version" >/dev/null; then
33-
gettext --version | head -n 1
34-
echo "Fatal error: gettext version "$confver" or higher is required."
35-
exit 1
36-
fi
37-
38-
# Force intl regenration to get last update from installed gettext templates
39-
rm -rf intl/*
40-
#if [ ! -d intl ]; then
41-
echo "Setting up internationalization files."
42-
autopoint --force
43-
if grep -q datarootdir po/Makefile.in.in; then
44-
echo autopoint honors dataroot variable, not patching.
45-
else
46-
echo autopoint does not honor dataroot variable, patching.
47-
sed -e '/^datadir *=/a\
48-
datarootdir = @datarootdir@' po/Makefile.in.in > po/Makefile.in.in.tmp && mv -f po/Makefile.in.in.tmp po/Makefile.in.in
49-
sed -e '/^datadir *=/a\
50-
datarootdir = @datarootdir@' intl/Makefile.in > intl/Makefile.in.tmp && mv -f intl/Makefile.in.tmp intl/Makefile.in
51-
fi
52-
UNAME=`uname`
53-
if [ x$UNAME = x"Darwin" ]; then
54-
echo Not patching po/Makefile.in.in - sed is too old.
55-
else
56-
sed -e '/^clean:/a\
57-
rm -f *.gmo' po/Makefile.in.in > po/Makefile.in.in.tmp && mv -f po/Makefile.in.in.tmp po/Makefile.in.in
58-
fi
59-
# if [ -f Makefile -a -x config.status ]; then
60-
# CONFIG_FILES=intl/Makefile CONFIG_HEADERS= /bin/sh ./config.status
61-
# fi
62-
# gettextize --intl -f --no-changelog
63-
# echo "restoring Makefile.am and configure.in"
64-
# cp -f Makefile.am~ Makefile.am
65-
# cp -f configure.in~ configure.in
66-
#fi
67-
68-
echo "Running aclocal -I m4"
69-
aclocal -I m4
70-
71-
echo "Running autoheader"
72-
autoheader
73-
74-
echo "Running autoconf"
75-
autoconf
76-
7727
echo "Creating pixmaps Makefile.am"
7828
OLDPWD="`pwd`"
7929
cd src/pixmaps/flags_xpm
8030
./makeflags.sh
8131
cd "$OLDPWD"
8232

83-
echo "Running automake --foreign -a -c -f"
84-
automake --foreign -a -c -f
33+
echo "Running autoreconf --install"
34+
autoreconf --install

configure.in renamed to configure.ac

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
#
2626

2727
AC_INIT([aMule],[SVN],[admin@amule.org])
28-
AM_INIT_AUTOMAKE
28+
AM_INIT_AUTOMAKE([subdir-objects foreign])
2929
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES])
3030

3131
AC_PREREQ(2.59)
@@ -75,7 +75,7 @@ MULE_ARG_ENABLE([webserver], [no], [compile aMule WebServer], [WEB])
7575
MULE_ARG_ENABLE([amule-gui], [no], [compile aMule remote GUI], [AMULE_GUI])
7676
MULE_ARG_ENABLE([cas], [no], [compile C aMule Statistics], [CAS])
7777
MULE_ARG_ENABLE([wxcas], [no], [compile aMule GUI Statistics], [WXCAS])
78-
MULE_ARG_ENABLE([ed2k], [yes], [don't compile aMule ed2k links handler], [ED2K])
78+
MULE_ARG_ENABLE([ed2k], [yes], [dont compile aMule ed2k links handler], [ED2K])
7979
MULE_ARG_ENABLE([alc], [no], [compile aMuleLinkCreator GUI version], [ALC])
8080
MULE_ARG_ENABLE([alcc], [no], [compile aMuleLinkCreator for console], [ALCC])
8181
MULE_ARG_ENABLE([xas], [no], [install xas XChat2 plugin], [XAS])
@@ -94,7 +94,7 @@ QT_CONFIG_OPTIONS
9494
AC_ARG_WITH(
9595
[gnu-malloc],
9696
[AS_HELP_STRING([--without-gnu-malloc],
97-
[Don't assume that we use GNU libc compatible malloc/realloc when cross-compiling])],
97+
[Dont assume that we use GNU libc compatible malloc/realloc when cross-compiling])],
9898
[gnumalloc=$withval], [gnumalloc=yes])
9999

100100

@@ -331,6 +331,11 @@ AC_LANG_POP([C++])
331331
dnl Sets gettext version.
332332
dnl AM_GNU_GETTEXT_VERSION *must not* be moved away from configure.in!
333333
AM_GNU_GETTEXT_VERSION(0.11.5)
334+
AM_GNU_GETTEXT([external])
335+
#IT_PROG_INTLTOOL
336+
#GETTEXT_PACKAGE="amule"
337+
#AC_SUBST(GETTEXT_PACKAGE)
338+
#AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE",[Translation domain used])
334339
MULE_CHECK_NLS
335340
AC_LANG_PUSH([C++])
336341

@@ -465,7 +470,6 @@ dnl Generate the Makefiles
465470
AC_CONFIG_FILES([Makefile
466471
docs/Makefile
467472
docs/man/Makefile
468-
intl/Makefile
469473
po/Makefile.in
470474
src/Makefile
471475
src/pixmaps/Makefile

m4/nls.m4

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,6 @@ AC_DEFUN([MULE_CHECK_NLS],
8282
[Specify a comma-separated list of languages you want to have installed. See po/LINGUAS for available languages])],
8383
[AS_IF([test "$withval" != "all"], [LINGUAS="`echo $withval | sed -e 's/,/ /g'`"])])
8484
85-
AM_GNU_GETTEXT([no-libtool], [need-ngettext])
8685
AS_IF([test $USE_INCLUDED_LIBINTL = yes], [INCINTL=-I\${top_builddir}/intl])
8786
8887
AS_IF([test x$USE_NLS = xyes], [MULE_CHECK_AUTOPOINT(, [USE_NLS=no])])

0 commit comments

Comments
 (0)