Add --{enable,disable}-{static,shared} to configure script
My distro offers a custom toolchain where it's not possible to make static libs, so it's insufficient to just delete the libs I don't want. I actually need to avoid building them in the first place.
This commit is contained in:
parent
7241bf5b74
commit
4e920d2c9d
17
Makefile.in
17
Makefile.in
@ -55,6 +55,8 @@ cfghdrs_out := @cfghdrs_out@
|
|||||||
cfgoutputs_in := $(addprefix $(srcroot),@cfgoutputs_in@)
|
cfgoutputs_in := $(addprefix $(srcroot),@cfgoutputs_in@)
|
||||||
cfgoutputs_out := @cfgoutputs_out@
|
cfgoutputs_out := @cfgoutputs_out@
|
||||||
enable_autogen := @enable_autogen@
|
enable_autogen := @enable_autogen@
|
||||||
|
enable_shared := @enable_shared@
|
||||||
|
enable_static := @enable_static@
|
||||||
enable_prof := @enable_prof@
|
enable_prof := @enable_prof@
|
||||||
enable_zone_allocator := @enable_zone_allocator@
|
enable_zone_allocator := @enable_zone_allocator@
|
||||||
enable_experimental_smallocx := @enable_experimental_smallocx@
|
enable_experimental_smallocx := @enable_experimental_smallocx@
|
||||||
@ -430,7 +432,12 @@ $(objroot)test/stress/%$(EXE): $(objroot)test/stress/%.$(O) $(C_JET_OBJS) $(C_TE
|
|||||||
|
|
||||||
build_lib_shared: $(DSOS)
|
build_lib_shared: $(DSOS)
|
||||||
build_lib_static: $(STATIC_LIBS)
|
build_lib_static: $(STATIC_LIBS)
|
||||||
build_lib: build_lib_shared build_lib_static
|
ifeq ($(enable_shared), 1)
|
||||||
|
build_lib: build_lib_shared
|
||||||
|
endif
|
||||||
|
ifeq ($(enable_static), 1)
|
||||||
|
build_lib: build_lib_static
|
||||||
|
endif
|
||||||
|
|
||||||
install_bin:
|
install_bin:
|
||||||
$(INSTALL) -d $(BINDIR)
|
$(INSTALL) -d $(BINDIR)
|
||||||
@ -467,7 +474,13 @@ install_lib_pc: $(PC)
|
|||||||
$(INSTALL) -m 644 $$l $(LIBDIR)/pkgconfig; \
|
$(INSTALL) -m 644 $$l $(LIBDIR)/pkgconfig; \
|
||||||
done
|
done
|
||||||
|
|
||||||
install_lib: install_lib_shared install_lib_static install_lib_pc
|
ifeq ($(enable_shared), 1)
|
||||||
|
install_lib: install_lib_shared
|
||||||
|
endif
|
||||||
|
ifeq ($(enable_static), 1)
|
||||||
|
install_lib: install_lib_static
|
||||||
|
endif
|
||||||
|
install_lib: install_lib_pc
|
||||||
|
|
||||||
install_doc_html:
|
install_doc_html:
|
||||||
$(INSTALL) -d $(DATADIR)/doc/jemalloc$(install_suffix)
|
$(INSTALL) -d $(DATADIR)/doc/jemalloc$(install_suffix)
|
||||||
|
32
configure.ac
32
configure.ac
@ -878,6 +878,36 @@ AC_PROG_RANLIB
|
|||||||
AC_PATH_PROG([LD], [ld], [false], [$PATH])
|
AC_PATH_PROG([LD], [ld], [false], [$PATH])
|
||||||
AC_PATH_PROG([AUTOCONF], [autoconf], [false], [$PATH])
|
AC_PATH_PROG([AUTOCONF], [autoconf], [false], [$PATH])
|
||||||
|
|
||||||
|
dnl Enable shared libs
|
||||||
|
AC_ARG_ENABLE([shared],
|
||||||
|
[AS_HELP_STRING([--enable-shared], [Build shared libaries])],
|
||||||
|
if test "x$enable_shared" = "xno" ; then
|
||||||
|
enable_shared="0"
|
||||||
|
else
|
||||||
|
enable_shared="1"
|
||||||
|
fi
|
||||||
|
,
|
||||||
|
enable_shared="1"
|
||||||
|
)
|
||||||
|
AC_SUBST([enable_shared])
|
||||||
|
|
||||||
|
dnl Enable static libs
|
||||||
|
AC_ARG_ENABLE([static],
|
||||||
|
[AS_HELP_STRING([--enable-static], [Build static libaries])],
|
||||||
|
if test "x$enable_static" = "xno" ; then
|
||||||
|
enable_static="0"
|
||||||
|
else
|
||||||
|
enable_static="1"
|
||||||
|
fi
|
||||||
|
,
|
||||||
|
enable_static="1"
|
||||||
|
)
|
||||||
|
AC_SUBST([enable_static])
|
||||||
|
|
||||||
|
if test "$enable_shared$enable_static" = "00" ; then
|
||||||
|
AC_MSG_ERROR([Please enable one of shared or static builds])
|
||||||
|
fi
|
||||||
|
|
||||||
dnl Perform no name mangling by default.
|
dnl Perform no name mangling by default.
|
||||||
AC_ARG_WITH([mangling],
|
AC_ARG_WITH([mangling],
|
||||||
[AS_HELP_STRING([--with-mangling=<map>], [Mangle symbols in <map>])],
|
[AS_HELP_STRING([--with-mangling=<map>], [Mangle symbols in <map>])],
|
||||||
@ -2297,6 +2327,8 @@ AC_MSG_RESULT([JEMALLOC_PRIVATE_NAMESPACE])
|
|||||||
AC_MSG_RESULT([ : ${JEMALLOC_PRIVATE_NAMESPACE}])
|
AC_MSG_RESULT([ : ${JEMALLOC_PRIVATE_NAMESPACE}])
|
||||||
AC_MSG_RESULT([install_suffix : ${install_suffix}])
|
AC_MSG_RESULT([install_suffix : ${install_suffix}])
|
||||||
AC_MSG_RESULT([malloc_conf : ${config_malloc_conf}])
|
AC_MSG_RESULT([malloc_conf : ${config_malloc_conf}])
|
||||||
|
AC_MSG_RESULT([shared libs : ${enable_shared}])
|
||||||
|
AC_MSG_RESULT([static libs : ${enable_static}])
|
||||||
AC_MSG_RESULT([autogen : ${enable_autogen}])
|
AC_MSG_RESULT([autogen : ${enable_autogen}])
|
||||||
AC_MSG_RESULT([debug : ${enable_debug}])
|
AC_MSG_RESULT([debug : ${enable_debug}])
|
||||||
AC_MSG_RESULT([stats : ${enable_stats}])
|
AC_MSG_RESULT([stats : ${enable_stats}])
|
||||||
|
Loading…
Reference in New Issue
Block a user