Enable building the DUMM Ruby extension in a VPATH build.
authorTobias Brunner <tobias@strongswan.org>
Wed, 20 May 2009 16:40:27 +0000 (18:40 +0200)
committerTobias Brunner <tobias@strongswan.org>
Wed, 20 May 2009 17:38:01 +0000 (19:38 +0200)
configure.in
src/dumm/ext/extconf.rb [deleted file]
src/dumm/ext/extconf.rb.in [new file with mode: 0644]

index 913b4db..eb76cd8 100644 (file)
@@ -1246,6 +1246,7 @@ AC_OUTPUT(
        src/openac/Makefile
        src/scepclient/Makefile
        src/dumm/Makefile
+       src/dumm/ext/extconf.rb
        src/libfast/Makefile
        src/manager/Makefile
        src/medsrv/Makefile
diff --git a/src/dumm/ext/extconf.rb b/src/dumm/ext/extconf.rb
deleted file mode 100644 (file)
index 136be5c..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-#
-# DUMM for Ruby
-#
-
-require "mkmf"
-
-dir_config("dumm")
-
-unless find_header('library.h', '../../libstrongswan') and
-       find_header('dumm.h', '..')
-  puts "... failed: one or more header files not found!"
-  exit
-end
-
-unless find_library('dumm', 'dumm_create')
-  puts "... failed: 'libdumm' not found!"
-  exit
-end
-
-create_makefile("dumm")
-
diff --git a/src/dumm/ext/extconf.rb.in b/src/dumm/ext/extconf.rb.in
new file mode 100644 (file)
index 0000000..658ab1f
--- /dev/null
@@ -0,0 +1,18 @@
+#
+# DUMM for Ruby
+#
+
+require 'mkmf'
+
+$defs << " @DEFS@"
+
+dir_config('dumm', '@top_srcdir@/src/dumm', '../.libs')
+dir_config('strongswan', '@top_srcdir@/src/libstrongswan', '../../libstrongswan/.libs')
+
+unless find_library('dumm', 'dumm_create')
+  puts "... failed: 'libdumm' not found!"
+  exit
+end
+
+create_makefile('dumm', '@top_srcdir@/src/dumm/ext')
+