From 90b5c338c61163c97f28d2896c2f6bcc4341ba5e Mon Sep 17 00:00:00 2001 From: sboyette Date: Mon, 15 Sep 2008 16:47:20 +0000 Subject: [PATCH] initial steps toward OS X portage git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1428 9efc2488-bf62-4759-914b-345cdb29e865 --- autogen.sh | 10 ++++++++-- configure.ac | 2 +- src/libopensrf/osrf_system.c | 4 ++++ src/libopensrf/transport_session.c | 4 ++++ 4 files changed, 17 insertions(+), 3 deletions(-) diff --git a/autogen.sh b/autogen.sh index 9190b41..a4cdd62 100755 --- a/autogen.sh +++ b/autogen.sh @@ -1,7 +1,13 @@ #!/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} @@ -15,7 +21,7 @@ ${AUTOMAKE} --add-missing ${AUTOCONF} -SILENT=`which libtoolize aclocal autoheader automake autoconf` +SILENT=`which ${LIBTOOLIZE} ${ACLOCAL} ${AUTOHEADER} ${AUTOMAKE} ${AUTOCONF}` case "$?" in 0 ) echo All build tools found. diff --git a/configure.ac b/configure.ac index 745208e..9ebe579 100644 --- a/configure.ac +++ b/configure.ac @@ -202,7 +202,7 @@ fi #----------------------------- 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)) diff --git a/src/libopensrf/osrf_system.c b/src/libopensrf/osrf_system.c index 0e179ac..96f8c82 100644 --- a/src/libopensrf/osrf_system.c +++ b/src/libopensrf/osrf_system.c @@ -3,6 +3,10 @@ #include #include +#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; diff --git a/src/libopensrf/transport_session.c b/src/libopensrf/transport_session.c index 1854ee7..f0f70f1 100644 --- a/src/libopensrf/transport_session.c +++ b/src/libopensrf/transport_session.c @@ -1,5 +1,9 @@ #include +#ifndef HOST_NAME_MAX +#define HOST_NAME_MAX 256 +#endif + static char* get_xml_attr( const xmlChar** atts, const char* attr_name ); // --------------------------------------------------------------------------------- -- 2.43.2