Discussion:
How can I set a subproject to build as a static library by default
Steven Stewart-Gallus
2014-01-20 02:52:42 UTC
Permalink
I know I can use LT_INIT([static]) to build libraries in my project statically
(by default) but how can I make subprojects build statically?
Gary V. Vaughan
2014-01-20 07:06:58 UTC
Permalink
Post by Steven Stewart-Gallus
I know I can use LT_INIT([static]) to build libraries in my project statically
(by default) but how can I make subprojects build statically?
Pass --disable-shared to AC_CONFIG_SUBDIRS.

http://www.gnu.org/s/autoconf/manual/autoconf.html#Subdirectories
Bert Wesarg
2014-01-20 14:24:42 UTC
Permalink
Post by Gary V. Vaughan
Post by Steven Stewart-Gallus
I know I can use LT_INIT([static]) to build libraries in my project statically
(by default) but how can I make subprojects build statically?
Pass --disable-shared to AC_CONFIG_SUBDIRS.
http://www.gnu.org/s/autoconf/manual/autoconf.html#Subdirectories
There is no word in the documentation how to pass special flags to an
sub-configure with the help of AC_CONFIG_SUBDIRS. What do I miss?

Bert
Victor Lavaud
2014-01-20 07:03:19 UTC
Permalink
use project_CFLAGS="-Wl,-no_shared" and project_LDFLAGS="-static -no_shared"
Post by Steven Stewart-Gallus
I know I can use LT_INIT([static]) to build libraries in my project statically
(by default) but how can I make subprojects build statically?
_______________________________________________
Autoconf mailing list
https://lists.gnu.org/mailman/listinfo/autoconf
Steven Stewart-Gallus
2014-01-20 19:54:07 UTC
Permalink
Post by Gary V. Vaughan
Pass --disable-shared to AC_CONFIG_SUBDIRS.
Gary, like Bert says there isn't a way to pass flags to
AC_CONFIG_SUBDIRS.
Post by Gary V. Vaughan
use project_CFLAGS="-Wl,-no_shared" and project_LDFLAGS="-static -
no_shared"
Victor, I don't believe that works with external subprojects such a
portability libraries that I have no control over (and do not wish to
patch).

Loading...