diff options
author | Tobias Brunner <tobias@strongswan.org> | 2009-05-20 14:15:14 +0200 |
---|---|---|
committer | Tobias Brunner <tobias@strongswan.org> | 2009-05-20 19:38:01 +0200 |
commit | d2e9cbc9a2a84e9c7c06e74860b674fb1059e118 (patch) | |
tree | 083f96656a39333018febb6855f36caa6fda2f0a | |
parent | a13c013b6ff13f494691db7f8d425c6fa3ef1350 (diff) | |
download | strongswan-d2e9cbc9a2a84e9c7c06e74860b674fb1059e118.tar.bz2 strongswan-d2e9cbc9a2a84e9c7c06e74860b674fb1059e118.tar.xz |
The configure script now tries to figure out where ruby.h is located.
This is required because the location depends on the architecture.
-rw-r--r-- | configure.in | 24 | ||||
-rw-r--r-- | src/dumm/Makefile.am | 2 |
2 files changed, 25 insertions, 1 deletions
diff --git a/configure.in b/configure.in index c3f6d2194..913b4db4c 100644 --- a/configure.in +++ b/configure.in @@ -904,6 +904,30 @@ if test x$dumm = xtrue; then PKG_CHECK_MODULES(gtk, [gtk+-2.0 vte]) AC_SUBST(gtk_CFLAGS) AC_SUBST(gtk_LIBS) + AC_CHECK_PROGS(RUBY, ruby) + AC_MSG_CHECKING([for Ruby header files]) + if test -n "$RUBY"; then + RUBYDIR=`($RUBY -rmkmf -e 'print Config::CONFIG[["archdir"]] || $archdir') 2>/dev/null` + if test -n "$RUBYDIR"; then + dirs="$RUBYDIR" + RUBYINCLUDE=none + for i in $dirs; do + if test -r $i/ruby.h; then + AC_MSG_RESULT([$i]) + RUBYINCLUDE="-I$i" + break; + fi + done + if test x"$RUBYINCLUDE" = xnone; then + AC_MSG_ERROR([ruby.h not found]) + fi + AC_SUBST(RUBYINCLUDE) + else + AC_MSG_ERROR([unable to determine ruby configuration]) + fi + else + AC_MSG_ERROR([don't know how to run ruby]) + fi fi if test x$fast = xtrue; then diff --git a/src/dumm/Makefile.am b/src/dumm/Makefile.am index 029290fb6..64e40ee63 100644 --- a/src/dumm/Makefile.am +++ b/src/dumm/Makefile.am @@ -15,5 +15,5 @@ dumm_LDADD = libdumm.la ${gtk_LIBS} irdumm_LDADD = libdumm.la -lruby1.8 INCLUDES = -I$(top_srcdir)/src/libstrongswan ${gtk_CFLAGS} \ - -I/usr/lib/ruby/1.8/i486-linux/ + ${RUBYINCLUDE} AM_CFLAGS = -D_FILE_OFFSET_BITS=64 |