- get libntlm cflags/libs from pkg-config
This commit is contained in:
parent
804e456c03
commit
a2d37af516
|
@ -63,7 +63,8 @@ endif
|
|||
endif
|
||||
|
||||
ifeq ($(HAVE_NTLM),1)
|
||||
NTLM_LIBS ?= -lntlm
|
||||
NTLM_INCLUDES = `$(PKG_CONFIG) --cflags libntlm`
|
||||
NTLM_LIBS = `$(PKG_CONFIG) --libs libntlm`
|
||||
endif
|
||||
|
||||
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`
|
||||
|
||||
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)
|
||||
FLAGS += -g
|
||||
|
|
|
@ -124,6 +124,9 @@ rm -f test test.exe test.o test.c
|
|||
# echo "Checking for libntlm... " 1>& 2
|
||||
echo "Checking for libntlm... " 1>& 5
|
||||
|
||||
PKG_NTLM_INCLUDE=`pkg-config libntlm --cflags`
|
||||
PKG_NTLM_LIBS=`pkg-config libntlm --libs`
|
||||
|
||||
cat << EOF > test.c
|
||||
#include <ntlm.h>
|
||||
|
||||
|
@ -136,8 +139,8 @@ int main()
|
|||
}
|
||||
EOF
|
||||
|
||||
$CC ${CFLAGS} ${PKG_INCLUDE} -c test.c -o test.o 2>& 5
|
||||
$CC test.o -o test ${LINK_FLAGS} ${PKG_LIBS} -lntlm 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} ${PKG_NTLM_LIBS} -lntlm 2>& 5
|
||||
|
||||
if [ -x ./test ] && ./test
|
||||
then
|
||||
|
|
Loading…
Reference in New Issue