View previous topic :: View next topic |
Author |
Message |
tenspd137 Guru
Joined: 22 Aug 2006 Posts: 391
|
Posted: Fri Oct 03, 2014 3:11 am Post subject: Subsume external project into my autotools project [solved] |
|
|
Hi all,
I can't seem to find a good answer to this anywhere. I have a project where I want to use other libraries, say libjpeg-turbo. Instead of looking for it on the users system, I would like to put the source into my project - so the tree would look like
project-----configure.ac, Makefile.am
|
external------libjpeg-turbo
|
src-----Makefile.am, my project sources
How would I tell my project to build libjpeg-turbo - ie run it's configure scripts, etc?
So far, I made a small test.
toplevel config.ac:
Code: |
AC_INIT(test, 1.0)
AC_CONFIG_SRCDIR(src/main.cpp)
AM_INIT_AUTOMAKE
AC_PROG_CXX
AC_PROG_LIBTOOL
AC_OUTPUT(Makefile src/Makefile)
|
Toplevel Makefile.am
Code: |
SUBDIRS = extern/libjpeg-turbo-1.3.1 src
|
src Makefile.am
Code: |
bin_PROGRAMS = test
test_SOURCES = main.cpp
test_LDADD = $(top_srcdir)/external/libjpeg-turbo-1.3.1/libjpeg.la
|
Everything I have seen (which hasn't had any examples) suggests if I set it up like this it would work. Basically, I would like it to also build the libjpeg-turbo source - how do I get it to run the configure script from my top level?
Thanks for any help!
************************
Found it - AC_CONFIG_SUBDIRS - hard to find what you are looking for when you don't know what it is called.
************************* |
|
Back to top |
|
|
Hu Moderator
Joined: 06 Mar 2007 Posts: 21631
|
Posted: Sat Oct 04, 2014 12:32 am Post subject: |
|
|
Fair warning - package distributors discourage bundling or sometimes outright ban it. If you insist on bundling a version of some other package, please include a configure option to use the system copy instead. |
|
Back to top |
|
|
tenspd137 Guru
Joined: 22 Aug 2006 Posts: 391
|
Posted: Wed Oct 22, 2014 2:47 am Post subject: |
|
|
Sorry for the late reply - thank you. This is just for a research project at work where we want to be sure we are linking against the same libraries - it isn't something to be redistributed to the outside world, but I do plan on adding options to do as you suggest as I learn autotools.
Thanks! |
|
Back to top |
|
|
|