Commit e88b0a43 authored by Thomas Jahns's avatar Thomas Jahns 🤸
Browse files

Use configured ruby for Fortran interface generation also.

parent 297b56b6
......@@ -639,7 +639,6 @@ PYTHON
ENABLE_RUBY
ENABLE_RUBY_FALSE
ENABLE_RUBY_TRUE
RUBY
ENABLE_SWIG_FALSE
ENABLE_SWIG_TRUE
SWIG
......@@ -650,6 +649,7 @@ FC_MOD_FLAG
ENABLE_F2003_ISOC
CREATE_ISOC_FALSE
CREATE_ISOC_TRUE
RUBY
ENABLE_MPI
USE_MPI
USE_PPM_CORE_FALSE
......@@ -29616,6 +29616,46 @@ ENABLE_MPI=`test x"$enable_mpi" = xyes && echo true || echo false`
 
# ----------------------------------------------------------------------
# Create the Fortran Interface via iso_c_binding module (Fortran 2003 Standard)
#
# the test for ruby itself is unconditional because ruby is also used in
# the Fortran 2003 ISO C generator
# Extract the first word of "ruby", so it can be a program name with args.
set dummy ruby; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_prog_RUBY+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$RUBY"; then
ac_cv_prog_RUBY="$RUBY" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_RUBY="ruby"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
IFS=$as_save_IFS
fi
fi
RUBY=$ac_cv_prog_RUBY
if test -n "$RUBY"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $RUBY" >&5
$as_echo "$RUBY" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
# Check whether --enable-iso-c-interface was given.
if test "${enable_iso_c_interface+set}" = set; then :
enableval=$enable_iso_c_interface; enable_isoc=${enableval}
......@@ -29920,46 +29960,10 @@ fi
 
# ----------------------------------------------------------------------
# Create the Ruby Interface via swig
#
# Check whether --enable-ruby was given.
if test "${enable_ruby+set}" = set; then :
enableval=$enable_ruby; # Extract the first word of "ruby", so it can be a program name with args.
set dummy ruby; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_prog_RUBY+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$RUBY"; then
ac_cv_prog_RUBY="$RUBY" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_RUBY="ruby"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
IFS=$as_save_IFS
fi
fi
RUBY=$ac_cv_prog_RUBY
if test -n "$RUBY"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $RUBY" >&5
$as_echo "$RUBY" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
RUBY_INCLUDES="$($RUBY $srcdir/config/interface.rb)"
enableval=$enable_ruby; RUBY_INCLUDES="$($RUBY $srcdir/config/interface.rb)"
save_CPPFLAGS=$CPPFLAGS
CPPFLAGS="$CPPFLAGS $RUBY_INCLUDES"
ac_fn_c_check_header_mongrel "$LINENO" "ruby.h" "ac_cv_header_ruby_h" "$ac_includes_default"
......@@ -236,6 +236,10 @@ AC_SUBST([USE_MPI])
AC_SUBST([ENABLE_MPI],[`test x"$enable_mpi" = xyes && echo true || echo false`])
# ----------------------------------------------------------------------
# Create the Fortran Interface via iso_c_binding module (Fortran 2003 Standard)
#
# the test for ruby itself is unconditional because ruby is also used in
# the Fortran 2003 ISO C generator
AC_CHECK_PROG([RUBY],[ruby],[ruby])
AC_ARG_ENABLE([iso-c-interface],
[AS_HELP_STRING([--enable-iso-c-interface],
[Create Fortran Interface via iso_c_bindings facility of F2003 [default=no].])],
......@@ -267,10 +271,10 @@ AC_ARG_ENABLE(swig,
AM_CONDITIONAL(ENABLE_SWIG,[test "x$SWIG" != "x"])
# ----------------------------------------------------------------------
# Create the Ruby Interface via swig
AC_ARG_ENABLE(ruby,
#
AC_ARG_ENABLE([ruby],
[AS_HELP_STRING([--enable-ruby],[ruby language bindings [default=no] (EXPERIMENTAL)])],
[AC_CHECK_PROG(RUBY,ruby,ruby)
RUBY_INCLUDES="$($RUBY $srcdir/config/interface.rb)"
[RUBY_INCLUDES="$($RUBY $srcdir/config/interface.rb)"
save_CPPFLAGS=$CPPFLAGS
CPPFLAGS="$CPPFLAGS $RUBY_INCLUDES"
AC_CHECK_HEADER([ruby.h],,[enable_ruby=no
......
......@@ -205,7 +205,7 @@ LOCALTARGETS += mo_cdi.$(OBJEXT)
endif
#
mo_cdi.f90: $(top_srcdir)/src/cdi.h $(top_srcdir)/interfaces/f2003/bindGen.rb
ruby $(top_srcdir)/interfaces/f2003/bindGen.rb $(top_srcdir)/src/cdi.h $@
$(RUBY) $(top_srcdir)/interfaces/f2003/bindGen.rb $(top_srcdir)/src/cdi.h $@
#
mo_cdi.$(OBJEXT): mo_cdi.f90
$(FC) $(FCFLAGS) -c $(FCFLAGS_f90) $<
......
......@@ -1020,7 +1020,7 @@ uninstall-am: uninstall-includeHEADERS uninstall-libLTLIBRARIES \
#
mo_cdi.f90: $(top_srcdir)/src/cdi.h $(top_srcdir)/interfaces/f2003/bindGen.rb
ruby $(top_srcdir)/interfaces/f2003/bindGen.rb $(top_srcdir)/src/cdi.h $@
$(RUBY) $(top_srcdir)/interfaces/f2003/bindGen.rb $(top_srcdir)/src/cdi.h $@
#
mo_cdi.$(OBJEXT): mo_cdi.f90
$(FC) $(FCFLAGS) -c $(FCFLAGS_f90) $<
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment