jonasob / jwhois

GNU General Public License v3.0
55 stars 23 forks source link

Build procedure appears to have broken on recent Linux. #22

Open garethrandall opened 9 years ago

garethrandall commented 9 years ago

I am attempting to update the build process for jwhois to work on recent systems (I am using Ubuntu 14.04). The code does not build successfully as checked out from git. I can offer some patches but perhaps you know how to get it working from here.

In particular, are there any files missing, such as m4/Makefile.in? Why does autogen.sh corrupt configure.ac (see end)?

(I can offer the following as a git pull request if this would help.)

My build procedure so far is: $ git clone https://github.com/jonasob/jwhois.git $ cd jwhois

// Edit autogen.sh to work with most recent automake-1.14 (quick hack). Change as follows:

$ git diff
diff --git a/autogen.sh b/autogen.sh
index 3f7fc9e..879abbc 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -247,7 +247,7 @@ case $REQUIRED_AUTOMAKE_VERSION in
 1.6*) automake_progs="automake-1.6 automake-1.7 automake-1.8 automake-1.9" ;;
 1.7*) automake_progs="automake-1.7 automake-1.8 automake-1.9" ;;
 1.8*) automake_progs="automake-1.8 automake-1.9" ;;
-    1.9*) automake_progs="automake-1.9" ;;
+    1.9*) automake_progs="automake-1.9 automake-1.14" ;;
 esac
 version_check automake AUTOMAKE "$automake_progs" $REQUIRED_AUTOMAKE_VERSION \
     "http://ftp.gnu.org/pub/gnu/automake/automake-$REQUIRED_AUTOMAKE_VERSION.tar.gz" ||  DIE=1

// Remove a deprecation warning by renaming configure.in: $ git mv configure.in configure.ac

// Edit configure.ac to remove deprecation warnings. (Changes as follows).

$ git diff configure.ac
diff --git a/configure.ac b/configure.ac
index f1cdd10..119abf3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -17,10 +17,9 @@ dnl Process this file with autoconf to produce a configure script.
 ## along with this program; if not, write to the Free Software
 ## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 ##
-AC_INIT
+AC_INIT([jwhois], [4.0])
 AC_CONFIG_SRCDIR([src/jconfig.c])
-AM_INIT_AUTOMAKE(jwhois,4.0)
-AM_CONFIG_HEADER(config.h)
+AM_INIT_AUTOMAKE

 AH_TEMPLATE([PACKAGE], [package name])
 AH_TEMPLATE([VERSION], [package version])

Then run: $ ./autogen.sh

configure.ac:210: error: `po/Makefile.in' is already registered with AC_CONFIG_FILES.
../../lib/autoconf/status.m4:288: AC_CONFIG_FILES is expanded from...
configure.ac:210: the top level
autom4te: /usr/bin/m4 failed with exit status: 1
aclocal-1.14: error: echo failed with exit status: 1

It turns out that autogen.sh has duplicated the po/Makefile.in reference in configure.ac. -AC_OUTPUT([ po/Makefile.in m4/Makefile +AC_OUTPUT([ po/Makefile.in m4/Makefile po/Makefile.in

Is this a bug in autogen.sh?