I am trying to get libtool working on my MacOS 10.8.3 machine. Because everything Apple ships is out of date, I'm using macports. I have up-to-date versions:
libtool (GNU libtool) 2.4.2
automake (GNU automake) 1.13.1
autoconf (GNU Autoconf) 2.69
It's all installed in /opt.
Here is configure.ac:
AC_INIT([Hello], [0.1], [[email protected]], [hello], [http://hello.example.com/])
AC_PREREQ([2.59])
AM_INIT_AUTOMAKE([1.10 no-define])
LT_INIT
AC_CONFIG_HEADERS([config.h])
AC_PROG_CXX
AC_CONFIG_FILES([Makefile])
AC_OUTPUT
Here is Makefile.am:
lib_LTLIBRARIES = libsomething-1.0.la
libsomething_1_0_la_SOURCES = something.cc
bin_PROGRAMS = hello
hello_SOURCES = hello.h hello.cc main.cc
Running glibtoolize produces this error:
glibtoolize: Consider adding `AC_CONFIG_MACRO_DIR([m4])' to configure.ac and
glibtoolize: rerunning glibtoolize, to keep the correct libtool macros in-tree.
glibtoolize: Consider adding `-I m4' to ACLOCAL_AMFLAGS in Makefile.am.
When I add this line to Makefile.am: ACLOCAL_AMFLAGS="-I m4" I get this error;
glibtoolize: Consider adding `-I m4' to ACLOCAL_AMFLAGS in Makefile.am.
If I change it to this: ACLOCAL_AMFLAGS="-Im4"
I get the same error: glibtoolize: Consider adding `-I m4' to ACLOCAL_AMFLAGS in Makefile.am.
The second error I get is:
configure.ac:5: error: required file '../ltmain.sh' not found
How do I make these errors go away?
It needs to be:
ACLOCAL_AMFLAGS = -I m4
in Makefile.am
and:
AC_CONFIG_MACRO_DIR([m4])
in configure.ac
. You do have an m4
directory, at $(top_srcdir)
right?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With