--- configure.ac.orig 2017-09-01 00:10:07 UTC +++ configure.ac @@ -72,7 +72,7 @@ AC_MSG_CHECKING(whether to compile debug AC_ARG_ENABLE(debug, [ --enable-debug = enable various debug output], [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)]) + [AC_SUBST( cppflag, [] ) AC_SUBST( object_path, [Release] ) AC_MSG_RESULT(no)]) # Set paths if prefix is defined if test "x$prefix" != "x" && test "x$prefix" != "xNONE"; then @@ -85,7 +85,7 @@ CPPFLAGS="$CPPFLAGS $cppflag" # For debugging and optimization ... overwrite default because it has both -g and -O2 #CXXFLAGS="$CXXFLAGS $cxxflag" -CXXFLAGS="$cxxflag" +CXXFLAGS+="$cxxflag" # Check compiler and use -Wall if gnu. if [test $GXX = "yes" ;] then @@ -139,6 +139,11 @@ case $host in AC_CHECK_LIB(pthread, pthread_create, , AC_MSG_ERROR(RtMidi requires the pthread library!)) ;; + *-*-freebsd*) + # Checks for pthread library. + AC_CHECK_LIB(pthread, pthread_create, , AC_MSG_ERROR(RtMidi requires the pthread library!)) + ;; + *-apple*) # Look for Core flag AC_ARG_WITH(core, [ --with-core = choose CoreMidi API support (mac only)])