- get libntlm cflags/libs from pkg-config

This commit is contained in:
Stefan Gehn 2008-10-04 19:08:15 +00:00
parent 804e456c03
commit a2d37af516
2 changed files with 10 additions and 5 deletions

View File

@ -63,7 +63,8 @@ endif
endif endif
ifeq ($(HAVE_NTLM),1) ifeq ($(HAVE_NTLM),1)
NTLM_LIBS ?= -lntlm NTLM_INCLUDES = `$(PKG_CONFIG) --cflags libntlm`
NTLM_LIBS = `$(PKG_CONFIG) --libs libntlm`
endif endif
ifeq ($(HAVE_LIBSENSORS),1) ifeq ($(HAVE_LIBSENSORS),1)
@ -79,9 +80,10 @@ PKG_INCLUDE = `$(PKG_CONFIG) --cflags gtk+-2.0 gthread-2.0`
PKG_LIB = `$(PKG_CONFIG) --libs gtk+-2.0 gthread-2.0` PKG_LIB = `$(PKG_CONFIG) --libs gtk+-2.0 gthread-2.0`
FLAGS = -O2 -I.. -I$(SHARED_PATH) $(PKG_INCLUDE) $(GTOP_INCLUDE) $(PTHREAD_INC) \ FLAGS = -O2 -I.. -I$(SHARED_PATH) $(PKG_INCLUDE) $(GTOP_INCLUDE) $(PTHREAD_INC) \
-DGKRELLM_CLIENT ${NTLM_INCLUDES} -DGKRELLM_CLIENT
LIBS = $(PKG_LIB) $(GTOP_LIBS) $(SMC_LIBS) $(SYS_LIBS) $(SSL_LIBS) $(NTLM_LIBS) $(SENSORS_LIBS) LIBS = $(PKG_LIB) $(GTOP_LIBS) $(SMC_LIBS) $(SYS_LIBS) $(SSL_LIBS) $(SENSORS_LIBS) \
$(NTLM_LIBS)
ifeq ($(debug),1) ifeq ($(debug),1)
FLAGS += -g FLAGS += -g

7
src/configure vendored
View File

@ -124,6 +124,9 @@ rm -f test test.exe test.o test.c
# echo "Checking for libntlm... " 1>& 2 # echo "Checking for libntlm... " 1>& 2
echo "Checking for libntlm... " 1>& 5 echo "Checking for libntlm... " 1>& 5
PKG_NTLM_INCLUDE=`pkg-config libntlm --cflags`
PKG_NTLM_LIBS=`pkg-config libntlm --libs`
cat << EOF > test.c cat << EOF > test.c
#include <ntlm.h> #include <ntlm.h>
@ -136,8 +139,8 @@ int main()
} }
EOF EOF
$CC ${CFLAGS} ${PKG_INCLUDE} -c test.c -o test.o 2>& 5 $CC ${CFLAGS} ${PKG_INCLUDE} ${PKG_NTLM_INCLUDE} -c test.c -o test.o 2>& 5
$CC test.o -o test ${LINK_FLAGS} ${PKG_LIBS} -lntlm 2>& 5 $CC test.o -o test ${LINK_FLAGS} ${PKG_LIBS} ${PKG_NTLM_LIBS} -lntlm 2>& 5
if [ -x ./test ] && ./test if [ -x ./test ] && ./test
then then