]> git.draconx.ca Git - gob-dx.git/blobdiff - configure.ac
Modernize build system a bit.
[gob-dx.git] / configure.ac
index 543a4c0f44d4057f36ad6996cc61b35ed015441f..8e7a1f0a7884fd1314cbffb8b74941af1bcd1fb4 100644 (file)
@@ -1,62 +1,27 @@
-dnl Process this file with autoconf to produce a configure script.
-AC_INIT([gob2], [2.0.20])
-AC_CONFIG_SRCDIR([src/treefuncs.h])
-AM_INIT_AUTOMAKE([dist-xz])
-
-AM_CONFIG_HEADER(config.h)
-AM_MAINTAINER_MODE
-
-GLIB_REQUIRED=2.4.0
-
+dnl Copyright © 2019 Nick Bowler
 dnl
-dnl  An utter hack to allow embedding of gob inside other packages.
-dnl  if a file is found in the parent directory named NOINST_GOB, then
-dnl  gob is not installed
+dnl Based on original work Copyright © 1999-2013 Jiri (George) Lebl.
 dnl
+dnl License GPLv2+: GNU General Public License version 2 or any later version.
+dnl This is free software: you are free to change and redistribute it.
+dnl There is NO WARRANTY, to the extent permitted by law.
 
-AM_CONDITIONAL(NOINSTGOB, test -f ../NOINST_GOB)
+AC_INIT([gob-dx], [2.0.20a], [nbowler@draconx.ca])
+AC_CONFIG_SRCDIR([src/treefuncs.def])
+AC_CONFIG_HEADERS([config.h])
 
-dnl Is there a way to test NOINSTGOB here ?
-if test -f ../NOINST_GOB ; then
-  AC_MSG_RESULT([*** NOT Going to install GOB ***])
-  SUBDIRS="src examples"
-else
-  SUBDIRS="src examples doc"
-fi
-AC_SUBST(SUBDIRS)
+AM_INIT_AUTOMAKE([-Wall subdir-objects dist-xz])
+AM_SILENT_RULES([yes])
 
-dnl Checks for programs.
-AC_ISC_POSIX
 AC_PROG_CC
-AC_STDC_HEADERS
+AC_PROG_LEX
 AC_PROG_YACC
-AM_PROG_LEX
-AC_PROG_INSTALL
-AC_PROG_CPP
-AC_PATH_PROG(RM, rm, /bin/rm)
-AC_PATH_PROG(MV, mv, /bin/mv)
-AC_PATH_PROG(TAR, tar, /bin/tar)
-PKG_CHECK_MODULES(GLIB, glib-2.0 >= $GLIB_REQUIRED)
-AC_SUBST(GLIB_CFLAGS)
-AC_SUBST(GLIB_LIBS)
-dnl We don't check popt since we're not using it at the moment, but
-dnl We just might use it later
-dnl AC_CHECK_LIB(popt,poptGetContext, [POPT_LIB="-lpopt"],
-dnl         AC_MSG_ERROR(Popt library not found, find it on ftp://ftp.redhat.com/pub/redhat/code/))
-dnl AC_SUBST(POPT_LIB)
-
 
-dnl AM_PROG_LIBTOOL
+AC_ARG_VAR([PERL], [command to execute perl programs])
+AC_CHECK_PROGS([PERL], [perl], [false])
+AM_CONDITIONAL([HAVE_PERL], [$PERL -e 'my $x = 42; exit $x'; test $? = 42])
 
-AC_SUBST(CFLAGS)
-AC_SUBST(CPPFLAGS)
-AC_SUBST(LDFLAGS)
-AC_SUBST(YFLAGS)
+PKG_CHECK_MODULES([GLIB], [glib-2.0 >= 2.4.0])
 
-AC_OUTPUT([
-gob2.spec
-Makefile
-src/Makefile
-doc/Makefile
-examples/Makefile
-doc/gob2.1])
+AC_CONFIG_FILES([Makefile gob2.spec doc/gob2.1])
+AC_OUTPUT