# HG changeset patch # User Adam Chlipala # Date 1265905776 18000 # Node ID 7a17588edbffe802db7d682dd9857ca267f7deef # Parent 8679ba87cf3cf88d9c53ecdf9db098b814a5a2a6 'configure' checks for libmhash and MLton diff -r 8679ba87cf3c -r 7a17588edbff Makefile.in --- a/Makefile.in Thu Feb 11 09:10:01 2010 -0500 +++ b/Makefile.in Thu Feb 11 11:29:36 2010 -0500 @@ -146,6 +146,9 @@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ +MLLEX = @MLLEX@ +MLTON := mlton +MLYACC = @MLYACC@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ @@ -224,7 +227,6 @@ LIB_C := $(LIB)/c LIB_JS := $(LIB)/js SUBDIRS = src/c -MLTON := mlton all: all-recursive .SUFFIXES: diff -r 8679ba87cf3c -r 7a17588edbff configure --- a/configure Thu Feb 11 09:10:01 2010 -0500 +++ b/configure Thu Feb 11 11:29:36 2010 -0500 @@ -748,6 +748,9 @@ INCLUDE LIB BIN +MLYACC +MLLEX +MLTON OTOOL64 OTOOL LIPO @@ -5317,13 +5320,13 @@ else lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext - (eval echo "\"\$as_me:5320: $ac_compile\"" >&5) + (eval echo "\"\$as_me:5323: $ac_compile\"" >&5) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&5 - (eval echo "\"\$as_me:5323: $NM \\\"conftest.$ac_objext\\\"\"" >&5) + (eval echo "\"\$as_me:5326: $NM \\\"conftest.$ac_objext\\\"\"" >&5) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&5 - (eval echo "\"\$as_me:5326: output\"" >&5) + (eval echo "\"\$as_me:5329: output\"" >&5) cat conftest.out >&5 if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" @@ -6528,7 +6531,7 @@ ;; *-*-irix6*) # Find out which ABI we are using. - echo '#line 6531 "configure"' > conftest.$ac_ext + echo '#line 6534 "configure"' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -7790,11 +7793,11 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:7793: $lt_compile\"" >&5) + (eval echo "\"\$as_me:7796: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:7797: \$? = $ac_status" >&5 + echo "$as_me:7800: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -8129,11 +8132,11 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:8132: $lt_compile\"" >&5) + (eval echo "\"\$as_me:8135: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:8136: \$? = $ac_status" >&5 + echo "$as_me:8139: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -8234,11 +8237,11 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:8237: $lt_compile\"" >&5) + (eval echo "\"\$as_me:8240: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:8241: \$? = $ac_status" >&5 + echo "$as_me:8244: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -8289,11 +8292,11 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:8292: $lt_compile\"" >&5) + (eval echo "\"\$as_me:8295: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:8296: \$? = $ac_status" >&5 + echo "$as_me:8299: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -10673,7 +10676,7 @@ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 10676 "configure" +#line 10679 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -10769,7 +10772,7 @@ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 10772 "configure" +#line 10775 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -10998,6 +11001,191 @@ +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for mhash_get_block_size in -lmhash" >&5 +$as_echo_n "checking for mhash_get_block_size in -lmhash... " >&6; } +if test "${ac_cv_lib_mhash_mhash_get_block_size+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lmhash $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char mhash_get_block_size (); +int +main () +{ +return mhash_get_block_size (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_mhash_mhash_get_block_size=yes +else + ac_cv_lib_mhash_mhash_get_block_size=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mhash_mhash_get_block_size" >&5 +$as_echo "$ac_cv_lib_mhash_mhash_get_block_size" >&6; } +if test "x$ac_cv_lib_mhash_mhash_get_block_size" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBMHASH 1 +_ACEOF + + LIBS="-lmhash $LIBS" + +else + echo "You must install libmhash."; exit 1 +fi + +ac_fn_c_check_header_mongrel "$LINENO" "mhash.h" "ac_cv_header_mhash_h" "$ac_includes_default" +if test "x$ac_cv_header_mhash_h" = x""yes; then : + +else + echo "You must install libmhash dev files."; exit 1 +fi + + + +# Extract the first word of "mlton", so it can be a program name with args. +set dummy mlton; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_MLTON+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$MLTON"; then + ac_cv_prog_MLTON="$MLTON" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_MLTON="yes" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +MLTON=$ac_cv_prog_MLTON +if test -n "$MLTON"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MLTON" >&5 +$as_echo "$MLTON" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + +if test -z $MLTON; then + echo "You must install MLton." + exit 1 +fi + +# Extract the first word of "mllex", so it can be a program name with args. +set dummy mllex; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_MLLEX+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$MLLEX"; then + ac_cv_prog_MLLEX="$MLLEX" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_MLLEX="yes" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +MLLEX=$ac_cv_prog_MLLEX +if test -n "$MLLEX"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MLLEX" >&5 +$as_echo "$MLLEX" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + +if test -z $MLLEX; then + echo "You must install MLton (to get mllex)." + exit 1 +fi + +# Extract the first word of "mlyacc", so it can be a program name with args. +set dummy mlyacc; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_MLYACC+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$MLYACC"; then + ac_cv_prog_MLYACC="$MLYACC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_MLYACC="yes" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +MLYACC=$ac_cv_prog_MLYACC +if test -n "$MLYACC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MLYACC" >&5 +$as_echo "$MLYACC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + +if test -z $MLYACC; then + echo "You must install MLton (to get mlyacc)." + exit 1 +fi + if test $prefix = "NONE"; then prefix=/usr/local fi diff -r 8679ba87cf3c -r 7a17588edbff configure.ac --- a/configure.ac Thu Feb 11 09:10:01 2010 -0500 +++ b/configure.ac Thu Feb 11 11:29:36 2010 -0500 @@ -5,6 +5,30 @@ AC_PROG_LIBTOOL() AC_CONFIG_MACRO_DIR([m4]) +AC_CHECK_LIB(mhash, mhash_get_block_size, [], [echo "You must install libmhash."; exit 1]) +AC_CHECK_HEADER([mhash.h], [], [echo "You must install libmhash dev files."; exit 1]) + +AC_CHECK_PROG(MLTON, mlton, yes, []) + +if test [-z $MLTON]; then + echo "You must install MLton." + exit 1 +fi + +AC_CHECK_PROG(MLLEX, mllex, yes, []) + +if test [-z $MLLEX]; then + echo "You must install MLton (to get mllex)." + exit 1 +fi + +AC_CHECK_PROG(MLYACC, mlyacc, yes, []) + +if test [-z $MLYACC]; then + echo "You must install MLton (to get mlyacc)." + exit 1 +fi + if test [$prefix = "NONE"]; then prefix=/usr/local fi diff -r 8679ba87cf3c -r 7a17588edbff src/c/Makefile.in --- a/src/c/Makefile.in Thu Feb 11 09:10:01 2010 -0500 +++ b/src/c/Makefile.in Thu Feb 11 11:29:36 2010 -0500 @@ -145,6 +145,9 @@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ +MLLEX = @MLLEX@ +MLTON = @MLTON@ +MLYACC = @MLYACC@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@