-
-for cf_prog_gnat in gnat gnatmake gprconfig gprbuild
-do
-
-cf_upper_prog_gnat=`echo "${cf_prog_gnat}" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
-
- unset ac_cv_path_cf_TEMP_gnat
- unset cf_TEMP_gnat
- # Extract the first word of "$cf_prog_gnat", so it can be a program name with args.
-set dummy $cf_prog_gnat; ac_word=$2
-echo "$as_me:27462: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_path_cf_TEMP_gnat+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- case $cf_TEMP_gnat in
- [\\/]* | ?:[\\/]*)
- ac_cv_path_cf_TEMP_gnat="$cf_TEMP_gnat" # Let the user override the test with a path.
- ;;
- *)
- ac_save_IFS=$IFS; IFS=$ac_path_separator
-ac_dummy="$PATH"
-for ac_dir in $ac_dummy; do
- IFS=$ac_save_IFS
- test -z "$ac_dir" && ac_dir=.
- if $as_executable_p "$ac_dir/$ac_word"; then
- ac_cv_path_cf_TEMP_gnat="$ac_dir/$ac_word"
- echo "$as_me:27479: found $ac_dir/$ac_word" >&5
- break
-fi
-done
-
- test -z "$ac_cv_path_cf_TEMP_gnat" && ac_cv_path_cf_TEMP_gnat="no"
- ;;
-esac
-fi
-cf_TEMP_gnat=$ac_cv_path_cf_TEMP_gnat
-
-if test -n "$cf_TEMP_gnat"; then
- echo "$as_me:27491: result: $cf_TEMP_gnat" >&5
-echo "${ECHO_T}$cf_TEMP_gnat" >&6
-else
- echo "$as_me:27494: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
- eval "cf_cv_PATH_$cf_upper_prog_gnat=$ac_cv_path_cf_TEMP_gnat"
-
- if test "x$cf_TEMP_gnat" != xno; then
- unset cf_cv_gnat_version
- unset cf_TEMP_gnat
-
-echo "$as_me:27504: checking for $cf_prog_gnat version" >&5
-echo $ECHO_N "checking for $cf_prog_gnat version... $ECHO_C" >&6
-if test "${cf_cv_gnat_version+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-
-cf_cv_gnat_version=`$cf_prog_gnat --version 2>&1 | \
- grep '[0-9].[0-9][0-9]*' |\
- sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
-
-fi
-echo "$as_me:27515: result: $cf_cv_gnat_version" >&5
-echo "${ECHO_T}$cf_cv_gnat_version" >&6
-test -z "$cf_cv_gnat_version" && cf_cv_gnat_version=no
-eval cf_TEMP_gnat=$cf_cv_gnat_version; unset cf_cv_gnat_version
-
- fi
- eval "cf_cv_VERSION_$cf_upper_prog_gnat=$cf_TEMP_gnat"
-
- unset cf_TEMP_gnat
- unset cf_cv_gnat_version
- unset ac_cv_path_cf_TEMP_gnat
-done
-
-if test "x$cf_cv_VERSION_GNATMAKE" = "xno"; then
- cf_ada_make=
- cf_cv_prog_gnat_correct=no
-else
- cf_ada_make=gnatmake
- if test "x$cf_cv_VERSION_GPRCONFIG" = "xno"; then
- # gprconfig is newer than gnatmake; we can continue...
- cf_ada_config="##"
- else
- rm -rf ./conftest* ./*~conftest*
- if mkdir conftest.src
- then
- cf_ada_config=""
- cd conftest.src
- for cf_gprconfig in Ada C
- do
- echo "$as_me:27544: checking for gprconfig name for $cf_gprconfig" >&5
-echo $ECHO_N "checking for gprconfig name for $cf_gprconfig... $ECHO_C" >&6
- if test "$cf_gprconfig" = C
- then
- for cf_gprconfig_param in \
- "$cf_gprconfig,,,,GNATGCC" \
- "$cf_gprconfig,,,,GCC" \
- "$cf_gprconfig"
- do
- cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig_param 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
- test -n "$cf_gprconfig_value" && break
- done
- else
- cf_gprconfig_param=$cf_gprconfig
- cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig_param 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
- fi
- if test -n "$cf_gprconfig_value"
- then
- eval "cf_ada_config_$cf_gprconfig=$cf_gprconfig_value"
- echo "$as_me:27563: result: $cf_gprconfig_value" >&5
-echo "${ECHO_T}$cf_gprconfig_value" >&6
- else
- echo "$as_me:27566: result: missing" >&5
-echo "${ECHO_T}missing" >&6
- cf_ada_config="#"
- break
- fi
- done
- cd ..
- rm -rf ./conftest* ./*~conftest*
- fi
- fi
- if test "x$cf_ada_config" != "x#"
- then
-
-echo "$as_me:27579: checking for gnat version" >&5
-echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
-if test "${cf_cv_gnat_version+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-
-cf_cv_gnat_version=`${cf_ada_make:-gnatmake} --version 2>&1 | \
- grep '[0-9].[0-9][0-9]*' |\
- sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
-
-fi
-echo "$as_me:27590: result: $cf_cv_gnat_version" >&5
-echo "${ECHO_T}$cf_cv_gnat_version" >&6
-test -z "$cf_cv_gnat_version" && cf_cv_gnat_version=no
-
-case "$cf_cv_gnat_version" in
-(3.1[1-9]*|3.[2-9]*|[4-9].*|[1-9][0-9].[0-9]*|20[0-9][0-9])
- cf_cv_prog_gnat_correct=yes
- ;;
-(*)
- { echo "$as_me:27599: WARNING: Unsupported GNAT version $cf_cv_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
-echo "$as_me: WARNING: Unsupported GNAT version $cf_cv_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
- cf_cv_prog_gnat_correct=no
- ;;
-esac
-
- # Extract the first word of "m4", so it can be a program name with args.
-set dummy m4; ac_word=$2
-echo "$as_me:27607: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_M4_exists+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$M4_exists"; then
- ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
-else
- ac_save_IFS=$IFS; IFS=$ac_path_separator
-ac_dummy="$PATH"
-for ac_dir in $ac_dummy; do
- IFS=$ac_save_IFS
- test -z "$ac_dir" && ac_dir=.
- $as_executable_p "$ac_dir/$ac_word" || continue
-ac_cv_prog_M4_exists="yes"
-echo "$as_me:27622: found $ac_dir/$ac_word" >&5
-break
-done
-
- test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
-fi
-fi
-M4_exists=$ac_cv_prog_M4_exists
-if test -n "$M4_exists"; then
- echo "$as_me:27631: result: $M4_exists" >&5
-echo "${ECHO_T}$M4_exists" >&6
-else
- echo "$as_me:27634: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
- if test "$ac_cv_prog_M4_exists" = no; then
- cf_cv_prog_gnat_correct=no
- { echo "$as_me:27640: WARNING: Ada95 binding required program m4 not found. Ada95 binding disabled" >&5
-echo "$as_me: WARNING: Ada95 binding required program m4 not found. Ada95 binding disabled" >&2;}
- fi
- if test "$cf_cv_prog_gnat_correct" = yes; then
- echo "$as_me:27644: checking if GNAT works" >&5
-echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
-
-rm -rf ./conftest* ./*~conftest*
-cat >>conftest.ads <<CF_EOF
-procedure conftest;
-CF_EOF
-cat >>conftest.adb <<CF_EOF
-with Text_IO;
-with GNAT.OS_Lib;
-procedure conftest is
-begin
- Text_IO.Put ("Hello World");
- Text_IO.New_Line;
- GNAT.OS_Lib.OS_Exit (0);
-end conftest;
-CF_EOF
-if ( "$cf_ada_make" $ADAFLAGS conftest 1>&5 2>&1 ) ; then
- if ( ./conftest 1>&5 2>&1 ) ; then
- cf_cv_prog_gnat_correct=yes
- else
- cf_cv_prog_gnat_correct=no
- fi
-else
- cf_cv_prog_gnat_correct=no
-fi
-rm -rf ./conftest* ./*~conftest*
-
- echo "$as_me:27672: result: $cf_cv_prog_gnat_correct" >&5
-echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
- fi
- else
- cf_cv_prog_gnat_correct=no
- fi
-fi
-