~ubuntu-branches/debian/sid/redland-bindings/sid

« back to all changes in this revision

Viewing changes to configure.ac

  • Committer: Package Import Robot
  • Author(s): Dave Beckett
  • Date: 2013-01-22 16:03:44 UTC
  • mfrom: (0.1.10)
  • Revision ID: package-import@ubuntu.com-20130122160344-vxrnfl0xynfzbze7
Tags: 1.0.16.1-1
* New upstream release
* Add dpkg-buildflags to configure for hardening

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
dnl 
24
24
 
25
25
 
26
 
AC_INIT([Redland librdf Language bindings], 1.0.14.1, http://bugs.librdf.org/, redland-bindings)
27
 
AC_PREREQ(2.53)
 
26
AC_INIT([Redland librdf Language bindings],[1.0.16.1],[http://bugs.librdf.org/],[redland-bindings])
 
27
AC_PREREQ([2.62])
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])
34
34
AM_MAINTAINER_MODE
35
35
 
 
36
dnl 1.0.14 probably also works (Raptor and Rasqal dependencies the same)
 
37
MIN_REDLAND_VERSION=1.0.15
 
38
 
36
39
AC_CANONICAL_HOST
37
40
 
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],[])
50
 
AC_PROG_LIBTOOL
 
53
LT_INIT
51
54
 
52
55
# Find a tar command for 'make dist'
53
56
AC_CHECK_PROGS(TAR, gnutar gtar tar)
71
74
AC_SUBST(PERLINSTALLSITEARCH)
72
75
AC_SUBST(PERLMAN3DIR)
73
76
 
 
77
dnl FIXME - require SWIG 2+ from next release
74
78
SWIG_MIN_VERSION=1.3.26
75
79
SWIG_RECOMMENDED_VERSION=2.0.0
76
80
 
88
92
 
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)
92
 
    else
93
95
      AC_MSG_RESULT($SWIG_VERSION - OK)
 
96
    else
 
97
      AC_MSG_RESULT($SWIG_VERSION - OK but $SWIG_RECOMMENDED_VERSION recommended)
 
98
      dnl FIXME
 
99
      AC_MSG_WARN(SWIG $SWIG_RECOMMENDED_VERSION will be REQUIRED from the next release)
94
100
    fi
95
101
  else
96
102
    AC_MSG_RESULT($SWIG_VERSION - too old to generate language interfaces)
337
343
 
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")
339
345
 
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")
342
348
 
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")
 
350
 
 
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")
346
353
 
 
354
RUBY_PACKAGE=redland
 
355
RUBY_CFLAGS=
 
356
RUBY_LDFLAGS=
 
357
RUBY_INCLUDES=
 
358
RUBY_SO_SUFFIX=
 
359
RUBY_INSTALLDIR=
 
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
355
371
 
356
372
  AC_MSG_CHECKING(Ruby installation dir)
359
375
    AC_MSG_RESULT($RUBY_INSTALLDIR from user)
360
376
  else
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)
363
379
  fi
364
380
 
365
381
  AC_MSG_CHECKING(Ruby arch installation dir)
368
384
    AC_MSG_RESULT($RUBY_ARCH_INSTALLDIR from user)
369
385
  else
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)
372
 
  fi
373
 
 
374
 
  RUBY_INCLUDES="-I$RUBY_ARCHDIR"
 
387
    AC_MSG_RESULT($RUBY_ARCH_INSTALLDIR from RbConfig::CONFIG $ruby_arch_install_dir_variable)
 
388
  fi
 
389
 
 
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"
 
397
      fi
 
398
    fi
 
399
    AC_MSG_RESULT($RUBY_INCLUDES from RbConfig::CONFIG rubyhdrdir)
 
400
  else
 
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)
 
404
    else
 
405
      AC_MSG_RESULT(ruby.h not found - unable to compile Redland ruby bindings)
 
406
    fi
 
407
  fi
 
408
 
 
409
  # OSX/Darwin default is bundle
 
410
  if test `uname` = Darwin; then
 
411
    # FIXME - how to decide between bundle and dylib?
 
412
    ruby_linking=bundle
 
413
  else
 
414
    ruby_linking=so
 
415
  fi
 
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
 
418
    so)
 
419
        RUBY_LDFLAGS="$RUBY_LDFLAGS -shared $librubyarg_shared"
 
420
        ;;
 
421
    dylib)
 
422
        RUBY_LDFLAGS="$RUBY_LDFLAGS -flat_namespace -undefined suppress $librubyarg_shared"
 
423
        RUBY_CFLAGS="$RUBY_CFLAGS -fno-common"
 
424
        ;;
 
425
    bundle)
 
426
        RUBY_LDFLAGS="$RUBY_LDFLAGS -bundle -flat_namespace -undefined suppress $librubyarg_shared"
 
427
        RUBY_CFLAGS="$RUBY_CFLAGS -fno-common"
 
428
        ;;
 
429
    *)
 
430
        AC_MSG_ERROR(No such RUBY linking type $ruby_linking)
 
431
        ;;
 
432
  esac
 
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)
375
436
else
376
437
  # This allows 'make clean' in the ruby directory to work when
377
438
  # ruby isn't available
378
439
  RUBY=:
379
 
  RUBY_INCLUDES=
380
 
  LIBRUBYARG_SHARED=
381
 
  RUBY_INSTALLDIR=
382
 
  RUBY_ARCH_INSTALLDIR=
383
440
fi
 
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)
388
448
 
450
510
 
451
511
dnl compiler checks
452
512
# if using gcc...
453
 
if test "$ac_cv_prog_gcc" = yes; then
 
513
if test "$ac_cv_c_compiler_gnu" = yes; then
454
514
  STANDARD_CFLAGS=
455
515
  MAINTAINER_CFLAGS="-Wall -Wshadow -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls"
456
516
else
490
550
fi
491
551
 
492
552
 
493
 
if $PKG_CONFIG --atleast-version=$OUR_REDLAND_VERSION redland; then
 
553
if $PKG_CONFIG --atleast-version=$MIN_REDLAND_VERSION redland; then
494
554
  :
495
555
else
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/)
497
557
fi
498
558
 
499
559