Commit aaee6ba4 authored by IOhannes m zmölnig's avatar IOhannes m zmölnig
Browse files

[m4] fallback to pkg-config when looking for RTE

also use AS_CASE rather than bash's "case"
parent 676ee617
......@@ -504,19 +504,25 @@ GEM_RTE="Pure Data"
have_pd=no
AC_ARG_WITH([pd],
AS_HELP_STRING([--with-pd=<path/to/pd>],[where to find pd-binary (./bin/pd.exe) and pd-sources]))
## some default paths
AS_IF([ test "x${with_pd}" = "x" ],[
case $host_os in
*darwin*)
AS_CASE([$host_os],
[*-darwin*], [
AS_IF([ test -d "/Applications/Pd-extended.app/Contents/Resources" ], [ with_pd="/Applications/Pd-extended.app/Contents/Resources" ])
AS_IF([ test -d "/Applications/Pd.app/Contents/Resources" ], [ with_pd="/Applications/Pd.app/Contents/Resources" ])
;;
*mingw* | *cygwin*)
],
[*mingw* | *cygwin*], [
AS_IF([ test -d "${PROGRAMFILES}/Pd-extended" ], [ with_pd="${PROGRAMFILES}/Pd-extended" ])
AS_IF([ test -d "${PROGRAMFILES}/pd" ], [ with_pd="${PROGRAMFILES}/pd" ])
;;
esac
],)])
AS_IF([ test "x${with_pd}" = "x" || test "x${with_pd}" = "yes" ], [
PKG_CHECK_MODULES([PD], [pd], [have_pd="yes"])
GEM_RTE_CPPFLAGS="${GEM_RTE_CPPFLAGS} ${PD_CFLAGS}"
GEM_RTE_CFLAGS="${GEM_RTE_CFLAGS} ${PD_CFLAGS}"
GEM_RTE_CXXFLAGS="${GEM_RTE_CXXFLAGS} ${PD_CFLAGS}"
GEM_RTE_LIBS="${GEM_RTE_LIBS} ${PD_LIBS}"
with_pd=""
])
AS_IF([ test -d "$with_pd" ],[
......@@ -561,7 +567,6 @@ AS_IF([ test "x$have_pddll" = "xyes" ], [
AC_CHECK_HEADERS([m_pd.h], [have_pd="yes"], [have_pd="no"])
dnl LATER check why this doesn't use the --with-pd includes
dnl for now it will basically disable anything that needs s_stuff.h if it cannot be found in /usr[/local]/include
AC_CHECK_HEADERS([s_stuff.h], [], [],
[#ifdef HAVE_M_PD_H
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment