]> git.proxmox.com Git - mirror_corosync.git/commitdiff
Make libnss detection work properly.
authorSteven Dake <sdake@redhat.com>
Sun, 26 Apr 2009 05:22:24 +0000 (05:22 +0000)
committerSteven Dake <sdake@redhat.com>
Sun, 26 Apr 2009 05:22:24 +0000 (05:22 +0000)
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2153 fd59a12c-fef9-0310-b244-a6a79926bd2f

configure.ac
exec/Makefile.am

index 3b45a4907395ac098abf4594c0faf0c47d659347..87bd57bba90dfb3b2d020fa29116ebc0d096d9d5 100644 (file)
@@ -149,7 +149,7 @@ case $exec_prefix in
 esac
 
 ## local defines
-PKG_FEATURES=""
+PACKAGE_FEATURES=""
 
 LINT_FLAGS="-weak -unrecog +posixlib +ignoresigns -fcnuse \
        -badflag -D__gnuc_va_list=va_list -D__attribute\(x\)="
@@ -179,7 +179,7 @@ AC_ARG_ENABLE([coverage],
 
 AC_ARG_ENABLE([nss],
        [  --enable-nss            : Network Security Services encryption. ],
-       [ default="yes" ])
+       [ default="no" ])
 
 AC_ARG_WITH([lcrso-dir],
        [  --with-lcrso-dir=DIR    : corosync lcrso files. ],
@@ -250,7 +250,7 @@ ENV_LDFLAGS="$LDFLAGS"
 if test "x${enable_debug}" = xyes; then
        AC_DEFINE_UNQUOTED([DEBUG], [1], [Compiling Debugging code])
        OPT_CFLAGS="-O0"
-       PKG_FEATURES="$PKG_FEATURES debug"
+       PACKAGE_FEATURES="$PACKAGE_FEATURES debug"
 else
        OPT_CFLAGS="-O3"
 fi
@@ -264,12 +264,9 @@ fi
 
 # Look for libnss
 if test "x${enable_nss}" = xyes; then
-    if $PKGCONFIG --exists nss; then
-       NSS_CFLAGS="`$PKGCONFIG --cflags nss`"
-       NSS_LDFLAGS="`$PKGCONFIG --libs nss`"
+       PKG_CHECK_MODULES([nss],[nss])
        AC_DEFINE_UNQUOTED([HAVE_LIBNSS], 1, [have libnss])     
-       PKG_FEATURES="$PKG_FEATURES nss"
-    fi
+       PACKAGE_FEATURES="$PACKAGE_FEATURES nss"
 fi
 
 # extra warnings
@@ -309,7 +306,7 @@ if test "x${enable_coverage}" = xyes && \
        OPT_CFLAGS="-O0"
        COVERAGE_CFLAGS="-ftest-coverage -fprofile-arcs"
        COVERAGE_LDFLAGS="-ftest-coverage -fprofile-arcs"
-       PKG_FEATURES="$PKG_FEATURES coverage"
+       PACKAGE_FEATURES="$PACKAGE_FEATURES coverage"
 else
        COVERAGE_CFLAGS=""
        COVERAGE_LDFLAGS=""
@@ -319,7 +316,7 @@ if test "x${enable_ansi}" = xyes && \
                cc_supports_flag -std=iso9899:199409 ; then
        AC_MSG_NOTICE([Enabling ANSI Compatibility])
        ANSI_CPPFLAGS="-ansi -D_GNU_SOURCE -DANSI_ONLY"
-       PKG_FEATURES="$PKG_FEATURES ansi"
+       PACKAGE_FEATURES="$PACKAGE_FEATURES ansi"
 else
        ANSI_CPPFLAGS=""
 fi
@@ -328,7 +325,7 @@ if test "x${enable_fatal_warnings}" = xyes && \
                cc_supports_flag -Werror ; then
        AC_MSG_NOTICE([Enabling Fatal Warnings (-Werror)])
        WERROR_CFLAGS="-Werror"
-       PKG_FEATURES="$PKG_FEATURES fatal-warnings"
+       PACKAGE_FEATURES="$PACKAGE_FEATURES fatal-warnings"
 else
        WERROR_CFLAGS=""
 fi
@@ -380,7 +377,7 @@ AC_MSG_RESULT([  State information        = ${localstatedir}])
 AC_MSG_RESULT([  System configuration     = ${sysconfdir}])
 AC_MSG_RESULT([  LCRSO                    = ${LCRSODIR}])
 AC_MSG_RESULT([  SOCKETDIR                = ${SOCKETDIR}])
-AC_MSG_RESULT([  Features                 =${PKG_FEATURES}])
+AC_MSG_RESULT([  Features                 =${PACKAGE_FEATURES}])
 AC_MSG_RESULT([])
 AC_MSG_RESULT([$PACKAGE build info:])
 AC_MSG_RESULT([  Library SONAME           = ${SONAME}])
index ceb71bb16513f86d6442813354b15a94608443a2..43d864f006eca1abda5eaaef1a65720a6615e039 100644 (file)
@@ -33,7 +33,7 @@ MAINTAINERCLEANFILES  = Makefile.in
 
 AM_CFLAGS              = -fPIC
 
-INCLUDES               = -I$(top_builddir)/include -I$(top_srcdir)/include
+INCLUDES               = -I$(top_builddir)/include -I$(top_srcdir)/include $(nss_CFLAGS)
 
 TOTEM_SRC              = coropoll.c totemip.c totemnet.c totemrrp.c \
                          totemsrp.c totemmrp.c totempg.c crypto.c wthread.c
@@ -94,7 +94,7 @@ else
 libtotem_pg.so.$(SONAME): $(TOTEM_OBJS)
        $(CC) -shared -o $@ \
                -Wl,-soname=libtotem_pg.so.$(SOMAJOR) \
-               $^ $(LDFLAGS) $(NSS_LDFLAGS) -lpthread
+               $^ $(LDFLAGS) $(nss_LIBS) -lpthread
        ln -sf libtotem_pg.so.$(SONAME) libtotem_pg.so
        ln -sf libtotem_pg.so.$(SONAME) libtotem_pg.so.$(SOMAJOR)