Hi. I'm in the process of trying to convert the program I am developing over from a simple Makefile to an autotools-based build system. This is my first time trying to do this sort of thing.
I believe I have made a lot of progress, but needless to say it has been a less than joyful experience. Right now I am playing with my .41 Magnum, pondering the question of which would be more painful -- continuing to work on figuring out autotools, or shooting myself in the foot.
Anyway, my question: What do I set in my Makefile.am (or configure.ac???) so a data directory is installed?
In my package, there is a src/ dir with this Makefile.am:
Code:
bin_PROGRAMS = lusus_stack
lusus_stack_SOURCES = data.cpp lusus_stack.cpp lusus_stack_funcs.cpp
lusus_stack_LDADD = -lXxf86vm -lclanApp -lclanCore -lclanDisplay -lclanGL -lclanSound -lclanVorbis -lfontconfig -lfreetype -lpthread
In the top level dir there is this Makefile.am:
And this configure.ac:
Code:
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_PREREQ([2.63])
AC_INIT([lusus], [0.1], [lusus@freelists.org])
AM_INIT_AUTOMAKE([-Wall -Werror foreign])
AC_CONFIG_SRCDIR([src/lusus_stack.cpp])
AC_CONFIG_HEADERS([config.h])
# Checks for programs.
AC_PROG_CXX
AC_PROG_INSTALL
# Checks for libraries.
# FIXME: Replace `main' with a function in `-lXxf86vm':
AC_CHECK_LIB([Xxf86vm], [main])
# FIXME: Replace `main' with a function in `-lclanApp':
AC_CHECK_LIB([clanApp], [main])
# FIXME: Replace `main' with a function in `-lclanCore':
AC_CHECK_LIB([clanCore], [main])
# FIXME: Replace `main' with a function in `-lclanDisplay':
AC_CHECK_LIB([clanDisplay], [main])
# FIXME: Replace `main' with a function in `-lclanGL':
AC_CHECK_LIB([clanGL], [main])
# FIXME: Replace `main' with a function in `-lclanSound':
AC_CHECK_LIB([clanSound], [main])
# FIXME: Replace `main' with a function in `-lclanVorbis':
AC_CHECK_LIB([clanVorbis], [main])
# FIXME: Replace `main' with a function in `-lfontconfig':
AC_CHECK_LIB([fontconfig], [main])
# FIXME: Replace `main' with a function in `-lfreetype':
AC_CHECK_LIB([freetype], [main])
# FIXME: Replace `main' with a function in `-lpthread':
AC_CHECK_LIB([pthread], [main])
#LIBS([Xxf86vm], [clanApp], [clanCore], [clanDisplay], [clanGL], [clanSound], [clanVorbis], [fontconfig], [freetype], [pthread])
# Checks for header files.
AC_CHECK_HEADERS([limits.h stdlib.h])
# Checks for typedefs, structures, and compiler characteristics.
AC_HEADER_STDBOOL
# Checks for library functions.
AC_CONFIG_FILES([
Makefile
src/Makefile
])
AC_OUTPUT
But I also want the files in the data/ directory installed to a (/usr/local/)data/lusus/ directory. So, I guess I need a Makefile.am in the data/ dir, but what do I put in it?
(Sidenote: I am going through the official documentation as best I can... but the wording and examples (or lack thereof) has left me confused on a number of issues.)