2341
2381
case $srcdir in
2342
2382
*[\\\"\#\$\&\'\`$am_lf\ \ ]*)
2343
as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;;
2383
as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;;
2346
# Do `set' in a subshell so we don't clobber the current shell's
2386
# Do 'set' in a subshell so we don't clobber the current shell's
2347
2387
# arguments. Must try -L first in case configure is actually a
2348
2388
# symlink; some systems play weird games with the mod time of symlinks
2349
2389
# (eg FreeBSD returns the mod time of the symlink's containing
2352
set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
2353
if test "$*" = "X"; then
2355
set X `ls -t "$srcdir/configure" conftest.file`
2358
if test "$*" != "X $srcdir/configure conftest.file" \
2359
&& test "$*" != "X conftest.file $srcdir/configure"; then
2361
# If neither matched, then we have a broken ls. This can happen
2362
# if, for instance, CONFIG_SHELL is bash and it inherits a
2363
# broken ls alias from the environment. This has actually
2364
# happened. Such a system could not be considered "sane".
2365
as_fn_error $? "ls -t appears to fail. Make sure there is not a broken
2366
alias in your environment" "$LINENO" 5
2393
for am_try in 1 2; do
2394
echo "timestamp, slept: $am_has_slept" > conftest.file
2395
set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
2396
if test "$*" = "X"; then
2398
set X `ls -t "$srcdir/configure" conftest.file`
2400
if test "$*" != "X $srcdir/configure conftest.file" \
2401
&& test "$*" != "X conftest.file $srcdir/configure"; then
2403
# If neither matched, then we have a broken ls. This can happen
2404
# if, for instance, CONFIG_SHELL is bash and it inherits a
2405
# broken ls alias from the environment. This has actually
2406
# happened. Such a system could not be considered "sane".
2407
as_fn_error $? "ls -t appears to fail. Make sure there is not a broken
2408
alias in your environment" "$LINENO" 5
2410
if test "$2" = conftest.file || test $am_try -eq 2; then
2369
2417
test "$2" = conftest.file
2697
2788
MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
2699
# We need awk for the "check" target. The system "awk" is bad on
2701
# Always define AMTAR for backward compatibility.
2703
AMTAR=${AMTAR-"${am_missing_run}tar"}
2705
am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
2790
# For better backward compatibility. To be removed once Automake 1.9.x
2791
# dies out for good. For more background, see:
2792
# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
2793
# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
2794
mkdir_p='$(MKDIR_P)'
2796
# We need awk for the "check" target (and possibly the TAP driver). The
2797
# system "awk" is bad on some platforms.
2798
# Always define AMTAR for backward compatibility. Yes, it's still used
2799
# in the wild :-( We should find a proper way to deprecate it ...
2803
# We'll loop over all known methods to create a tar archive until one works.
2804
_am_tools='gnutar pax cpio none'
2806
am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'
2813
# POSIX will say in a future version that running "rm -f" with no argument
2814
# is OK; and we want to be able to make that assumption in our Makefile
2815
# recipes. So use an aggressive probe to check that the usage we want is
2816
# actually supported "in the wild" to an acceptable degree.
2817
# See automake bug#10828.
2818
# To make any issue more visible, cause the running configure to be aborted
2819
# by default if the 'rm' program in use doesn't match our expectations; the
2820
# user can still override this though.
2821
if rm -f && rm -fr && rm -rf; then : OK; else
2825
Your 'rm' program seems unable to run without file operands specified
2826
on the command line, even when the '-f' option is present. This is contrary
2827
to the behaviour of most rm programs out there, and not conforming with
2828
the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
2830
Please tell bug-automake@gnu.org about your system, including the value
2831
of your $PATH and any error possibly output before this message. This
2832
can help us improve future automake versions.
2835
if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
2836
echo 'Configuration will proceed anyway, since you have set the' >&2
2837
echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
2841
Aborting the configuration process, to ensure you take notice of the issue.
2843
You can download and install GNU coreutils to get an 'rm' implementation
2844
that behaves properly: <http://www.gnu.org/software/coreutils/>.
2846
If you want to complete the configuration process using your problematic
2847
'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
2848
to "yes", and re-run configure.
2851
as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5
2712
2856
# Checks for programs.
3499
3642
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3500
3643
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3501
3644
ac_compiler_gnu=$ac_cv_c_compiler_gnu
3647
ac_cpp='$CPP $CPPFLAGS'
3648
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3649
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3650
ac_compiler_gnu=$ac_cv_c_compiler_gnu
3651
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5
3652
$as_echo_n "checking whether $CC understands -c and -o together... " >&6; }
3653
if ${am_cv_prog_cc_c_o+:} false; then :
3654
$as_echo_n "(cached) " >&6
3656
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3657
/* end confdefs.h. */
3667
# Make sure it works both with $CC and with simple cc.
3668
# Following AC_PROG_CC_C_O, we do the test twice because some
3669
# compilers refuse to overwrite an existing .o file with -o,
3670
# though they will create one.
3671
am_cv_prog_cc_c_o=yes
3673
if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5
3674
($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5
3676
echo "$as_me:$LINENO: \$? = $ac_status" >&5
3677
(exit $ac_status); } \
3678
&& test -f conftest2.$ac_objext; then
3681
am_cv_prog_cc_c_o=no
3685
rm -f core conftest*
3688
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5
3689
$as_echo "$am_cv_prog_cc_c_o" >&6; }
3690
if test "$am_cv_prog_cc_c_o" != yes; then
3691
# Losing compiler, so override with the script.
3692
# FIXME: It is wrong to rewrite CC.
3693
# But if we don't then we get into trouble of one sort or another.
3694
# A longer-term fix would be to have automake use am__CC in this case,
3695
# and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
3696
CC="$am_aux_dir/compile $CC"
3699
ac_cpp='$CPP $CPPFLAGS'
3700
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3701
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3702
ac_compiler_gnu=$ac_cv_c_compiler_gnu
3502
3704
DEPDIR="${am__leading_dot}deps"
3504
3706
ac_config_commands="$ac_config_commands depfiles"
4311
# Check whether --with-lua-headers was given.
4312
if test "${with_lua_headers+set}" = set; then :
4313
withval=$with_lua_headers; LUA_HDR_DIR="$withval"
4314
CFLAGS="$CFLAGS -I$withval"
4322
4517
luacshell=false
4323
4518
ac_report_have_lua=disabled
4324
4519
ac_report_bash_extensions=disabled
4328
4522
# Check whether --with-lua was given.
4329
4523
if test "${with_lua+set}" = set; then :
4330
withval=$with_lua; case "$withval" in
4331
no) ac_report_have_lua=disabled
4333
*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
4334
$as_echo_n "checking for library containing dlopen... " >&6; }
4335
if ${ac_cv_search_dlopen+:} false; then :
4336
$as_echo_n "(cached) " >&6
4338
ac_func_search_save_LIBS=$LIBS
4339
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4340
/* end confdefs.h. */
4342
/* Override any GCC internal prototype to avoid an error.
4343
Use char because int might match the return type of a GCC
4344
builtin and then its argument prototype would still apply. */
4357
for ac_lib in '' dl; do
4358
if test -z "$ac_lib"; then
4359
ac_res="none required"
4528
if test "x$with_lua" = "xyes"; then :
4538
if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
4539
if test -n "$ac_tool_prefix"; then
4540
# Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
4541
set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
4542
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4543
$as_echo_n "checking for $ac_word... " >&6; }
4544
if ${ac_cv_path_PKG_CONFIG+:} false; then :
4545
$as_echo_n "(cached) " >&6
4549
ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
4552
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4556
test -z "$as_dir" && as_dir=.
4557
for ac_exec_ext in '' $ac_executable_extensions; do
4558
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4559
ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
4560
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4570
PKG_CONFIG=$ac_cv_path_PKG_CONFIG
4571
if test -n "$PKG_CONFIG"; then
4572
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
4573
$as_echo "$PKG_CONFIG" >&6; }
4575
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4576
$as_echo "no" >&6; }
4581
if test -z "$ac_cv_path_PKG_CONFIG"; then
4582
ac_pt_PKG_CONFIG=$PKG_CONFIG
4583
# Extract the first word of "pkg-config", so it can be a program name with args.
4584
set dummy pkg-config; ac_word=$2
4585
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4586
$as_echo_n "checking for $ac_word... " >&6; }
4587
if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
4588
$as_echo_n "(cached) " >&6
4590
case $ac_pt_PKG_CONFIG in
4592
ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
4595
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4599
test -z "$as_dir" && as_dir=.
4600
for ac_exec_ext in '' $ac_executable_extensions; do
4601
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4602
ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
4603
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4613
ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
4614
if test -n "$ac_pt_PKG_CONFIG"; then
4615
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
4616
$as_echo "$ac_pt_PKG_CONFIG" >&6; }
4618
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4619
$as_echo "no" >&6; }
4622
if test "x$ac_pt_PKG_CONFIG" = x; then
4362
LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4625
case $cross_compiling:$ac_tool_warned in
4627
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4628
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4629
ac_tool_warned=yes ;;
4631
PKG_CONFIG=$ac_pt_PKG_CONFIG
4364
if ac_fn_c_try_link "$LINENO"; then :
4365
ac_cv_search_dlopen=$ac_res
4367
rm -f core conftest.err conftest.$ac_objext \
4369
if ${ac_cv_search_dlopen+:} false; then :
4373
if ${ac_cv_search_dlopen+:} false; then :
4376
ac_cv_search_dlopen=no
4379
LIBS=$ac_func_search_save_LIBS
4381
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
4382
$as_echo "$ac_cv_search_dlopen" >&6; }
4383
ac_res=$ac_cv_search_dlopen
4384
if test "$ac_res" != no; then :
4385
test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
4389
# ubuntu has lua5.1 rather than just lua
4390
if pkg-config --exists lua5.1; then
4634
PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
4638
if test -n "$PKG_CONFIG"; then
4639
_pkg_min_version=0.9.0
4640
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
4641
$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
4642
if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
4643
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4644
$as_echo "yes" >&6; }
4395
if test -z "$LUA_HDR_DIR"; then
4396
CFLAGS="$CFLAGS `pkg-config $LUALIB --cflags`"
4399
LDFLAGS="$LDFLAGS -Wl,-E -L$withval"
4646
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4647
$as_echo "no" >&6; }
4651
if test "x$with_lua" != "xno" -a "x$with_lua" != "x"; then :
4655
ac_report_have_lua=enabled
4401
4657
$as_echo "#define USE_LUA /**/" >>confdefs.h
4404
as_ac_Lib=`$as_echo "ac_cv_lib_$LUALIB''_luaL_newstate" | $as_tr_sh`
4405
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for luaL_newstate in -l$LUALIB" >&5
4406
$as_echo_n "checking for luaL_newstate in -l$LUALIB... " >&6; }
4407
if eval \${$as_ac_Lib+:} false; then :
4408
$as_echo_n "(cached) " >&6
4410
ac_check_lib_save_LIBS=$LIBS
4411
LIBS="-l$LUALIB $LIBS $LIBS"
4412
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4413
/* end confdefs.h. */
4415
/* Override any GCC internal prototype to avoid an error.
4416
Use char because int might match the return type of a GCC
4417
builtin and then its argument prototype would still apply. */
4421
char luaL_newstate ();
4425
return luaL_newstate ();
4430
if ac_fn_c_try_link "$LINENO"; then :
4431
eval "$as_ac_Lib=yes"
4433
eval "$as_ac_Lib=no"
4435
rm -f core conftest.err conftest.$ac_objext \
4436
conftest$ac_exeext conftest.$ac_ext
4437
LIBS=$ac_check_lib_save_LIBS
4439
eval ac_res=\$$as_ac_Lib
4440
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
4441
$as_echo "$ac_res" >&6; }
4442
if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
4443
cat >>confdefs.h <<_ACEOF
4444
#define `$as_echo "HAVE_LIB$LUALIB" | $as_tr_cpp` 1
4447
LIBS="-l$LUALIB $LIBS"
4451
as_fn_error $? "The Lua runtime library cannot be found!" "$LINENO" 5
4457
ac_report_have_lua=enabled
4462
ac_report_have_lua=disabled
4661
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LUA" >&5
4662
$as_echo_n "checking for LUA... " >&6; }
4664
if test -n "$LUA_CFLAGS"; then
4665
pkg_cv_LUA_CFLAGS="$LUA_CFLAGS"
4666
elif test -n "$PKG_CONFIG"; then
4667
if test -n "$PKG_CONFIG" && \
4668
{ { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$with_lua\""; } >&5
4669
($PKG_CONFIG --exists --print-errors "$with_lua") 2>&5
4671
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4672
test $ac_status = 0; }; then
4673
pkg_cv_LUA_CFLAGS=`$PKG_CONFIG --cflags "$with_lua" 2>/dev/null`
4674
test "x$?" != "x0" && pkg_failed=yes
4681
if test -n "$LUA_LIBS"; then
4682
pkg_cv_LUA_LIBS="$LUA_LIBS"
4683
elif test -n "$PKG_CONFIG"; then
4684
if test -n "$PKG_CONFIG" && \
4685
{ { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$with_lua\""; } >&5
4686
($PKG_CONFIG --exists --print-errors "$with_lua") 2>&5
4688
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4689
test $ac_status = 0; }; then
4690
pkg_cv_LUA_LIBS=`$PKG_CONFIG --libs "$with_lua" 2>/dev/null`
4691
test "x$?" != "x0" && pkg_failed=yes
4701
if test $pkg_failed = yes; then
4702
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4703
$as_echo "no" >&6; }
4705
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
4706
_pkg_short_errors_supported=yes
4708
_pkg_short_errors_supported=no
4710
if test $_pkg_short_errors_supported = yes; then
4711
LUA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$with_lua" 2>&1`
4713
LUA_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$with_lua" 2>&1`
4715
# Put the nasty error message in config.log where it belongs
4716
echo "$LUA_PKG_ERRORS" >&5
4718
as_fn_error $? "Package requirements ($with_lua) were not met:
4722
Consider adjusting the PKG_CONFIG_PATH environment variable if you
4723
installed software in a non-standard prefix.
4725
Alternatively, you may set the environment variables LUA_CFLAGS
4726
and LUA_LIBS to avoid the need to call pkg-config.
4727
See the pkg-config man page for more details." "$LINENO" 5
4728
elif test $pkg_failed = untried; then
4729
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4730
$as_echo "no" >&6; }
4731
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4732
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4733
as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it
4734
is in your PATH or set the PKG_CONFIG environment variable to the full
4737
Alternatively, you may set the environment variables LUA_CFLAGS
4738
and LUA_LIBS to avoid the need to call pkg-config.
4739
See the pkg-config man page for more details.
4741
To get pkg-config, see <http://pkg-config.freedesktop.org/>.
4742
See \`config.log' for more details" "$LINENO" 5; }
4744
LUA_CFLAGS=$pkg_cv_LUA_CFLAGS
4745
LUA_LIBS=$pkg_cv_LUA_LIBS
4746
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4747
$as_echo "yes" >&6; }