Imported Upstream version 3.1.0
[debian/amanda] / config / amanda / swig.m4
index dadfc890837a79fa33f7d8695aec7955beb49044..ee579753db5d4ec36d5d8d47f3caf4b5cf11a51f 100644 (file)
@@ -17,6 +17,11 @@ AC_DEFUN([AMANDA_SETUP_SWIG],
     # If we want cygwin to copy ddl to modules directory.
     WANT_CYGWIN_COPY_PERL_DLL="false"
 
+    # test for ExtUtils::Embed
+    AC_PERL_MODULE_VERSION([ExtUtils::Embed 0.0], [], [
+       AC_MSG_ERROR([*** Amanda requires the perl package ExtUtils::Embed to build its perl modules])
+    ])
+
     # get the include path for building perl extensions
     PERL_INC=`$PERL -MExtUtils::Embed -e perl_inc`
     AC_SUBST(PERL_INC)
@@ -25,7 +30,7 @@ AC_DEFUN([AMANDA_SETUP_SWIG],
        AC_MSG_ERROR([*** Amanda cannot be compiled without shared-library support (do not use --disable-shared)])
     fi
 
-    case "$target" in
+    case "$host" in
        *freebsd@<:@123456@:>@*) # up to and including FreeBSD 6.*
            # Before 7.0, FreeBSD systems don't include a DT_NEEDS segment in
            # libgthread to automatically pull in the desired threading library.