Browse Source

Add prefix to output of rtmidi-config.

Stephen Sinclair 11 năm trước cách đây
mục cha
commit
f7f360f784
2 tập tin đã thay đổi với 7 bổ sung1 xóa
  1. 6 0
      configure.ac
  2. 1 1
      rtmidi-config.in

+ 6 - 0
configure.ac

@@ -26,6 +26,12 @@ AC_ARG_ENABLE(debug,
   [AC_SUBST( cppflag, [-D__RTMIDI_DEBUG__] ) AC_SUBST( cxxflag, [-g] ) AC_SUBST( object_path, [Debug] ) AC_MSG_RESULT(yes)],
   [AC_SUBST( cppflag, [] ) AC_SUBST( cxxflag, [-O3] ) AC_SUBST( object_path, [Release] ) AC_MSG_RESULT(no)])
 
+# 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"
 

+ 1 - 1
rtmidi-config.in

@@ -9,7 +9,7 @@ CXXFLAGS="@CXXFLAGS@"
 CPPFLAGS="@CPPFLAGS@"
 
 if (test "x$1" = "x--libs") ; then
-  echo "$LIBRARY"
+  echo "$LIBRARY -lrtmidi"
 elif (test "x$1" = "x--cxxflags") ; then
   echo "$CXXFLAGS"
 elif (test "x$1" = "x--cppflags") ; then