How to install header files in Automake? - automake

The following statement doesn't work:
dist_include_DATA = someheaders.h
which cause error:
Makefile.am:8: `includedir' is not a legitimate directory for `DATA'
Using:
GNU Autoconf 2.65
GNU Automake 1.11.1
GNU Make 3.81

include_HEADERS = someheader.h

Related

How to tell configure where the required version is?

I'm attempting to compile geda-gaf cloned from https://github.com/rlutz/geda-gaf.git
when I do
$ ./configure; I get:
checking for GUILE... no
configure: error: you need at least version 2.0.0 of guile
but
$ which guile
/usr/bin
$ guile -v
guile (GNU Guile) 2.0.14
$ ./configure --help says use GUILE_LIBS environment variable
I tried:
$ export GUILE_LIBS = /usr/lib64
$ ls $GUILE_LIBS
... lots of .so.22 and others
but configure still fails
What am I doing wrong?
as stated previously

LFS binutils ../../gold/gold.h:29:10: fatal error: cstddef: No such file or directory

I'm working on LFS(11.0) for the first time
When installing the package binutils (https://www.linuxfromscratch.org/lfs/view/stable/chapter08/binutils.html)
(lfs chroot) root:/sources/binutils-2.37# make tooldir=/usr install -j1 # I encounter the fatal err and install fails :
../../gold/gold.h:29:10: fatal error: cstddef: No such file or directory
gcc --version
gcc (GCC) 11.2.0
(lfs chroot) root:/sources/bzip2-1.0.8# g++ --version
g++ (GCC) 11.2.0
tried removing nostdinc and nostdinc++ on Makefile.in and configure.ac
There is no stddef.h on binutils directory, is this the issue ? Been struggling with this one.
I have the same problem but with binutils 2.38. I tried binutils 2.39, still the same problem. I have gcc and g++ in the chroot. I'm also building under build/.
Obviously this error goes away if you don't enable gold in .configure, but I would assume that's required for later packages.

automake needs makeinfo while texinfo needs aclocal

I am installing packages on a machine without internet access and want to install automake. But I get following error message:
WARNING: 'makeinfo' is missing on your system.
You should only need it if you modified a '.texi' file, or
any other file indirectly affecting the aspect of the manual.
You might want to install the Texinfo package:
<http://www.gnu.org/software/texinfo/>
The spurious makeinfo call might also be the consequence of
using a buggy 'make' (AIX, DU, IRIX), in which case you might
want to install GNU make:
http://www.gnu.org/software/make/
Therefore I try to make texinfo where I get following error:
WARNING: 'aclocal-1.16' is missing on your system.
You should only need it if you modified 'acinclude.m4' or
'configure.ac' or m4 files included by 'configure.ac'.
The 'aclocal' program is part of the GNU Automake package:
<https://www.gnu.org/software/automake>
It also requires GNU Autoconf, GNU m4 and Perl in order to run:
<https://www.gnu.org/software/autoconf>
<https://www.gnu.org/software/m4/>
<https://www.perl.org/>
Apparently both programs need each other, which I don't understand.
Help is appreciated a lot. Thanks!

glibtoolize on MacOS tells me to consider adding `-I m4' to ACLOCAL_AMFLAGS, but that produces an error

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], [bug-report#hello.example.com], [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?
Maybe I'm late to the part, the answer of #ldav1s is the solution, BUT I still had issues.
After some Googling, I found this: https://pete.akeo.ie/2010/12/that-darn-libtoolize-acconfigmacrodirm4.html
So, ldav1's answer + this worked for me:
dos2unix Makefile.am
And now it works!

Automake adding flags to install.sh

I am using autotools to build some packages that I want the headers to be installed only if they are changed.
I see that install.sh has a flag -C for installing only if different, but how do i set that flag in autotools?
In my Makefile.am I am providing nobase_libhello_include_HEADERS = file1.h file2.h if that helps.
You override the install command when calling configure:
./configure INSTALL="/usr/bin/install -C"

Resources