26
AC_INIT([Redland librdf Language bindings], 1.0.14.1, http://bugs.librdf.org/, redland-bindings)
26
AC_INIT([Redland librdf Language bindings],[1.0.16.1],[http://bugs.librdf.org/],[redland-bindings])
28
28
AC_CONFIG_SRCDIR(perl/example.pl)
29
29
AC_REVISION($Revision$)dnl
30
AM_CONFIG_HEADER(bindings_config.h)
30
AC_CONFIG_HEADERS([bindings_config.h])
31
31
AC_CONFIG_AUX_DIR(build)
32
32
AC_CONFIG_MACRO_DIR(build)
33
33
AM_INIT_AUTOMAKE([1.11 check-news std-options -Wobsolete -Wportability -Wsyntax -Wunsupported])
36
dnl 1.0.14 probably also works (Raptor and Rasqal dependencies the same)
37
MIN_REDLAND_VERSION=1.0.15
38
41
dnl Checks for programs.
47
50
m4_defun([AC_PROG_CXX],[])
48
51
m4_undefine([AC_PROG_F77])
49
52
m4_defun([AC_PROG_F77],[])
52
55
# Find a tar command for 'make dist'
53
56
AC_CHECK_PROGS(TAR, gnutar gtar tar)
89
93
if test $SWIG_VERSION_DEC -ge $SWIG_MIN_VERSION_DEC; then
90
94
if test $SWIG_VERSION_DEC -ge $SWIG_REC_VERSION_DEC; then
91
AC_MSG_RESULT($SWIG_VERSION - OK but version $SWIG_RECOMMENDED_VERSION is recommended)
93
95
AC_MSG_RESULT($SWIG_VERSION - OK)
97
AC_MSG_RESULT($SWIG_VERSION - OK but $SWIG_RECOMMENDED_VERSION recommended)
99
AC_MSG_WARN(SWIG $SWIG_RECOMMENDED_VERSION will be REQUIRED from the next release)
96
102
AC_MSG_RESULT($SWIG_VERSION - too old to generate language interfaces)
338
344
AC_ARG_WITH(ruby-arch-install-dir-variable, [ --with-ruby-arch-install-dir-variable=NAME Set Ruby arch install directory config variable (default 'archdir')], ruby_arch_install_dir_variable="$withval", ruby_arch_install_dir_variable="archdir")
340
dnl Setting this overrides the above
346
dnl Setting this overrides ruby-arch-install-dir-variable above
341
347
AC_ARG_WITH(ruby-arch-install-dir, [ --with-ruby-arch-install-dir=NAME Set Ruby install directory (default 'auto')], ruby_arch_install_dir="$withval", ruby_arch_install_dir="auto")
343
dnl Variable name cannot be overridden at this time
344
ruby_install_dir_variable='rubylibdir'
349
AC_ARG_WITH(ruby-install-dir-variable, [ --with-ruby-install-dir-variable=NAME Set Ruby install directory config variable (default 'rubylibdir')], ruby_install_dir_variable="$withval", ruby_install_dir_variable="rubylibdir")
351
dnl Setting this overrides ruby-install-dir-variable above
345
352
AC_ARG_WITH(ruby-install-dir, [ --with-ruby-install-dir=NAME Set Ruby install directory (default 'auto')], ruby_install_dir="$withval", ruby_install_dir="auto")
360
RUBY_ARCH_INSTALLDIR=
347
361
if test "X$RUBY" != X; then
348
362
dnl need to change quotes to allow square brackets
349
363
changequote(<<, >>)dnl
350
RUBY_ARCHDIR=`$RUBY -rrbconfig -e "print Config::CONFIG['archdir']"`
351
ruby_install_dir_config=`$RUBY -rrbconfig -e "puts Config::CONFIG['$ruby_install_dir_variable']"`
352
ruby_arch_install_dir_config=`$RUBY -rrbconfig -e "puts Config::CONFIG['$ruby_arch_install_dir_variable']"`
353
LIBRUBYARG_SHARED=`$RUBY -rrbconfig -e "puts Config::CONFIG['LIBRUBYARG_SHARED']"`
364
RUBY_ARCHDIR=`$RUBY -rrbconfig -e "print RbConfig::CONFIG['archdir']"`
365
ruby_install_dir_config=`$RUBY -rrbconfig -e "puts RbConfig::CONFIG['$ruby_install_dir_variable']"`
366
ruby_header_dir_config=`$RUBY -rrbconfig -e "puts RbConfig::CONFIG['rubyhdrdir']"`
367
ruby_arch_config=`$RUBY -rrbconfig -e "puts RbConfig::CONFIG['arch']"`
368
ruby_arch_install_dir_config=`$RUBY -rrbconfig -e "puts RbConfig::CONFIG['$ruby_arch_install_dir_variable']"`
369
librubyarg_shared=`$RUBY -rrbconfig -e "puts RbConfig::CONFIG['LIBRUBYARG_SHARED']"`
354
370
changequote([, ])dnl
356
372
AC_MSG_CHECKING(Ruby installation dir)
359
375
AC_MSG_RESULT($RUBY_INSTALLDIR from user)
361
377
RUBY_INSTALLDIR=$ruby_install_dir_config
362
AC_MSG_RESULT($RUBY_INSTALLDIR from Config::CONFIG $ruby_install_dir_variable)
378
AC_MSG_RESULT($RUBY_INSTALLDIR from RbConfig::CONFIG $ruby_install_dir_variable)
365
381
AC_MSG_CHECKING(Ruby arch installation dir)
368
384
AC_MSG_RESULT($RUBY_ARCH_INSTALLDIR from user)
370
386
RUBY_ARCH_INSTALLDIR=$ruby_arch_install_dir_config
371
AC_MSG_RESULT($RUBY_ARCH_INSTALLDIR from Config::CONFIG $ruby_arch_install_dir_variable)
374
RUBY_INCLUDES="-I$RUBY_ARCHDIR"
387
AC_MSG_RESULT($RUBY_ARCH_INSTALLDIR from RbConfig::CONFIG $ruby_arch_install_dir_variable)
390
AC_MSG_CHECKING(Ruby headers dir)
391
if test "X$ruby_header_dir_config" != "Xnil" -a "X$ruby_header_dir_config" != "X"; then
392
RUBY_INCLUDES="$RUBY_INCLUDES -I$ruby_header_dir_config"
393
if test "X$ruby_arch_config" != "Xnil" -a "X$ruby_arch_config" != "X"; then
394
ruby_arch_hdrdir="$ruby_header_dir_config/$ruby_arch_config"
395
if test -d "$ruby_arch_hdrdir"; then
396
RUBY_INCLUDES="$RUBY_INCLUDES -I$ruby_arch_hdrdir"
399
AC_MSG_RESULT($RUBY_INCLUDES from RbConfig::CONFIG rubyhdrdir)
401
if test -r "$RUBY_ARCHDIR/ruby.h"; then
402
RUBY_INCLUDES="$RUBY_INCLUDES -I$RUBY_ARCHDIR"
403
AC_MSG_RESULT($RUBY_INCLUDES from arch dir)
405
AC_MSG_RESULT(ruby.h not found - unable to compile Redland ruby bindings)
409
# OSX/Darwin default is bundle
410
if test `uname` = Darwin; then
411
# FIXME - how to decide between bundle and dylib?
416
AC_ARG_WITH(ruby-linking, [ --with-ruby-linking=TYPE Set Ruby module linking type (so, dylib, bundle)], ruby_linking="$withval")
417
case $ruby_linking in
419
RUBY_LDFLAGS="$RUBY_LDFLAGS -shared $librubyarg_shared"
422
RUBY_LDFLAGS="$RUBY_LDFLAGS -flat_namespace -undefined suppress $librubyarg_shared"
423
RUBY_CFLAGS="$RUBY_CFLAGS -fno-common"
426
RUBY_LDFLAGS="$RUBY_LDFLAGS -bundle -flat_namespace -undefined suppress $librubyarg_shared"
427
RUBY_CFLAGS="$RUBY_CFLAGS -fno-common"
430
AC_MSG_ERROR(No such RUBY linking type $ruby_linking)
433
RUBY_SO_SUFFIX=$php_linking
434
AC_MSG_CHECKING(Ruby Linking)
435
AC_MSG_RESULT(compile '$RUBY_CFLAGS' link '$RUBY_LDFLAGS' suffix $RUBY_SO_SUFFIX)
376
437
# This allows 'make clean' in the ruby directory to work when
377
438
# ruby isn't available
382
RUBY_ARCH_INSTALLDIR=
441
AC_SUBST(RUBY_PACKAGE)
442
AC_SUBST(RUBY_CFLAGS)
443
AC_SUBST(RUBY_LDFLAGS)
384
444
AC_SUBST(RUBY_INCLUDES)
385
AC_SUBST(LIBRUBYARG_SHARED)
445
AC_SUBST(RUBY_SO_SUFFIX)
386
446
AC_SUBST(RUBY_INSTALLDIR)
387
447
AC_SUBST(RUBY_ARCH_INSTALLDIR)
493
if $PKG_CONFIG --atleast-version=$OUR_REDLAND_VERSION redland; then
553
if $PKG_CONFIG --atleast-version=$MIN_REDLAND_VERSION redland; then
496
AC_MSG_ERROR(Redland version $REDLAND_VERSION found. $OUR_REDLAND_VERSION or newer is required - see http://librdf.org/)
556
AC_MSG_ERROR(Redland version $REDLAND_VERSION found. $MIN_REDLAND_VERSION or newer is required - see http://librdf.org/)