location of libjemalloc can be set in configure
authorVictor Kirhenshtein <victor@netxms.org>
Mon, 8 Jun 2015 14:30:49 +0000 (17:30 +0300)
committerVictor Kirhenshtein <victor@netxms.org>
Mon, 8 Jun 2015 14:30:49 +0000 (17:30 +0300)
Makefile.am
configure.ac

index d43a3bc..a69f71f 100644 (file)
@@ -15,4 +15,4 @@ SUBDIRS += @TOP_LEVEL_MODULES@
 
 install-exec-hook:
        if test "x@BUILD_SDK@" = "xyes"; then cp config.h $(DESTDIR)$(includedir); mkdir -p $(DESTDIR)$(pkgdatadir)/sdk; cp libtool $(DESTDIR)$(pkgdatadir)/sdk; cp config/install-sh $(DESTDIR)$(pkgdatadir)/sdk; fi
-       if test "x@BUILD_SERVER@" = "xyes"; then LD_LIBRARY_PATH="$(DESTDIR)$(libdir):${LD_LIBRARY_PATH}" $(DESTDIR)$(bindir)/nxmibc -d $(DESTDIR)$(pkgdatadir)/mibs -o $(DESTDIR)$(pkgdatadir)/mibs/netxms.mib; fi
+       if test "x@BUILD_SERVER@" = "xyes"; then LD_LIBRARY_PATH="$(DESTDIR)$(libdir):@INSTALL_LIBPATH@:${LD_LIBRARY_PATH}" $(DESTDIR)$(bindir)/nxmibc -d $(DESTDIR)$(pkgdatadir)/mibs -o $(DESTDIR)$(pkgdatadir)/mibs/netxms.mib; fi
index 84e68de..38d3783 100644 (file)
@@ -96,6 +96,7 @@ TUXEDO_LIBS=""
 MONGODB_LIBS=""
 DISABLE_IPV6="no"
 IPV6_SUPPORT="no"
+INSTALL_LIBPATH=""
 
 
 #--------------------------------------------------------------------
@@ -424,6 +425,19 @@ AC_ARG_WITH(openssl,
        fi
 ])
 
+AC_ARG_WITH(jemalloc,
+[AS_HELP_STRING(--with-jemalloc,specify libjemalloc location)],
+[
+       if test "x$withval" != "xno" ; then
+               if test "x$withval" != "x" && test "x$withval" != "xyes" ; then
+                       LD_RUN_PATH="${withval}/lib${LD_RUN_PATH:+:}${LD_RUN_PATH}"   
+                       LDFLAGS="$LDFLAGS -L${withval}/lib"
+                       CPPFLAGS="$CPPFLAGS -I${withval}/include"
+                       INSTALL_LIBPATH="${withval}/lib${INSTALL_LIBPATH:+:}${INSTALL_LIBPATH}"
+               fi
+       fi
+])
+
 AC_ARG_ENABLE(iconv,
 [AS_HELP_STRING(--disable-iconv,do not use iconv() for text conversions)],
 [
@@ -2724,6 +2738,7 @@ AC_SUBST(TUXEDO_LIBS)
 AC_SUBST(MONGODB_CPPFLAGS)
 AC_SUBST(MONGODB_LDFLAGS)
 AC_SUBST(MONGODB_LIBS)
+AC_SUBST(INSTALL_LIBPATH)
 
 #--------------------------------------------------------------------
 # Shared libs versions