Add prefix to rtaudio-config output. 2/head
authorStephen Sinclair <radarsat1@gmail.com>
Fri, 11 Oct 2013 16:31:46 +0000 (18:31 +0200)
committerStephen Sinclair <radarsat1@gmail.com>
Fri, 11 Oct 2013 16:57:30 +0000 (18:57 +0200)
configure.ac
rtaudio-config.in

index 6586116d1aa51fa2190fbbd7af710d0607b5bbef..b89fdb0086ecebb5cdc5a9fcbab972ab96b1f077 100644 (file)
@@ -44,6 +44,12 @@ AC_ARG_ENABLE(debug,
 # Checks for functions
 AC_CHECK_FUNC(gettimeofday, [cppflag="$cppflag -DHAVE_GETTIMEOFDAY"], )
 
+# Set paths if prefix is defined
+if test x"$prefix" != x; then
+  LIBS="$LIBS -L$prefix/lib"
+  CPPFLAGS="$CPPFLAGS -I$prefix/include"
+fi
+
 # For -I and -D flags
 CPPFLAGS="$CPPFLAGS $cppflag"
 
index e7ff82845cda854aa1f666fdb799ab51ac832ae5..5f83d512f830da4614e59e0969047b9d05888399 100644 (file)
@@ -9,7 +9,7 @@ CXXFLAGS="@CXXFLAGS@"
 CPPFLAGS="@CPPFLAGS@"
 
 if (test "x$1" = "x--libs") ; then
-  echo "$LIBRARY"
+  echo "$LIBRARY -lrtaudio"
 elif (test "x$1" = "x--cxxflags") ; then
   echo "$CXXFLAGS"
 elif (test "x$1" = "x--cppflags") ; then