[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[patch] ./configure --enable-static
From: |
Amos Waterland |
Subject: |
[patch] ./configure --enable-static |
Date: |
Tue, 20 Apr 2004 13:30:33 -0500 |
User-agent: |
Mutt/1.4i |
Sometimes it is useful to compile the coreutils as statically linked
programs. Please consider the following. Thanks.
2004-04-20 Amos Waterland <address@hidden>
* configure.ac: Add `--enable-static' option.
--- configure.ac.orig 2004-03-02 16:47:31.000000000 -0600
+++ configure.ac 2004-04-20 13:09:54.000000000 -0500
@@ -232,6 +232,22 @@
jm_LIB_CHECK
+# Add an option to produce statically linked binaries.
+AC_ARG_ENABLE([static],
+ AC_HELP_STRING([--enable-static],
+ [build static library @<:@default=no@:>@]),
+ [static=$enableval],
+ [static=no])
+
+# Check whether user supplied the option to statically link binaries.
+if test "$static" = yes; then
+ # if we're using gcc, add `-static' to LDFLAGS
+ if test -n "$GCC" || test "$ac_cv_prog_gcc" = "yes"; then
+ STATIC_LD="-static"
+ LDFLAGS="$LDFLAGS -static"
+ fi
+fi
+
AM_GNU_GETTEXT([external], [need-ngettext])
AM_GNU_GETTEXT_VERSION(0.13.1)
- [patch] ./configure --enable-static,
Amos Waterland <=