#!/bin/sh
# autogen.sh - generates configure using the autotools
-: ${LIBTOOLIZE=libtoolize}
+OS=`uname`
+if [ "$OS" == "Darwin" ]; then
+ : ${LIBTOOLIZE=glibtoolize}
+elif [ "$OS" == "Linux" ]; then
+ : ${LIBTOOLIZE=libtoolize}
+fi
+
: ${ACLOCAL=aclocal}
: ${AUTOHEADER=autoheader}
: ${AUTOMAKE=automake}
${AUTOCONF}
-SILENT=`which libtoolize aclocal autoheader automake autoconf`
+SILENT=`which ${LIBTOOLIZE} ${ACLOCAL} ${AUTOHEADER} ${AUTOMAKE} ${AUTOCONF}`
case "$?" in
0 )
echo All build tools found.
#-----------------------------
AC_CHECK_LIB([dl], [dlerror], [],AC_MSG_ERROR(***OpenSRF requires libdl))
-AC_CHECK_LIB([memcache], [mc_req_free], [], AC_MSG_ERROR(***OpenSRF requires memcache development headers))
+AC_SEARCH_LIBS([mc_req_free], [memcache], [], AC_MSG_ERROR(***OpenSRF requires memcache development headers))
AC_CHECK_LIB([ncurses], [initscr], [], AC_MSG_ERROR(***OpenSRF requires ncurses development headers))
AC_CHECK_LIB([readline], [readline], [], AC_MSG_ERROR(***OpenSRF requires readline development headers))
AC_CHECK_LIB([xml2], [xmlAddID], [], AC_MSG_ERROR(***OpenSRF requires xml2 development headers))
#include <opensrf/osrf_prefork.h>
#include <signal.h>
+#ifndef HOST_NAME_MAX
+#define HOST_NAME_MAX 256
+#endif
+
static void report_child_status( pid_t pid, int status );
struct child_node;
typedef struct child_node ChildNode;
#include <opensrf/transport_session.h>
+#ifndef HOST_NAME_MAX
+#define HOST_NAME_MAX 256
+#endif
+
static char* get_xml_attr( const xmlChar** atts, const char* attr_name );
// ---------------------------------------------------------------------------------