From 0f7ec1e61526025bc5441210f6f2f9e6995c8bac Mon Sep 17 00:00:00 2001 From: Nick Bowler Date: Thu, 21 Feb 2019 11:15:06 -0500 Subject: [PATCH] Build with libtool. We link against glib, which is built using libtool, so using libtool ourselves gives better results "out of the box". For example, if glib is installed to a non-standard location libtool will automatically add appropriate rpath options when linking. --- .gitignore | 2 ++ Makefile.am | 2 ++ configure.ac | 2 ++ m4/.gitignore | 5 +++++ 4 files changed, 11 insertions(+) create mode 100644 m4/.gitignore diff --git a/.gitignore b/.gitignore index 6535b8f..d476b8f 100644 --- a/.gitignore +++ b/.gitignore @@ -11,6 +11,8 @@ /gob2 /gob2.spec /install-sh +/libtool +/ltmain.sh /missing /stamp-h1 /ylwrap diff --git a/Makefile.am b/Makefile.am index 41ac9d8..83d7b31 100644 --- a/Makefile.am +++ b/Makefile.am @@ -6,6 +6,8 @@ # This is free software: you are free to change and redistribute it. # There is NO WARRANTY, to the extent permitted by law. +ACLOCAL_AMFLAGS = -I m4 + AM_CPPFLAGS = -I$(top_builddir)/src -I$(top_srcdir)/src \ -I$(builddir) -I$(srcdir) -DPKGDATADIR=\"$(pkgdatadir)\" AM_CFLAGS = $(GLIB_CFLAGS) diff --git a/configure.ac b/configure.ac index 8e7a1f0..f78cf39 100644 --- a/configure.ac +++ b/configure.ac @@ -21,6 +21,8 @@ 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]) +LT_INIT + PKG_CHECK_MODULES([GLIB], [glib-2.0 >= 2.4.0]) AC_CONFIG_FILES([Makefile gob2.spec doc/gob2.1]) diff --git a/m4/.gitignore b/m4/.gitignore new file mode 100644 index 0000000..38066dd --- /dev/null +++ b/m4/.gitignore @@ -0,0 +1,5 @@ +libtool.m4 +ltoptions.m4 +ltsugar.m4 +ltversion.m4 +lt~obsolete.m4 -- 2.43.2