X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=stepmake%2Faclocal.m4;h=a3ecf3f9a472223e619447d75fefa4fb23d5eff8;hb=9c3ecc7d6e596e8151a58ce7ed0dd9e1b0802d1e;hp=4cc525ea2a6b18e4ba6d4e98efa01b01b07ee5dd;hpb=1b1b69f41c8a193cbedf3226a6af9ec9b03a8731;p=lilypond.git diff --git a/stepmake/aclocal.m4 b/stepmake/aclocal.m4 index 4cc525ea2a..a3ecf3f9a4 100644 --- a/stepmake/aclocal.m4 +++ b/stepmake/aclocal.m4 @@ -34,7 +34,7 @@ AC_DEFUN(STEPMAKE_GET_VERSION, [ ## grab the first version number in --version output. eval _ver=\"\`("$1" --version || "$1" -V) 2>&1 | grep '\(^\| \)[0-9][0-9]*\.[0-9]' \ | head -n 1 \ - | tr ' ' '\n' | grep '[0-9]\.[0-9]' | head -n 1 | sed 's/\([0-9.]*\).*/\1/g'\`\" + | tr ' ' '\n' | sed 's/\([0-9][0-9]*\.[0-9][0-9.]*\).*/\1/g' | grep '\(^\| \)[0-9][0-9]*\.[0-9]' | head -n 1\`\" if test -z "$_ver"; then ## If empty, try date [fontforge] @@ -194,8 +194,6 @@ AC_DEFUN(STEPMAKE_COMPILE, [ AC_DEFINE(NDEBUG) DEFINES="$DEFINES -DNDEBUG" OPTIMIZE=" -O2 -finline-functions" - else - DEFINES="$DEFINES -D_GLIBCXX_DEBUG" fi if test $profile_b = yes; then @@ -217,12 +215,12 @@ AC_DEFUN(STEPMAKE_COMPILE, [ save_cflags="$CFLAGS" CFLAGS=" -pipe $CFLAGS"; AC_CACHE_CHECK([whether compiler understands -pipe], - [stepmake_cflags_pipe], + [stepmake_cv_cflags_pipe], AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[/* -pipe test */]])], - [stepmake_cflags_pipe=yes], - [stepmake_cflags_pipe=no])) + [stepmake_cv_cflags_pipe=yes], + [stepmake_cv_cflags_pipe=no])) CFLAGS=$save_cflags - if test $stepmake_cflags_pipe = yes; then + if test $stepmake_cv_cflags_pipe = yes; then OPTIMIZE="$OPTIMIZE -pipe" fi fi @@ -267,12 +265,12 @@ AC_DEFUN(STEPMAKE_CXX, [ AC_DEFUN(STEPMAKE_CXXTEMPLATE, [ AC_CACHE_CHECK([whether explicit instantiation is needed], - lily_cv_need_explicit_instantiation, + stepmake_cv_need_explicit_instantiation, AC_LINK_IFELSE([AC_LANG_PROGRAM([[ template struct foo { static int baz; }; template int foo::baz = 1; - ]], [[ return foo::baz; ]])],[lily_cv_need_explicit_instantiation=no],[lily_cv_need_explicit_instantiation=yes])) - if test x"$lily_cv_need_explicit_instantiation"x = x"yes"x; then + ]], [[ return foo::baz; ]])],[stepmake_cv_need_explicit_instantiation=no],[stepmake_cv_need_explicit_instantiation=yes])) + if test x"$stepmake_cv_need_explicit_instantiation"x = x"yes"x; then AC_DEFINE(NEED_EXPLICIT_INSTANTIATION) fi ]) @@ -423,7 +421,7 @@ AC_DEFUN(STEPMAKE_FLEXLEXER, [ # in 2.5.4 <= flex < 2.5.29 AC_LANG_PUSH(C++) AC_CACHE_CHECK([for yyFlexLexer.yy_current_buffer], - [stepmake_flexlexer_yy_current_buffer], + [stepmake_cv_flexlexer_yy_current_buffer], AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ using namespace std; #include @@ -436,9 +434,9 @@ class yy_flex_lexer: public yyFlexLexer } }; ]])], - [stepmake_flexlexer_yy_current_buffer=yes], - [stepmake_flexlexer_yy_current_buffer=no])) - if test $stepmake_flexlexer_yy_current_buffer = yes; then + [stepmake_cv_flexlexer_yy_current_buffer=yes], + [stepmake_cv_flexlexer_yy_current_buffer=no])) + if test $stepmake_cv_flexlexer_yy_current_buffer = yes; then AC_DEFINE(HAVE_FLEXLEXER_YY_CURRENT_BUFFER, 1, [Define to 1 if yyFlexLexer has yy_current_buffer.]) fi AC_LANG_POP(C++) @@ -454,7 +452,7 @@ AC_DEFUN(STEPMAKE_FLEXLEXER_LOCATION, [ using namespace std; #include EOF - FLEXLEXER_FILE=`$CXX -E conftest.cc | \ + FLEXLEXER_FILE=`eval $ac_cpp conftest.cc | \ sed 's!# 1 "\(.*FlexLexer.h\)"!@FLEXLEXER@\1@@!g' | grep '@@' | \ sed 's!.*@FLEXLEXER@\(.*\)@@.*$!\1!g' ` 1> /dev/null 2> /dev/null rm conftest.cc @@ -670,7 +668,11 @@ AC_DEFUN(STEPMAKE_INIT, [ AC_MSG_CHECKING(builddir) ugh_ugh_autoconf250_builddir="`pwd`" - if test "$srcdir" = "."; then + + here_dir=$(cd . && pwd) + full_src_dir=$(cd $srcdir && pwd) + + if test "$full_src_dir" = "$here_dir"; then srcdir_build=yes else srcdir_build=no @@ -792,84 +794,6 @@ AC_DEFUN(STEPMAKE_INIT, [ ]) -AC_DEFUN(STEPMAKE_KPATHSEA, [ - - AC_ARG_WITH(kpathsea-include, - [ --with-kpathsea-include=DIR - location of the kpathsea include dir],[ - if test "$withval" = "yes" -o "$withval" = "no"; then - AC_MSG_WARN(Usage: --with-kpathsea-include=includedir) - else - CPPFLAGS="$CPPFLAGS -I${withval}" - fi - ]) - - AC_ARG_WITH(kpathsea-lib, - [ --with-kpathsea-lib=DIR location of the kpathsea lib dir],[ - if test "$withval" = "yes" -o "$withval" = "no"; then - AC_MSG_WARN(Usage: --with-kpathsea-lib=libdir) - else - LDFLAGS="$LDFLAGS -L${withval}" - fi - ]) - - kpathsea_b=yes - AC_ARG_ENABLE(kpathsea, - [ --enable-kpathsea use kpathsea lib. Default: on], - [kpathsea_b=$enableval]) - - save_LIBS="$LIBS" - if test "$kpathsea_b" != "no"; then - AC_CHECK_HEADERS([kpathsea/kpathsea.h],,kpathsea_b=no) - AC_CHECK_LIB(kpathsea, kpse_find_file) - AC_CHECK_FUNCS(kpse_find_file,,kpathsea_b=no) - if test "$kpathsea_b" = "no"; then - STEPMAKE_ADD_ENTRY(OPTIONAL, $warn) - fi - fi - - save_CFLAGS="$CFLAGS" - CFLAGS=`echo "-shared $CFLAGS" | sed -e 's/ -g//'` - AC_MSG_CHECKING([for shared libkpathsea]) - AC_TRY_LINK([#include ], - [kpse_var_expand ("\$TEXMF");], - [have_libkpathsea_so=maybe; - shared_size=`wc -c conftest$ac_exeext`; - shared_size=`echo $shared_size | sed -e 's/ .*//g'`], - [have_libkpathsea_so=no]) - - if test "$have_libkpathsea_so" = "maybe"; then - if test "$shared_size" -lt 40000 ; then - have_libkpathsea_so=yes - else - have_libkpathsea_so=no - fi - fi - - AC_MSG_RESULT($have_libkpathsea_so) - if test "$have_libkpathsea_so" = "yes"; then - AC_DEFINE(HAVE_LIBKPATHSEA_SO) - fi - CFLAGS="$save_CFLAGS" - - KPATHSEA_LIBS="$LIBS" - LIBS="$save_LIBS" - AC_MSG_CHECKING(whether to use kpathsea) - if test "$kpathsea_b" != no; then - AC_MSG_RESULT(yes) - KPATHSEA=1 - else - AC_MSG_RESULT(no) - KPATHSEA=0 - fi - - AC_SUBST(KPATHSEA) - AC_SUBST(KPATHSEA_LIBS) - AC_SUBST(HAVE_LIBKPATHSEA_SO, $have_libkpathsea_so) - AC_DEFINE_UNQUOTED(KPATHSEA, $KPATHSEA) -]) - - AC_DEFUN(STEPMAKE_LIB, [ STEPMAKE_PROGS(AR, ar, $1) AC_PROG_RANLIB @@ -1027,7 +951,16 @@ AC_DEFUN(STEPMAKE_PYTHON_DEVEL, [ fi ]) - if test "$cross_compiling" = "no" -a -z "$PYTHON_CFLAGS"; then + AC_CHECK_PROGS(PYTHON_CONFIG, python-config, no) + + if test -z "$PYTHON_CFLAGS" -a "$PYTHON_CONFIG" != "no"; then + # Clean out junk: http://bugs.python.org/issue3290 + # Python headers may need some -f* flags, leave them in. + PYTHON_CFLAGS=`$PYTHON_CONFIG --cflags | sed -e 's/ -\(W\|D\|O\|m\)\(\w\|-\|=\|,\)\+//g'` + PYTHON_LDFLAGS=`$PYTHON_CONFIG --ldflags` + fi + + if test -z "$PYTHON_CFLAGS" -a "$cross_compiling" = "no"; then changequote(<<, >>)#dnl # alternatively, for python >= 2.0 # 'import sys, distutils.sysconfig; sys.stdout.write (distutils.sysconfig.get_python_inc ())' @@ -1036,11 +969,6 @@ AC_DEFUN(STEPMAKE_PYTHON_DEVEL, [ changequote([, ])#dnl fi - if test "$cross_compiling" = "yes" -a -z "$PYTHON_CFLAGS"; then - PYTHON_CFLAGS=`python-config --cflags` - PYTHON_LDFLAGS=`python-config --ldflags` - fi - if test -z "$PYTHON_HEADER"; then CPPFLAGS="$PYTHON_CFLAGS $CPPFLAGS" AC_CHECK_HEADERS([Python.h],[PYTHON_HEADER=yes]) @@ -1057,16 +985,16 @@ AC_DEFUN(STEPMAKE_PYTHON_DEVEL, [ AC_DEFUN(STEPMAKE_STL_DATA_METHOD, [ AC_LANG_PUSH(C++) AC_CACHE_CHECK([for stl.data () method], - [stepmake_stl_data_method], + [stepmake_cv_stl_data_method], AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #include using namespace std; vector v; void *p = v.data (); ]])], - [stepmake_stl_data_method=yes], - [stepmake_stl_data_method=no])) - if test $stepmake_stl_data_method = yes; then + [stepmake_cv_stl_data_method=yes], + [stepmake_cv_stl_data_method=no])) + if test $stepmake_cv_stl_data_method = yes; then AC_DEFINE(HAVE_STL_DATA_METHOD, 1, [define if stl classes have data () method]) fi AC_LANG_POP(C++) @@ -1080,6 +1008,7 @@ AC_DEFUN(STEPMAKE_TEXMF_DIRS, [ AC_DEFUN(STEPMAKE_TEXMF, [ STEPMAKE_PROGS(METAFONT, mf-nowin mf mfw mfont, $1) + STEPMAKE_PROGS(METAPOST, mpost, $1) # STEPMAKE_PROGS(INIMETAFONT, inimf inimfont "$METAFONT -ini", $1) AC_MSG_CHECKING(for working metafont mode)