Add clplumbing stuff from cluster-glue-libs to configure.ac Also move AC_REPLACE_FUNCS before cluster-glue-libs are included so that the internal replacement functions are used rather than those from cluster-glue-libs diff -Naru Pacemaker-1-1-Pacemaker-1.1.5.orig/configure.ac Pacemaker-1-1-Pacemaker-1.1.5/configure.ac --- Pacemaker-1-1-Pacemaker-1.1.5.orig/configure.ac 2011-02-11 10:42:37.000000000 +0000 +++ Pacemaker-1-1-Pacemaker-1.1.5/configure.ac 2011-09-06 12:02:52.487266667 +0000 @@ -92,6 +92,45 @@ AC_STRUCT_TIMEZONE dnl =============================================== +dnl clplumbing partial copy from cluster-glue +dnl =============================================== +AC_CONFIG_FILES(lib/clplumbing/Makefile) +AC_CHECK_TYPES([nfds_t],,,[[#include ]]) + +HA_LOGDAEMON_IPC="${localstatedir}/lib/heartbeat/log_daemon" +AC_DEFINE_UNQUOTED(HA_LOGDAEMON_IPC, "$HA_LOGDAEMON_IPC", Logging Daemon IPC socket name) +AC_SUBST(HA_LOGDAEMON_IPC) + +AC_CHECK_HEADERS_ONCE([uuid/uuid.h]) +AC_CHECK_LIB(uuid, uuid_parse) dnl e2fsprogs +AC_CHECK_LIB(uuid, uuid_create) dnl ossp + +HA_URLBASE="http://linux-ha.org/wiki/" +AC_DEFINE_UNQUOTED(HA_URLBASE, "$HA_URLBASE", Web site base URL) + +dnl The following seems broken, and might be replaced with +dnl AC_C_BIGENDIAN([AC_DEFINE(CONFIG_BIG_ENDIAN, 1, [big])], [AC_DEFINE(CONFIG_LITTLE_ENDIAN, 1, [little])]) +dnl However that in turn may cause interop issues, so stick with the following +dnl which always defines CONFIG_BIG_ENDIAN +AC_MSG_CHECKING(for byteorder) +AC_TRY_RUN(`cat $srcdir/config/byteorder_test.c`, +[AC_MSG_RESULT(little-endian); AC_DEFINE(CONFIG_LITTLE_ENDIAN, 1, [little-endian])], +[AC_MSG_RESULT(big-endian); AC_DEFINE(CONFIG_BIG_ENDIAN, 1, [big-endian])],) + +dnl Check syslog.h for 'facilitynames' table +AC_CACHE_CHECK([for facilitynames in syslog.h],ac_cv_HAVE_SYSLOG_FACILITYNAMES,[ +AC_TRY_COMPILE([ +#define SYSLOG_NAMES +#include +#include +], +[ void *fnames; fnames = facilitynames; ], +ac_cv_HAVE_SYSLOG_FACILITYNAMES=yes,ac_cv_HAVE_SYSLOG_FACILITYNAMES=no,ac_cv_HAVE_SYSLOG_FACILITYNAMES=cross)]) +if test x"$ac_cv_HAVE_SYSLOG_FACILITYNAMES" = x"yes"; then + AC_DEFINE(HAVE_SYSLOG_FACILITYNAMES,1,[ ]) +fi + +dnl =============================================== dnl Helpers dnl =============================================== cc_supports_flag() { @@ -987,18 +1026,57 @@ dnl ======================================================================== +dnl checks for library functions to replace them +dnl +dnl NoSuchFunctionName: +dnl is a dummy function which no system supplies. It is here to make +dnl the system compile semi-correctly on OpenBSD which doesn't know +dnl how to create an empty archive +dnl +dnl scandir: Only on BSD. +dnl System-V systems may have it, but hidden and/or deprecated. +dnl A replacement function is supplied for it. +dnl +dnl setenv: is some bsdish function that should also be avoided (use +dnl putenv instead) +dnl On the other hand, putenv doesn't provide the right API for the +dnl code and has memory leaks designed in (sigh...) Fortunately this +dnl A replacement function is supplied for it. +dnl +dnl strerror: returns a string that corresponds to an errno. +dnl A replacement function is supplied for it. +dnl +dnl unsetenv: is some bsdish function that should also be avoided (No +dnl replacement) +dnl A replacement function is supplied for it. +dnl +dnl strnlen: is a gnu function similar to strlen, but safer. +dnl We wrote a tolearably-fast replacement function for it. +dnl +dnl strndup: is a gnu function similar to strdup, but safer. +dnl We wrote a tolearably-fast replacement function for it. +dnl +dnl daemon: is a GNU function. The daemon() function is for programs wishing to +dnl detach themselves from the controlling terminal and run in the +dnl background as system daemon +dnl A replacement function is supplied for it. + +dnl AC_CONFIG_LIBOBJ_DIR([replace]) +AC_REPLACE_FUNCS(alphasort inet_pton NoSuchFunctionName scandir setenv strerror unsetenv strnlen strndup daemon strlcpy strlcat) + +dnl ======================================================================== dnl Cluster infrastructure - Heartbeat dnl ======================================================================== dnl On Debian, AC_CHECK_LIBS fail if a library has any unresolved symbols dnl So check for all the depenancies (so they're added to LIBS) before checking for -lplumb -AC_CHECK_LIB(pils, PILLoadPlugin) -AC_CHECK_LIB(plumb, G_main_add_IPC_Channel) +dnl AC_CHECK_LIB(pils, PILLoadPlugin) +dnl AC_CHECK_LIB(plumb, G_main_add_IPC_Channel) -if test x"$ac_cv_lib_plumb_G_main_add_IPC_Channel" != x"yes"; then - AC_MSG_FAILURE(Core Heartbeat utility libraries not found: $ac_cv_lib_plumb_G_main_add_IPC_Channel) -fi +dnl if test x"$ac_cv_lib_plumb_G_main_add_IPC_Channel" != x"yes"; then +dnl AC_MSG_FAILURE(Core Heartbeat utility libraries not found: $ac_cv_lib_plumb_G_main_add_IPC_Channel) +dnl fi dnl Compatability checks AC_CHECK_FUNCS(msgfromIPC_timeout) @@ -1427,44 +1505,6 @@ AM_CONDITIONAL(BUILD_OPENIPMI_SERVICELOG, test "$OPENIPMI_SERVICELOG_EXISTS" = "yes") dnl ======================================================================== -dnl checks for library functions to replace them -dnl -dnl NoSuchFunctionName: -dnl is a dummy function which no system supplies. It is here to make -dnl the system compile semi-correctly on OpenBSD which doesn't know -dnl how to create an empty archive -dnl -dnl scandir: Only on BSD. -dnl System-V systems may have it, but hidden and/or deprecated. -dnl A replacement function is supplied for it. -dnl -dnl setenv: is some bsdish function that should also be avoided (use -dnl putenv instead) -dnl On the other hand, putenv doesn't provide the right API for the -dnl code and has memory leaks designed in (sigh...) Fortunately this -dnl A replacement function is supplied for it. -dnl -dnl strerror: returns a string that corresponds to an errno. -dnl A replacement function is supplied for it. -dnl -dnl unsetenv: is some bsdish function that should also be avoided (No -dnl replacement) -dnl A replacement function is supplied for it. -dnl -dnl strnlen: is a gnu function similar to strlen, but safer. -dnl We wrote a tolearably-fast replacement function for it. -dnl -dnl strndup: is a gnu function similar to strdup, but safer. -dnl We wrote a tolearably-fast replacement function for it. -dnl -dnl daemon: is a GNU function. The daemon() function is for programs wishing to -dnl detach themselves from the controlling terminal and run in the -dnl background as system daemon -dnl A replacement function is supplied for it. - -AC_REPLACE_FUNCS(alphasort inet_pton NoSuchFunctionName scandir setenv strerror unsetenv strnlen strndup daemon strlcpy strlcat) - -dnl ======================================================================== dnl Compiler flags dnl ======================================================================== --- Pacemaker-1-1-Pacemaker-1.1.5.orig/lib/Makefile.am 2011-02-11 10:42:37.000000000 +0000 +++ Pacemaker-1-1-Pacemaker-1.1.5/lib/Makefile.am 2011-09-06 10:16:14.021007397 +0000 @@ -18,7 +18,7 @@ MAINTAINERCLEANFILES = Makefile.in ## Subdirectories... -SUBDIRS = common pengine transition cib fencing plugins +SUBDIRS = clplumbing common pengine transition cib fencing plugins DIST_SUBDIRS = $(SUBDIRS) ais if BUILD_CS_SUPPORT --- Pacemaker-1-1-Pacemaker-1.1.5.orig/lib/pengine/Makefile.am 2011-02-11 10:42:37.000000000 +0000 +++ Pacemaker-1-1-Pacemaker-1.1.5/lib/pengine/Makefile.am 2011-09-06 13:10:48.055720526 +0000 @@ -34,7 +34,7 @@ libpe_status_la_LDFLAGS = -version-info 3:0:0 libpe_status_la_SOURCES = $(rule_files) $(status_files) -libpe_status_la_LIBADD = -llrm @CURSESLIBS@ +libpe_status_la_LIBADD = @CURSESLIBS@ clean-generic: rm -f *.log *.debug *~ --- Pacemaker-1-1-Pacemaker-1.1.5.orig/lib/common/Makefile.am 2011-02-11 10:42:37.000000000 +0000 +++ Pacemaker-1-1-Pacemaker-1.1.5/lib/common/Makefile.am 2011-09-06 15:31:51.939304955 +0000 @@ -39,7 +39,6 @@ libcrmcluster_la_LDFLAGS = -version-info 1:0:0 libcrmcluster_la_LIBADD = $(CLUSTERLIBS) libcrmcommon.la -libcrmcluster_la_DEPENDENCIES = libcrmcommon.la # Can't use -Wcast-qual here because glib insists on pretending things are const # when they're not and thus we need the crm_element_value_const() hack @@ -50,7 +49,7 @@ CFLAGS = $(CFLAGS_COPY:-Wcast-qual=) -fPIC libcrmcommon_la_SOURCES = ipc.c utils.c xml.c iso8601.c iso8601_fields.c remote.c mainloop.c - +libcrmcommon_la_LIBADD = $(top_builddir)/lib/clplumbing/libclplumbing.la libcrmcommon_la_LDFLAGS = -version-info 2:0:0 $(GNUTLSLIBS) clean-generic: --- Pacemaker-1-1-Pacemaker-1.1.5.orig/pengine/Makefile.am 2011-02-11 10:42:37.000000000 +0000 +++ Pacemaker-1-1-Pacemaker-1.1.5/pengine/Makefile.am 2011-09-06 16:25:37.250991814 +0000 @@ -70,7 +70,7 @@ # -L$(top_builddir)/lib/pils -lpils -export-dynamic -module -avoid-version libpengine_la_SOURCES = pengine.c allocate.c utils.c constraints.c \ native.c group.c clone.c master.c graph.c -libpengine_la_LIBADD = $(top_builddir)/lib/pengine/libpe_status.la +libpengine_la_LIBADD = $(top_builddir)/lib/clplumbing/libclplumbing.la $(top_builddir)/lib/pengine/libpe_status.la pengine_SOURCES = main.c pengine_LDADD = $(COMMONLIBS) $(top_builddir)/lib/cib/libcib.la