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

New option --enable-shared, and a first attempt at

building a shared library (*without* using libtool).

Rev: src/nettle/configure.ac:1.11
parent 9fe4da97
......@@ -9,6 +9,9 @@ AC_PREREQ(2.50)
AM_INIT_AUTOMAKE
AM_CONFIG_HEADER([config.h])
SHLIBMAJOR=0
SHLIBMINOR=0
AC_CANONICAL_HOST
# Command line options
......@@ -36,6 +39,10 @@ AC_ARG_ENABLE(assembler,
AC_HELP_STRING([--disable-assembler],[Disable assembler code]),,
[enable_assembler=yes])
AC_ARG_ENABLE(shared,
AC_HELP_STRING([--enable-shared], [Build a shared library]),
[enable_shared=no])
LSH_RPATH_INIT([`echo $with_lib_path | sed 's/:/ /g'` \
`echo $exec_prefix | sed "s@^NONE@$prefix/lib@g" | sed "s@^NONE@$ac_default_prefix/lib@g"` \
/usr/local/lib /sw/local/lib /sw/lib \
......@@ -83,6 +90,21 @@ if test "x$enable_assembler" = xyes ; then
fi
fi
SHLIBCFLAGS="-fpic"
SHLIBFORLINK=libnettle.so
SHLIBSONAME='$(SHLIBFORLINK).$(MAJOR)'
SHLIBFILE='$(SHLIBSONAME).$(MINOR)'
SHLIBLINK='$(CC) $(LDFLAGS) -shared -Wl,-soname=$(SHLIBSONAME)'
if test "x$enable_shared" = xyes ; then
SHLIBTARGET='$(SHLIBFORLINK)'
SHLIBINSTALL=install-shared
fi
AC_SUBST(SHLIBCFLAGS)
AC_SUBST(SHLIBTARGET)
AC_SUBST(SHLIBINSTALL)
AC_PATH_PROG(M4, m4, m4)
# Checks for typedefs, structures, and compiler characteristics.
......
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