]> git.donarmstrong.com Git - lilypond.git/blobdiff - stepmake/aclocal.m4
put FlexLexer.h test in conftest.cc. Fixes
[lilypond.git] / stepmake / aclocal.m4
index 6a6b2e3815af7996a545c28066e645f8b1419c09..e249e98a67f2149c26711bd62652ec57edf7e8e0 100644 (file)
@@ -410,6 +410,23 @@ class yy_flex_lexer: public yyFlexLexer
 ])
   
 
+
+AC_DEFUN(STEPMAKE_FLEXLEXER_LOCATION, [
+       AC_MSG_CHECKING([FlexLexer.h path])
+
+       # ugh.
+       cat <<EOF > conftest.cc
+using namespace std;
+#include <FlexLexer.h>
+EOF
+       FLEXLEXER_PATH=`$CXX -E conftest.cc | \
+         sed 's!# 1 "\(.*\)FlexLexer.h"!@FLEXLEXER@\1@@!g' | grep '@@' | \
+         sed 's!.*@FLEXLEXER@\(.*\)@@.*$!\1!g' ` >& /dev/null
+       rm conftest.cc
+       AC_SUBST(FLEXLEXER_PATH)
+        AC_MSG_RESULT($FLEXLEXER_PATH)
+])
+
 AC_DEFUN(STEPMAKE_GCC, [
     if test "$GCC" = "yes"; then
         STEPMAKE_CHECK_VERSION(CC, $1, $2)
@@ -768,14 +785,7 @@ AC_DEFUN(STEPMAKE_KPATHSEA, [
        AC_CHECK_LIB(kpathsea, kpse_find_file)
        AC_CHECK_FUNCS(kpse_find_file,,kpathsea_b=no)
        if test "$kpathsea_b" = "no"; then
-           warn='kpathsea (libkpathsea-dev, kpathsea-devel or tetex-devel
-   package).
-   Else, please specify the directories where kpathsea/kpathsea.h and
-   libkpathsea.a are installed using --with-kpathsea-include and
-   --with-kpathsea-lib options.  You should install kpathsea; see
-   INSTALL.txt.  Rerun ./configure --without-kpathsea only if kpathsea
-   is not available for your platform.'
-           STEPMAKE_ADD_ENTRY(REQUIRED, $warn)
+           STEPMAKE_ADD_ENTRY(OPTIONAL, $warn)
        fi
     fi