dnl***************************************************************************
-dnl Copyright (c) 2010-2012,2013 Free Software Foundation, Inc. *
+dnl Copyright (c) 2010-2013,2014 Free Software Foundation, Inc. *
dnl *
dnl Permission is hereby granted, free of charge, to any person obtaining a *
dnl copy of this software and associated documentation files (the *
dnl
dnl Author: Thomas E. Dickey
dnl
-dnl $Id: aclocal.m4,v 1.77 2013/11/23 18:31:02 tom Exp $
+dnl $Id: aclocal.m4,v 1.82 2014/05/24 21:09:10 Nicolas.Boulenguez Exp $
dnl Macros used in NCURSES Ada95 auto-configuration script.
dnl
dnl These macros are maintained separately from NCURSES. The copyright on
AC_SUBST(cf_generic_objects)
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_GNAT_PRAGMA_UNREF version: 1 updated: 2010/06/19 15:22:18
-dnl --------------------
-dnl Check if the gnat pragma "Unreferenced" works.
-AC_DEFUN([CF_GNAT_PRAGMA_UNREF],[
-AC_CACHE_CHECK(if GNAT pragma Unreferenced works,cf_cv_pragma_unreferenced,[
-CF_GNAT_TRY_LINK([procedure conftest;],
-[with Text_IO;
-with GNAT.OS_Lib;
-procedure conftest is
- test : Integer;
- pragma Unreferenced (test);
-begin
- test := 1;
- Text_IO.Put ("Hello World");
- Text_IO.New_Line;
- GNAT.OS_Lib.OS_Exit (0);
-end conftest;],
- [cf_cv_pragma_unreferenced=yes],
- [cf_cv_pragma_unreferenced=no])])
-
-# if the pragma is supported, use it (needed in the Trace code).
-if test $cf_cv_pragma_unreferenced = yes ; then
- PRAGMA_UNREF=TRUE
-else
- PRAGMA_UNREF=FALSE
-fi
-AC_SUBST(PRAGMA_UNREF)
-])dnl
-dnl ---------------------------------------------------------------------------
dnl CF_GNAT_PROJECTS version: 4 updated: 2013/09/07 14:05:46
dnl ----------------
dnl GNAT projects are configured with ".gpr" project files.
[
AC_REQUIRE([CF_GNAT_VERSION])
-cf_gnat_libraries=no
cf_gnat_projects=no
AC_MSG_CHECKING(if GNAT supports project files)
cygwin*|msys*) #(vi
;;
*)
- mkdir conftest.src conftest.bin conftest.lib
- cd conftest.src
- rm -rf conftest* *~conftest*
+ mkdir conftest
+ cd conftest
+ mkdir lib obj
cat >>library.gpr <<CF_EOF
project Library is
- Kind := External ("LIB_KIND");
for Library_Name use "ConfTest";
- for Object_Dir use ".";
- for Library_ALI_Dir use External("LIBRARY_DIR");
- for Library_Version use External ("SONAME");
- for Library_Kind use Kind;
- for Library_Dir use External("BUILD_DIR");
- Source_Dir := External ("SOURCE_DIR");
- for Source_Dirs use (Source_Dir);
- package Compiler is
- for Default_Switches ("Ada") use
- ("-g",
- "-O2",
- "-gnatafno",
- "-gnatVa", -- All validity checks
- "-gnatwa"); -- Activate all optional errors
- end Compiler;
+ for Object_Dir use "obj";
+ for Library_Version use "libConfTest.so.1";
+ for Library_Kind use "dynamic";
+ for Library_Dir use "lib";
+ for Source_Dirs use (".");
end Library;
CF_EOF
cat >>confpackage.ads <<CF_EOF
end conftest;
end ConfPackage;
CF_EOF
- if ( $cf_ada_make $ADAFLAGS \
- -Plibrary.gpr \
- -XBUILD_DIR=`cd ../conftest.bin;pwd` \
- -XLIBRARY_DIR=`cd ../conftest.lib;pwd` \
- -XSOURCE_DIR=`pwd` \
- -XSONAME=libConfTest.so.1 \
- -XLIB_KIND=static 1>&AC_FD_CC 2>&1 ) ; then
+ if ( $cf_ada_make -Plibrary.gpr 1>&AC_FD_CC 2>&1 ); then
cf_gnat_projects=yes
fi
cd ..
- if test -f conftest.lib/confpackage.ali
- then
- cf_gnat_libraries=yes
- fi
- rm -rf conftest* *~conftest*
+ rm -rf conftest
;;
esac
;;
esac
AC_MSG_RESULT($cf_gnat_projects)
-
-if test $cf_gnat_projects = yes
-then
- AC_MSG_CHECKING(if GNAT supports libraries)
- AC_MSG_RESULT($cf_gnat_libraries)
-fi
-
-if test "$cf_gnat_projects" = yes
-then
- USE_OLD_MAKERULES="#"
- USE_GNAT_PROJECTS=""
-else
- USE_OLD_MAKERULES=""
- USE_GNAT_PROJECTS="#"
-fi
-
-if test "$cf_gnat_libraries" = yes
-then
- USE_GNAT_LIBRARIES=""
-else
- USE_GNAT_LIBRARIES="#"
-fi
-
-AC_SUBST(USE_OLD_MAKERULES)
-AC_SUBST(USE_GNAT_PROJECTS)
-AC_SUBST(USE_GNAT_LIBRARIES)
])dnl
dnl ---------------------------------------------------------------------------
dnl CF_GNAT_SIGINT version: 1 updated: 2011/03/27 20:07:59
AC_SUBST(CPPFLAGS)
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_INTEL_COMPILER version: 5 updated: 2013/02/10 10:41:05
+dnl CF_INTEL_COMPILER version: 6 updated: 2014/03/17 13:13:07
dnl -----------------
dnl Check if the given compiler is really the Intel compiler for Linux. It
dnl tries to imitate gcc, but does not return an error when it finds a mismatch
make an error
#endif
],[ifelse([$2],,INTEL_COMPILER,[$2])=yes
-cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
+cf_save_CFLAGS="$cf_save_CFLAGS -we147"
],[])
ifelse([$3],,CFLAGS,[$3])="$cf_save_CFLAGS"
AC_MSG_RESULT($ifelse([$2],,INTEL_COMPILER,[$2]))
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_MAKEFLAGS version: 14 updated: 2011/03/31 19:29:46
+dnl CF_MAKEFLAGS version: 15 updated: 2014/05/10 16:43:23
dnl ------------
dnl Some 'make' programs support ${MAKEFLAGS}, some ${MFLAGS}, to pass 'make'
dnl options to lower-levels. It's very useful for "make -n" -- if we have it.
CF_EOF
cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | fgrep -v "ing directory" | sed -e 's,[[ ]]*$,,'`
case "$cf_result" in
- .*k)
+ .*k|.*kw)
cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`
case "$cf_result" in
.*CC=*) cf_cv_makeflags=
dnl Command-line option to specify if an Ada95 shared-library should be built,
dnl and optionally what its soname should be.
AC_DEFUN([CF_WITH_ADA_SHAREDLIB],[
+AC_REQUIRE([CF_GNAT_PROJECTS])
AC_MSG_CHECKING(if an Ada95 shared-library should be built)
AC_ARG_WITH(ada-sharedlib,
- [ --with-ada-sharedlib=XX build Ada95 shared-library],
+ [ --with-ada-sharedlib=soname build shared-library (requires GNAT projects)],
[with_ada_sharedlib=$withval],
[with_ada_sharedlib=no])
AC_MSG_RESULT($with_ada_sharedlib)
if test "x$with_ada_sharedlib" != xno
then
+ if test "$cf_gnat_projects" != yes
+ then
+ AC_MSG_ERROR(ada-sharedlib requires GNAT support for shared library projects,1)
+ fi
MAKE_ADA_SHAREDLIB=
if test "x$with_ada_sharedlib" != xyes
then
])
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_XOPEN_SOURCE version: 45 updated: 2013/09/07 14:06:25
+dnl CF_XOPEN_SOURCE version: 46 updated: 2014/02/09 19:30:15
dnl ---------------
dnl Try to get _XOPEN_SOURCE defined properly that we can use POSIX functions,
dnl or adapt to the vendor's definitions to get equivalent functionality,
;;
solaris2.*) #(vi
cf_xopen_source="-D__EXTENSIONS__"
+ cf_cv_xopen_source=broken
;;
*)
CF_TRY_XOPEN_SOURCE