Improving osx support. we need to tell aclocal about some extra definitions we need a differently named libtoolize and we need a note about how to pass zlib things though pkg-config
seph
seph at directionless.org
Thu Aug 11 18:40:45 EDT 2011
---
.gitignore | 1 +
autogen.sh | 34 ++++++++++++++++++++++++++++++----
2 files changed, 31 insertions(+), 4 deletions(-)
diff --git a/.gitignore b/.gitignore
index af4828f..6bcb4d2 100644
--- a/.gitignore
+++ b/.gitignore
@@ -7,3 +7,4 @@ version.c
openconnect
nm-openconnect-auth-dialog
Make.config
+.DS_Store
diff --git a/autogen.sh b/autogen.sh
index 885c0df..2aff2b6 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -1,6 +1,32 @@
#!/bin/sh
+#set -x
-aclocal && \
- libtoolize --automake --copy --force && \
- automake --foreign --add-missing && \
- autoconf
+# on osx libtoolize is install as glibtoolize. Find it.
+if [ `uname` == "Darwin" ]; then
+ LIBTOOLIZE=glibtoolize
+else
+ LIBTOOLIZE=libtoolize
+fi
+
+# we need to include the aclocal macros for pkg-tool. which on OSX
+# might be in a number of places. I think this path can be larger, so
+# may as well err to including the various places.
+ACLOCAL_INCLUDES=""
+for dir in "/opt/local/share/aclocal" "/usr/local/share/aclocal"; do
+ if [ -e "$dir" ]; then
+ ACLOCAL_INCLUDES="$ACLOCAL_INCLUDES -I ${dir}"
+ fi
+done
+
+set -e
+aclocal $ACLOCAL_INCLUDES
+${LIBTOOLIZE} --automake --copy --force
+automake --foreign --add-missing
+autoconf
+
+if [ `uname` == "Darwin" ]; then
+ echo -e "\n\n"
+ echo "Before you run configure, you'll need to tell pkg-config about zlib"
+ echo 'export ZLIB_CFLAGS=" "'
+ echo 'export ZLIB_LIBS=" "'
+fi
--
1.7.3.2
--=-=-=
Content-Type: text/x-diff
Content-Disposition: inline;
filename=0002-Better-to-check-for-zlib-using-autoconf-and-not-pkg-.patch
More information about the openconnect-devel
mailing list