Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

modernize a little autotools #43

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/ccpp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: install deps
run: sudo apt-get update && sudo apt-get upgrade && sudo apt-get install autopoint
run: sudo apt-get update && sudo apt-get upgrade && sudo apt-get install gettext autoconf autopoint
- name: autogen
run: ./autogen.sh
- name: install build deps
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/i18n.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Installing tools
run: sudo apt-get install gettext
run: sudo apt-get install gettext autoconf autopoint

- name: Checking .po files
run: |
Expand Down
31 changes: 31 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Files created by the auto* tools
ABOUT-NLS
INSTALL
aclocal.m4
autom4te.cache/
compile
Expand Down Expand Up @@ -72,3 +73,33 @@ platforms/Windows/*/libs/libGeoIP/GeoIP_X.c
# User files (should go into .git/info/exclude)
Makefile.user
*.vcxproj.user

config/
m4/codeset.m4
m4/gettext.m4
m4/glibc21.m4
m4/iconv.m4
m4/intdiv0.m4
m4/inttypes-pri.m4
m4/inttypes.m4
m4/inttypes_h.m4
m4/isc-posix.m4
m4/lcmessage.m4
m4/lib-ld.m4
m4/lib-link.m4
m4/lib-prefix.m4
m4/progtest.m4
m4/stdint_h.m4
m4/uintmax_t.m4
m4/ulonglong.m4
m4/po.m4
m4/nls.m4
po/Makevars.template
po/Makefile.in.in
po/Rules-quot
po/boldquot.sed
po/[email protected]
po/[email protected]
po/insert-header.sin
po/quot.sed
po/remove-potcdate.sin
File renamed without changes.
File renamed without changes.
File renamed without changes.
Empty file added NEWS
Empty file.
File renamed without changes.
49 changes: 20 additions & 29 deletions autogen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,24 +38,24 @@ fi
# Force intl regeneration to get last update from installed gettext templates
rm -rf intl/*
#if [ ! -d intl ]; then
echo "Setting up internationalization files."
autopoint --force
if grep -q datarootdir po/Makefile.in.in; then
echo autopoint honors dataroot variable, not patching.
else
echo autopoint does not honor dataroot variable, patching.
sed -e '/^datadir *=/a\
datarootdir = @datarootdir@' po/Makefile.in.in > po/Makefile.in.in.tmp && mv -f po/Makefile.in.in.tmp po/Makefile.in.in
sed -e '/^datadir *=/a\
datarootdir = @datarootdir@' intl/Makefile.in > intl/Makefile.in.tmp && mv -f intl/Makefile.in.tmp intl/Makefile.in
fi
UNAME=`uname`
if [ x$UNAME = x"Darwin" ]; then
echo Not patching po/Makefile.in.in - sed is too old.
else
sed -e '/^clean:/a\
rm -f *.gmo' po/Makefile.in.in > po/Makefile.in.in.tmp && mv -f po/Makefile.in.in.tmp po/Makefile.in.in
fi
# echo "Setting up internationalization files."
# autopoint --force
# if grep -q datarootdir po/Makefile.in.in; then
# echo autopoint honors dataroot variable, not patching.
# else
# echo autopoint does not honor dataroot variable, patching.
# sed -e '/^datadir *=/a\
#datarootdir = @datarootdir@' po/Makefile.in.in > po/Makefile.in.in.tmp && mv -f po/Makefile.in.in.tmp po/Makefile.in.in
# sed -e '/^datadir *=/a\
#datarootdir = @datarootdir@' intl/Makefile.in > intl/Makefile.in.tmp && mv -f intl/Makefile.in.tmp intl/Makefile.in
# fi
#UNAME=`uname`
#if [ x$UNAME = x"Darwin" ]; then
# echo Not patching po/Makefile.in.in - sed is too old.
#else
# sed -e '/^clean:/a\
# rm -f *.gmo' po/Makefile.in.in > po/Makefile.in.in.tmp && mv -f po/Makefile.in.in.tmp po/Makefile.in.in
#fi
# if [ -f Makefile -a -x config.status ]; then
# CONFIG_FILES=intl/Makefile CONFIG_HEADERS= /bin/sh ./config.status
# fi
Expand All @@ -65,20 +65,11 @@ fi
# cp -f configure.ac~ configure.ac
#fi

echo "Running aclocal -I m4"
aclocal -I m4

echo "Running autoheader"
autoheader

echo "Running autoconf"
autoconf

echo "Creating pixmaps Makefile.am"
OLDPWD="`pwd`"
cd src/pixmaps/flags_xpm
./makeflags.sh
cd "$OLDPWD"

echo "Running automake --foreign -a -c -f"
automake --foreign -a -c -f
echo "Running autoreconf --install"
autoreconf --install
25 changes: 19 additions & 6 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,11 @@
#

AC_INIT([aMule],[SVN],[[email protected]])
AM_INIT_AUTOMAKE
AC_CONFIG_AUX_DIR([config])
AM_INIT_AUTOMAKE([subdir-objects])
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES])

AC_PREREQ(2.62)
AC_PREREQ([2.62])

AC_CONFIG_SRCDIR([src/amule.cpp])
AC_CONFIG_HEADERS([config.h])
Expand Down Expand Up @@ -253,7 +254,11 @@ MULE_IF_ENABLED_ANY([monolithic, amule-daemon, amule-gui, amulecmd, webserver],
# Checks for header files.
AC_FUNC_ALLOCA
AC_HEADER_DIRENT
AC_HEADER_STDC
# Autoupdate added the next two lines to ensure that your configure
# script's behavior did not change. They are probably safe to remove.
AC_CHECK_INCLUDES_DEFAULT
AC_PROG_EGREP

AC_CHECK_HEADERS([argz.h arpa/inet.h errno.h fcntl.h inttypes.h langinfo.h libintl.h limits.h locale.h malloc.h mntent.h netdb.h netinet/in.h stddef.h nl_types.h signal.h stdint.h stdio_ext.h stdlib.h string.h strings.h sys/ioctl.h sys/mntent.h sys/mnttab.h sys/mount.h sys/param.h sys/resource.h sys/select.h sys/socket.h sys/statvfs.h sys/time.h sys/timeb.h sys/types.h unistd.h])
AC_HEADER_SYS_WAIT

Expand All @@ -262,7 +267,14 @@ AC_HEADER_SYS_WAIT
AC_TYPE_MODE_T
AC_TYPE_OFF_T
AC_TYPE_SIZE_T
AC_HEADER_TIME
AC_CHECK_HEADERS_ONCE([sys/time.h])
# Obsolete code to be removed.
if test $ac_cv_header_sys_time_h = yes; then
AC_DEFINE([TIME_WITH_SYS_TIME],[1],[Define to 1 if you can safely include both <sys/time.h>
and <time.h>. This macro is obsolete.])
fi
# End of obsolete code.

AC_STRUCT_TM
AC_TYPE_UID_T
AC_CHECK_TYPES([ptrdiff_t])
Expand All @@ -279,8 +291,9 @@ AS_IF([test x$SYS != xwin32], [
])
AC_FUNC_MEMCMP
AC_FUNC_SELECT_ARGTYPES
AC_FUNC_SETVBUF_REVERSED
AC_TYPE_SIGNAL
AC_DEFINE_UNQUOTED([RETSIGTYPE],[$ac_cv_type_signal],[Define as the return type of signal handlers
(`int' or `void').])

AC_FUNC_STAT
AC_FUNC_STRFTIME
AC_FUNC_STRTOD
Expand Down
Loading