Scott, > For this project I have some code that I want to share between two > separate software projects. I would like each of these software projects > to conditionally-compile and link my software extensions.
> AC_ARG_ENABLE([extra],dnl > [ --enable-extra Enable extra hooks],[ > ln -s $enableval extra_link > DIR=extra_link > ],[ > DIR=extra_stub > ]) > AC_OUTPUT($DIR/Makefile) This is not the way conditionals work in automake. AM always needs to be able to determine which files must go in the distribution, which is not possible with your setup, since there is no way a program could analyze what values $DIR can take. Instead, you could write AC_CONFIG_FILES(extra_link/Makefile extra_stub/Makefile) AC_ARG_ENABLE([extra],dnl AC_HELP_STRING([--enable-extra],[Enable extra hooks])) AM_CONDITIONAL([EXTRASTUFF],[test "$enable_extra" = "yes"]) and then in the Makefile.am if EXTRASTUFF EXTRADIR = extra_link else EXTRADIR = extra_stub endif SUBDIRS = $(EXTRADIR) > So, I wanted to ask this list if anyone has any experience with a setup > like this. Can anyone recommend a minimal, effective method for having > two separate software projects conditionally build and link a totally > independent source tree? How do I configure automake (and configure, > for that matter) to do this? Building an external source tree is not supported. You should build the extension separately (i.e. make it a separate package) and have the user build it before the other packages. Simon -- GPG Fingerprint: 040E B5F7 84F1 4FBC CEAD ADC6 18A0 CC8D 5706 A4B4
pgp00000.pgp
Description: PGP signature