diff options
author | Hans-Christoph Steiner <eighthave@users.sourceforge.net> | 2010-01-28 02:47:38 +0000 |
---|---|---|
committer | Hans-Christoph Steiner <eighthave@users.sourceforge.net> | 2010-01-28 02:47:38 +0000 |
commit | ca43bbd027f5ae35e27583594da0664d58fa4aef (patch) | |
tree | 81d90b48a5c8a6f6f1980003ced4fd7e2a8085cc | |
parent | 8beeced2c089b6c3ee05946e46f2033440fb2cf9 (diff) |
added --with-pd= so you can set where the pd sources are
svn path=/trunk/externals/io/hidio/; revision=13111
-rw-r--r-- | configure.ac | 28 |
1 files changed, 25 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac index 1212804..0c821e3 100644 --- a/configure.ac +++ b/configure.ac @@ -4,9 +4,6 @@ AC_CONFIG_SRCDIR(hidio.c) AC_CANONICAL_HOST AM_INIT_AUTOMAKE(1.9) -PD_PATH=../../../pd -CFLAGS="-DPD $CFLAGS -I$PD_PATH/src" - case $host in *darwin*) MACOSX=yes @@ -46,6 +43,27 @@ AC_SUBST(EXTENSION) AC_HEADER_STDC +AC_ARG_WITH([pd], + [AS_HELP_STRING([--with-pd], + [location of pd sourcecode])], ,) + +if test "z$with_pd" != "z"; then + if test "z${with_pd%%/*}" = "z" ; then + # it's an absolute path + if test -f $with_pd ; then + PD_PATH=$with_pd + else + AC_MSG_ERROR([The file \"$with_pd\" does not exist.]) + fi + else + AC_MSG_ERROR([--with-pd requires an absolute path]) + fi +elif test -d ../../../pd; then + PD_PATH="../../../pd" +fi +AC_MSG_RESULT([checking for pd sourcecode... $PD_PATH]) +CFLAGS="-DPD $CFLAGS -I$PD_PATH/src" + AC_ARG_ENABLE([debug], [AS_HELP_STRING([--enable-debug], [use debugging support])], [debug=$enableval]) @@ -95,3 +113,7 @@ AS_IF([test x$universal = xyes], [ AC_MSG_RESULT( To build a Universal Binary on Mac OS X run it like this: ./configure --enable-universal --disable-dependency-tracking)]) + +echo " +Building using Pd headers in $PD_PATH/src +" |