]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
More ruby configure fixes
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Tue, 27 Nov 2012 21:59:16 +0000 (21:59 +0000)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Tue, 27 Nov 2012 22:02:51 +0000 (22:02 +0000)
src/modules/rlm_ruby/configure
src/modules/rlm_ruby/configure.in
src/modules/rlm_ruby/m4/ax_ruby_devel.m4

index 9e3e5c06236bcc3f0d68fcdc353ee3ab52244dd3..fc83b98111407fd73f3aedee33edd0f1d5302618 100755 (executable)
@@ -2058,6 +2058,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 
 targetname=rlm_ruby
+ruby_cflags=
+ruby_ldflags=
 if test x$with_rlm_ruby != xno; then
        ac_ext=c
 ac_cpp='$CPP $CPPFLAGS'
@@ -2996,7 +2998,6 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 
 
-
     if test -z "$RUBY"; then :
 
         { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ruby executable path has been provided" >&5
@@ -3123,7 +3124,9 @@ fi
 
 
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
+
+       if test -n "$RUBY"; then
+               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
 if ${ac_cv_path_SED+:} false; then :
   $as_echo_n "(cached) " >&6
@@ -3385,9 +3388,12 @@ $as_echo "yes" >&6; }
     else
         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
-        as_fn_error $? "cannot import Ruby module \"mkmf\".
+        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot import Ruby module \"mkmf\".
+Please check your Ruby installation. The error was:
+$ac_distutils_result" >&5
+$as_echo "$as_me: WARNING: cannot import Ruby module \"mkmf\".
 Please check your Ruby installation. The error was:
-$ac_distutils_result" "$LINENO" 5
+$ac_distutils_result" >&2;}
     fi
 
     #
@@ -3580,10 +3586,13 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
     # all done!
     #
 
-       if test -n "$RUBY_VERSION"; then
-               ruby_cflags+="$RUBY_CFLAGS"
-               ruby_ldflags+="$RUBY_LDFLAGS"
-               ruby_ldflags+="$RUBY_EXTRA_LIBS"
+               if test -n "$RUBY_VERSION"; then
+                       ruby_cflags="${RUBY_CFLAGS}"
+                       ruby_ldflags="${RUBY_LDFLAGS} ${RUBY_EXTRA_LIBS}"
+               else
+                       fail="ruby"
+                       targetname=
+               fi
        else
                fail="ruby"
                targetname=
index f275e931d1cbbcfe2b07e9b23908e52f4eeae86e..bc333192a4754cafc3ec641aa453d6f65f067c9d 100644 (file)
@@ -14,15 +14,22 @@ m4_include([ax_prog_ruby_version.m4])
 m4_include([ax_ruby_devel.m4])
 
 targetname=modname
+ruby_cflags=
+ruby_ldflags=
 if test x$with_[]modname != xno; then
        AC_PROG_CC
        AC_PROG_CPP
-
-       AX_RUBY_DEVEL([1.8])
-       if test -n "$RUBY_VERSION"; then
-               ruby_cflags+="$RUBY_CFLAGS"
-               ruby_ldflags+="$RUBY_LDFLAGS"
-               ruby_ldflags+="$RUBY_EXTRA_LIBS"
+       AX_WITH_RUBY
+       
+       if test -n "$RUBY"; then
+               AX_RUBY_DEVEL([1.8])
+               if test -n "$RUBY_VERSION"; then
+                       ruby_cflags="${RUBY_CFLAGS}"
+                       ruby_ldflags="${RUBY_LDFLAGS} ${RUBY_EXTRA_LIBS}"
+               else
+                       fail="ruby"
+                       targetname=
+               fi
        else
                fail="ruby"
                targetname=
index 1ba3d074b39b6761254dabed3e26a6939632f949..1328716dda530595187898560e2f60c0ebd390be 100644 (file)
@@ -64,7 +64,7 @@ AC_DEFUN([AX_RUBY_DEVEL],[
         AC_MSG_RESULT([yes])
     else
         AC_MSG_RESULT([no])
-        AC_MSG_ERROR([cannot import Ruby module "mkmf".
+        AC_MSG_WARN([cannot import Ruby module "mkmf".
 Please check your Ruby installation. The error was:
 $ac_distutils_result])
     fi