From ca43bbd027f5ae35e27583594da0664d58fa4aef Mon Sep 17 00:00:00 2001 From: Hans-Christoph Steiner Date: Thu, 28 Jan 2010 02:47:38 +0000 Subject: added --with-pd= so you can set where the pd sources are svn path=/trunk/externals/io/hidio/; revision=13111 --- configure.ac | 28 +++++++++++++++++++++++++--- 1 file 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 +" -- cgit v1.2.1