Commit b8e111bd authored by Niels Möller's avatar Niels Möller

New configure option --disable-static. Based on patch from Alon Bar-Lev.

parent fad85c4e
2012-12-15 Niels Möller <nisse@lysator.liu.se>
Based on a patch from Alon Bar-Lev:
* Makefile.in (LIBTARGETS, SHLIBTARGET): Define as empty if static
or shared libraries, respectively, are disabled.
(TARGETS): Deleted @IF_SHARED@ conditional, now in the definition
of SHLIBTARGET.
From Alon Bar-Lev:
* configure.ac: Check for ar program.
* configure.ac: Check for ar program. New option --disable-static.
* config.make.in (AR): Use configured value.
2012-12-13 Niels Möller <nisse@lysator.liu.se>
......
......@@ -20,8 +20,8 @@ include config.make
PRE_CPPFLAGS = -I.
# FIXME: Add configuration of LIBEXT?
LIBTARGETS = libnettle.a @IF_HOGWEED@ libhogweed.a
SHLIBTARGETS = $(LIBNETTLE_FORLINK) @IF_HOGWEED@ $(LIBHOGWEED_FORLINK)
LIBTARGETS = @IF_STATIC@ libnettle.a @IF_HOGWEED@ libhogweed.a
SHLIBTARGETS = @IF_SHARED@ $(LIBNETTLE_FORLINK) @IF_HOGWEED@ $(LIBHOGWEED_FORLINK)
getopt_SOURCES = getopt.c getopt1.c
getopt_TARGETS = $(getopt_SOURCES:.c=.$(OBJEXT))
......@@ -32,7 +32,7 @@ internal_TARGETS = $(internal_SOURCES:.c=.$(OBJEXT))
TARGETS = aesdata$(EXEEXT) desdata$(EXEEXT) twofishdata$(EXEEXT) \
shadata$(EXEEXT) gcmdata$(EXEEXT) \
$(getopt_TARGETS) $(internal_TARGETS) \
$(LIBTARGETS) @IF_SHARED@ $(SHLIBTARGETS)
$(LIBTARGETS) $(SHLIBTARGETS)
IMPLICIT_TARGETS = @IF_DLL@ $(LIBNETTLE_FILE) $(LIBHOGWEED_FILE)
DOCTARGETS = @IF_DOCUMENTATION@ nettle.info nettle.html nettle.pdf
......
......@@ -43,6 +43,10 @@ AC_ARG_ENABLE(assembler,
AC_HELP_STRING([--disable-assembler],[Disable assembler code]),,
[enable_assembler=yes])
AC_ARG_ENABLE(static,
AC_HELP_STRING([--disable-static], [Do not build any static library]),,
[enable_static=yes])
AC_ARG_ENABLE(shared,
AC_HELP_STRING([--disable-shared], [Do not build any shared library]),,
[enable_shared=yes])
......@@ -572,6 +576,12 @@ else
IF_HOGWEED='#'
fi
if test "x$enable_static" = xyes ; then
IF_STATIC=''
else
IF_STATIC='#'
fi
if test "x$enable_shared" = xyes ; then
IF_SHARED=''
else
......@@ -601,6 +611,7 @@ else
fi
AC_SUBST(IF_HOGWEED)
AC_SUBST(IF_STATIC)
AC_SUBST(IF_SHARED)
AC_SUBST(IF_DOCUMENTATION)
AC_SUBST(IF_DLL)
......@@ -683,6 +694,7 @@ AC_MSG_NOTICE([summary of build options:
Install prefix: ${prefix}
Library directory: ${libdir}
Compiler: ${CC}
Static libraries: ${enable_static}
Shared libraries: ${enable_shared}
Public key crypto: ${enable_public_key}
Documentation: ${enable_documentation}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment