]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - Ada95/aclocal.m4
ncurses 5.9 - patch 20150404
[ncurses.git] / Ada95 / aclocal.m4
index e16bea1ce44a6302104a2d5e3fe548a3cfe63b4d..51d15402702d422b63b7214285f6fe3d0e55c3f8 100644 (file)
@@ -28,7 +28,7 @@ dnl***************************************************************************
 dnl
 dnl Author: Thomas E. Dickey
 dnl
-dnl $Id: aclocal.m4,v 1.88 2014/07/19 14:32:13 tom Exp $
+dnl $Id: aclocal.m4,v 1.94 2014/12/21 00:19:39 tom Exp $
 dnl Macros used in NCURSES Ada95 auto-configuration script.
 dnl
 dnl These macros are maintained separately from NCURSES.  The copyright on
@@ -97,7 +97,7 @@ AC_DEFUN([CF_ADD_ADAFLAGS],[
        AC_SUBST(ADAFLAGS)
 ])dnl
 dnl ---------------------------------------------------------------------------
-dnl CF_ADD_CFLAGS version: 10 updated: 2010/05/26 05:38:42
+dnl CF_ADD_CFLAGS version: 11 updated: 2014/07/22 05:32:57
 dnl -------------
 dnl Copy non-preprocessor flags to $CFLAGS, preprocessor flags to $CPPFLAGS
 dnl The second parameter if given makes this macro verbose.
@@ -122,7 +122,7 @@ no)
                -D*)
                        cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[[^=]]*='\''\"[[^"]]*//'`
 
-                       test "${cf_add_cflags}" != "${cf_tst_cflags}" \
+                       test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
                                && test -z "${cf_tst_cflags}" \
                                && cf_fix_cppflags=yes
 
@@ -159,7 +159,7 @@ yes)
 
        cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[[^"]]*"'\''//'`
 
-       test "${cf_add_cflags}" != "${cf_tst_cflags}" \
+       test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
                && test -z "${cf_tst_cflags}" \
                && cf_fix_cppflags=no
        ;;
@@ -738,7 +738,7 @@ CF_ARG_DISABLE(gnat-projects,
 AC_MSG_RESULT($enable_gnat_projects)
 ])dnl
 dnl ---------------------------------------------------------------------------
-dnl CF_ENABLE_PC_FILES version: 9 updated: 2012/08/04 13:59:54
+dnl CF_ENABLE_PC_FILES version: 10 updated: 2014/12/13 18:48:46
 dnl ------------------
 dnl This is the "--enable-pc-files" option, which is available if there is a
 dnl pkg-config configuration on the local machine.
@@ -746,20 +746,26 @@ AC_DEFUN([CF_ENABLE_PC_FILES],[
 AC_REQUIRE([CF_PKG_CONFIG])
 AC_REQUIRE([CF_WITH_PKG_CONFIG_LIBDIR])
 
-if test "$PKG_CONFIG" != none ; then
+if test "x$PKG_CONFIG" != xnone
+then
        AC_MSG_CHECKING(if we should install .pc files for $PKG_CONFIG)
-       AC_ARG_ENABLE(pc-files,
-               [  --enable-pc-files       generate and install .pc files for pkg-config],
-               [enable_pc_files=$enableval],
-               [enable_pc_files=no])
-       AC_MSG_RESULT($enable_pc_files)
-       if test "$enable_pc_files" != no
-       then
-               CF_PATH_SYNTAX(PKG_CONFIG_LIBDIR)
-       fi
 else
-       enable_pc_files=no
+       AC_MSG_CHECKING(if we should install .pc files)
+fi
+
+AC_ARG_ENABLE(pc-files,
+       [  --enable-pc-files       generate and install .pc files for pkg-config],
+       [enable_pc_files=$enableval],
+       [enable_pc_files=no])
+AC_MSG_RESULT($enable_pc_files)
+if test "x$enable_pc_files" != xno
+then
+       CF_PATH_SYNTAX(PKG_CONFIG_LIBDIR)
+       MAKE_PC_FILES=
+else
+       MAKE_PC_FILES="#"
 fi
+AC_SUBST(MAKE_PC_FILES)
 ])dnl
 dnl ---------------------------------------------------------------------------
 dnl CF_FIND_LIBRARY version: 9 updated: 2008/03/23 14:48:54
@@ -1206,6 +1212,17 @@ rm -rf conftest*
 AC_SUBST(EXTRA_CFLAGS)
 ])dnl
 dnl ---------------------------------------------------------------------------
+dnl CF_GNATPREP_OPT_T version: 1 updated: 2014/08/02 18:37:25
+dnl -----------------
+AC_DEFUN([CF_GNATPREP_OPT_T],[
+AC_CACHE_CHECK(if GNATPREP supports -T option,cf_cv_gnatprep_opt_t,[
+cf_cv_gnatprep_opt_t=no
+gnatprep -T 2>/dev/null >/dev/null && cf_cv_gnatprep_opt_t=yes
+])
+test "$cf_cv_gnatprep_opt_t" = yes && GNATPREP_OPTS="-T $GNATPREP_OPTS"
+AC_SUBST(GNATPREP_OPTS)
+])dnl
+dnl ---------------------------------------------------------------------------
 dnl CF_GNAT_GENERICS version: 2 updated: 2011/03/23 20:24:41
 dnl ----------------
 AC_DEFUN([CF_GNAT_GENERICS],
@@ -1548,29 +1565,20 @@ AC_DEFUN([CF_HELP_MESSAGE],
 [AC_DIVERT_HELP([$1])dnl
 ])dnl
 dnl ---------------------------------------------------------------------------
-dnl CF_INCLUDE_DIRS version: 8 updated: 2013/10/12 16:45:09
+dnl CF_INCLUDE_DIRS version: 10 updated: 2014/09/19 20:58:42
 dnl ---------------
 dnl Construct the list of include-options according to whether we're building
-dnl in the source directory or using '--srcdir=DIR' option.  If we're building
-dnl with gcc, don't append the includedir if it happens to be /usr/include,
-dnl since that usually breaks gcc's shadow-includes.
+dnl in the source directory or using '--srcdir=DIR' option.
 AC_DEFUN([CF_INCLUDE_DIRS],
 [
-if test "$GCC" != yes; then
-       CPPFLAGS="-I\${includedir} $CPPFLAGS"
-elif test "$includedir" != "/usr/include"; then
-       if test "$includedir" = '${prefix}/include' ; then
-               if test x$prefix != x/usr ; then
-                       CPPFLAGS="-I\${includedir} $CPPFLAGS"
-               fi
-       else
-               CPPFLAGS="-I\${includedir} $CPPFLAGS"
-       fi
-fi
 if test "$srcdir" != "."; then
        CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
 fi
-CPPFLAGS="-I. -I../include $CPPFLAGS"
+CPPFLAGS="-I../include $CPPFLAGS"
+if test "$srcdir" != "."; then
+       CPPFLAGS="-I\${srcdir} $CPPFLAGS"
+fi
+CPPFLAGS="-I. $CPPFLAGS"
 AC_SUBST(CPPFLAGS)
 ])dnl
 dnl ---------------------------------------------------------------------------
@@ -2534,7 +2542,7 @@ case ".[$]$1" in #(vi
 esac
 ])dnl
 dnl ---------------------------------------------------------------------------
-dnl CF_PKG_CONFIG version: 7 updated: 2011/04/29 04:53:22
+dnl CF_PKG_CONFIG version: 8 updated: 2014/12/13 18:48:46
 dnl -------------
 dnl Check for the package-config program, unless disabled by command-line.
 AC_DEFUN([CF_PKG_CONFIG],
@@ -2563,6 +2571,8 @@ esac
 test -z "$PKG_CONFIG" && PKG_CONFIG=none
 if test "$PKG_CONFIG" != none ; then
        CF_PATH_SYNTAX(PKG_CONFIG)
+else
+       AC_MSG_WARN(pkg-config is not installed)
 fi
 
 AC_SUBST(PKG_CONFIG)
@@ -3287,7 +3297,7 @@ dnl       Remove "-g" option from the compiler options
 AC_DEFUN([CF_STRIP_G_OPT],
 [$1=`echo ${$1} | sed -e 's%-g %%' -e 's%-g$%%'`])dnl
 dnl ---------------------------------------------------------------------------
-dnl CF_SUBDIR_PATH version: 6 updated: 2010/04/21 06:20:50
+dnl CF_SUBDIR_PATH version: 7 updated: 2014/12/04 04:33:06
 dnl --------------
 dnl Construct a search-list for a nonstandard header/lib-file
 dnl    $1 = the variable to return as result
@@ -3297,11 +3307,18 @@ AC_DEFUN([CF_SUBDIR_PATH],
 [
 $1=
 
-CF_ADD_SUBDIR_PATH($1,$2,$3,/usr,$prefix)
 CF_ADD_SUBDIR_PATH($1,$2,$3,$prefix,NONE)
-CF_ADD_SUBDIR_PATH($1,$2,$3,/usr/local,$prefix)
-CF_ADD_SUBDIR_PATH($1,$2,$3,/opt,$prefix)
-CF_ADD_SUBDIR_PATH($1,$2,$3,[$]HOME,$prefix)
+
+for cf_subdir_prefix in \
+       /usr \
+       /usr/local \
+       /usr/pkg \
+       /opt \
+       /opt/local \
+       [$]HOME
+do
+       CF_ADD_SUBDIR_PATH($1,$2,$3,$cf_subdir_prefix,$prefix)
+done
 ])dnl
 dnl ---------------------------------------------------------------------------
 dnl CF_TERM_HEADER version: 3 updated: 2012/10/06 08:57:51
@@ -3608,45 +3625,70 @@ eval $3="$withval"
 AC_SUBST($3)dnl
 ])dnl
 dnl ---------------------------------------------------------------------------
-dnl CF_WITH_PKG_CONFIG_LIBDIR version: 2 updated: 2011/12/10 18:58:47
+dnl CF_WITH_PKG_CONFIG_LIBDIR version: 3 updated: 2014/12/13 18:48:46
 dnl -------------------------
 dnl Allow the choice of the pkg-config library directory to be overridden.
 AC_DEFUN([CF_WITH_PKG_CONFIG_LIBDIR],[
-if test "$PKG_CONFIG" != none ; then
-       AC_MSG_CHECKING(for $PKG_CONFIG library directory)
-       AC_ARG_WITH(pkg-config-libdir,
-               [  --with-pkg-config-libdir=XXX use given directory for installing pc-files],
-               [PKG_CONFIG_LIBDIR=$withval],
-               [PKG_CONFIG_LIBDIR=yes])
-
-       case x$PKG_CONFIG_LIBDIR in #(vi
-       x/*) #(vi
-               ;;
-       xyes) #(vi
-               # look for the library directory using the same prefix as the executable
+AC_MSG_CHECKING(for $PKG_CONFIG library directory)
+AC_ARG_WITH(pkg-config-libdir,
+       [  --with-pkg-config-libdir=XXX use given directory for installing pc-files],
+       [PKG_CONFIG_LIBDIR=$withval],
+       [PKG_CONFIG_LIBDIR=yes])
+
+case x$PKG_CONFIG_LIBDIR in #(vi
+x/*) #(vi
+       ;;
+xyes) #(vi
+       # Look for the library directory using the same prefix as the executable
+       if test "x$PKG_CONFIG" = xnone
+       then
+               cf_path=$prefix
+       else
                cf_path=`echo "$PKG_CONFIG" | sed -e 's,/[[^/]]*/[[^/]]*$,,'`
-               case x`(arch) 2>/dev/null` in #(vi
-               *64) #(vi
-                       for cf_config in $cf_path/share $cf_path/lib64 $cf_path/lib32 $cf_path/lib
-                       do
-                               if test -d $cf_config/pkgconfig
-                               then
-                                       PKG_CONFIG_LIBDIR=$cf_config/pkgconfig
-                                       break
-                               fi
-                       done
-                       ;;
-               *)
-                       PKG_CONFIG_LIBDIR=$cf_path/lib/pkgconfig
-                       ;;
-               esac
+       fi
+
+       # If you don't like using the default architecture, you have to specify the
+       # intended library directory and corresponding compiler/linker options.
+       #
+       # This case allows for Debian's 2014-flavor of multiarch, along with the
+       # most common variations before that point.  Some other variants spell the
+       # directory differently, e.g., "pkg-config", and put it in unusual places. 
+       # pkg-config has always been poorly standardized, which is ironic...
+       case x`(arch) 2>/dev/null` in #(vi
+       *64) #(vi
+               cf_search_path="\
+                       $cf_path/lib/*64-linux-gnu \
+                       $cf_path/share \
+                       $cf_path/lib64 \
+                       $cf_path/lib32 \
+                       $cf_path/lib"
                ;;
        *)
+               cf_search_path="\
+                       $cf_path/lib/*-linux-gnu \
+                       $cf_path/share \
+                       $cf_path/lib32 \
+                       $cf_path/lib"
                ;;
        esac
 
-       AC_MSG_RESULT($PKG_CONFIG_LIBDIR)
-fi
+       CF_VERBOSE(list...)
+       for cf_config in $cf_search_path
+       do
+               CF_VERBOSE(checking $cf_config/pkgconfig)
+               if test -d $cf_config/pkgconfig
+               then
+                       PKG_CONFIG_LIBDIR=$cf_config/pkgconfig
+                       AC_MSG_CHECKING(done)
+                       break
+               fi
+       done
+       ;;
+*)
+       ;;
+esac
+
+AC_MSG_RESULT($PKG_CONFIG_LIBDIR)
 
 AC_SUBST(PKG_CONFIG_LIBDIR)
 ])dnl
@@ -3713,7 +3755,7 @@ AC_ARG_WITH(system-type,
 ])
 ])dnl
 dnl ---------------------------------------------------------------------------
-dnl CF_XOPEN_SOURCE version: 46 updated: 2014/02/09 19:30:15
+dnl CF_XOPEN_SOURCE version: 48 updated: 2014/09/01 12:29:14
 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,
@@ -3764,6 +3806,9 @@ irix[[56]].*) #(vi
 linux*|gnu*|mint*|k*bsd*-gnu) #(vi
        CF_GNU_SOURCE
        ;;
+minix*) #(vi
+       cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
+       ;;
 mirbsd*) #(vi
        # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
        cf_XOPEN_SOURCE=
@@ -3793,6 +3838,10 @@ solaris2.*) #(vi
        cf_xopen_source="-D__EXTENSIONS__"
        cf_cv_xopen_source=broken
        ;;
+sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
+       cf_XOPEN_SOURCE=
+       cf_POSIX_C_SOURCE=
+       ;;
 *)
        CF_TRY_XOPEN_SOURCE
        CF_POSIX_C_SOURCE($cf_POSIX_C_SOURCE)
@@ -3800,7 +3849,7 @@ solaris2.*) #(vi
 esac
 
 if test -n "$cf_xopen_source" ; then
-       CF_ADD_CFLAGS($cf_xopen_source)
+       CF_ADD_CFLAGS($cf_xopen_source,true)
 fi
 
 dnl In anything but the default case, we may have system-specific setting