summaryrefslogtreecommitdiff
blob: 8920e773004b55b64f11517ea7d4dbc914ab494c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
--- a/configure.in	2011-01-19 20:43:35.000000000 +0100
+++ b/configure.in	2012-02-21 11:14:51.047974999 +0100
@@ -265,7 +265,6 @@
         cpg_package=openais
     fi
     TRY_PATH="$AIS_TRY_PATH"
-    AC_MSG_CHECKING([for cpg_initialize in -lcpg])
     while test "x$TRY_PATH" != "x"; do
         TRY="`echo $TRY_PATH | cut -f1 -d:`"
         NEW_TRY_PATH="`echo $TRY_PATH | cut -f2- -d:`"
@@ -281,9 +280,8 @@
         # TRY="$TRY"
 
         saved_LDFLAGS="$LDFLAGS"
-        LDFLAGS="$LDFLAGS $TRY -lcpg"
-        AC_LINK_IFELSE([AC_LANG_CALL([], [cpg_initialize])],
-        	       cpg_found=yes)
+        LDFLAGS="$LDFLAGS $TRY"
+        AC_SEARCH_LIBS([cpg_initialize], [cpg], [cpg_found=yes], [], [])
         LDFLAGS="$saved_LDFLAGS"
 
         if test "x$cpg_found" = "xyes"; then
@@ -292,10 +290,7 @@
         fi
     done
 fi
-if test "x$cpg_found" = "xyes"; then
-    AC_MSG_RESULT(yes)
-else
-    AC_MSG_RESULT(no)
+if test "x$cpg_found" = "xno"; then
     AC_MSG_WARN([libcpg not found, ocfs2_controld will not be built])
 fi
 AC_SUBST(CPG_LDFLAGS)
@@ -309,7 +304,6 @@
 if test "x$ckpt_found" = "xyes"; then
     ckpt_found=
     TRY_PATH="$AIS_TRY_PATH"
-    AC_MSG_CHECKING([for saCkptInitialize in -lSaCkpt])
     while test "x$TRY_PATH" != "x"; do
         TRY="`echo $TRY_PATH | cut -f1 -d:`"
         NEW_TRY_PATH="`echo $TRY_PATH | cut -f2- -d:`"
@@ -325,9 +319,8 @@
         # TRY="$TRY"
 
         saved_LDFLAGS="$LDFLAGS"
-        LDFLAGS="$LDFLAGS $TRY -lSaCkpt"
-        AC_LINK_IFELSE([AC_LANG_CALL([], [saCkptInitialize])],
-        	       ckpt_found=yes)
+        LDFLAGS="$LDFLAGS $TRY"
+        AC_SEARCH_LIBS([saCkptInitialize], [SaCkpt], [ckpt_found=yes], [], [])
         LDFLAGS="$saved_LDFLAGS"
 
         if test "x$ckpt_found" = "xyes"; then
@@ -336,10 +329,7 @@
         fi
     done
 fi
-if test "x$ckpt_found" = "xyes"; then
-    AC_MSG_RESULT(yes)
-else
-    AC_MSG_RESULT(no)
+if test "x$ckpt_found" = "xno"; then
     AC_MSG_WARN([libSaCkpt not found, ocfs2_controld will not be built])
 fi
 AC_SUBST(AIS_LDFLAGS)

--- a/ocfs2_controld/Makefile	2012-02-21 11:49:36.248974932 +0100
+++ b/ocfs2_controld/Makefile	2012-02-21 11:49:47.943974980 +0100
@@ -14,7 +14,7 @@
 ifneq ($(BUILD_PCMK_SUPPORT),)
 SBIN_PROGRAMS += ocfs2_controld.pcmk
 # Some pacemaker headers which pacemaker.c includes want this.
-PCMK_INCLUDES = -I/usr/include/pacemaker -I/usr/include/heartbeat/ $(GLIB_CFLAGS)
+PCMK_INCLUDES = -I/usr/include/pacemaker -I/usr/include/heartbeat/ `pkg-config --cflags libxml-2.0` $(GLIB_CFLAGS)
 endif
 
 INCLUDES = -I$(TOPDIR)/include -I. $(PCMK_INCLUDES)