From: ellson Date: Tue, 18 Oct 2005 18:28:01 +0000 (+0000) Subject: support --disable-static and use in .spec for rpms X-Git-Tag: LAST_LIBGRAPH~32^2~7322 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2ac71eb58a8bbb1f9a3ab022f27e80f8e419193a;p=graphviz support --disable-static and use in .spec for rpms --- diff --git a/cmd/dot/Makefile.am b/cmd/dot/Makefile.am index 782d05edd..1e0c46895 100644 --- a/cmd/dot/Makefile.am +++ b/cmd/dot/Makefile.am @@ -13,8 +13,11 @@ AM_CPPFLAGS = \ -I$(top_srcdir)/lib/graph \ -I$(top_srcdir)/lib/cdt +if ENABLE_STATIC +bin_PROGRAMS = dot dot_static +else bin_PROGRAMS = dot -noinst_PROGRAMS = dot_static +endif man_MANS = dot.1 pdf_DATA = dot.pdf diff --git a/configure.ac b/configure.ac index 483aa21d3..6f7db9cab 100644 --- a/configure.ac +++ b/configure.ac @@ -88,16 +88,14 @@ fi dnl ----------------------------------- # Static binaries -# Always enable static as dot_static makes it so much easier to debug - -#AC_ARG_ENABLE(static, -# [AC_HELP_STRING([--enable-codegens], [build static executable])]) -#if test "x$enable_static" = "xyes"; then -# AC_DEFINE(ENABLE_STATIC,1,[Define if you want statically linked executables]) -#else -# AC_DISABLE_STATIC -#fi -#AM_CONDITIONAL(ENABLE_STATIC, [test "x$enable_static" = "xyes"]) +AC_ARG_ENABLE(static, + [AC_HELP_STRING([--enable-static], [build static executable])]) +if test "x$enable_static" != "xno"; then + AC_DEFINE(ENABLE_STATIC,1,[Define if you want statically linked executables]) +else + AC_DISABLE_STATIC +fi +AM_CONDITIONAL(ENABLE_STATIC, [test "x$enable_static" != "xno"]) dnl ----------------------------------- dnl checks for compilers diff --git a/graphviz.spec.in b/graphviz.spec.in index 05ecc659b..7ec9d57ac 100644 --- a/graphviz.spec.in +++ b/graphviz.spec.in @@ -92,6 +92,7 @@ CFLAGS="$RPM_OPT_FLAGS" \ --mandir=%{_mandir} \ --with-x \ --with-mylibgd \ + --disable-static \ --disable-dependency-tracking %__make %{?_smp_mflags}