From: Bruno Haible Date: Sun, 31 Jul 2011 14:44:55 +0000 (+0200) Subject: Add support for Minix with ACK compiler. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2b14869442bce932cf1d805387928484d4914d59;p=pspp Add support for Minix with ACK compiler. * m4/gnulib-common.m4 (gl_PROG_AR_RANLIB): New macro. * gnulib-tool (func_import, func_create_testdir): Emit invocation of gl_PROG_AR_RANLIB instead of AC_PROG_RANLIB. --- diff --git a/ChangeLog b/ChangeLog index 5e677e59f4..666d98f077 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2011-07-31 Bruno Haible + + Add support for Minix with ACK compiler. + * m4/gnulib-common.m4 (gl_PROG_AR_RANLIB): New macro. + * gnulib-tool (func_import, func_create_testdir): Emit invocation of + gl_PROG_AR_RANLIB instead of AC_PROG_RANLIB. + 2011-07-31 Bruno Haible Documentation about Minix. diff --git a/gnulib-tool b/gnulib-tool index 2235cf9ca7..3356326383 100755 --- a/gnulib-tool +++ b/gnulib-tool @@ -5126,7 +5126,7 @@ s,//*$,/,' echo " m4_pattern_allow([^gl_ES\$])dnl a valid locale name" echo " m4_pattern_allow([^gl_LIBOBJS\$])dnl a variable" echo " m4_pattern_allow([^gl_LTLIBOBJS\$])dnl a variable" - echo " AC_REQUIRE([AC_PROG_RANLIB])" + echo " AC_REQUIRE([gl_PROG_AR_RANLIB])" if test -n "$uses_subdirs"; then echo " AC_REQUIRE([AM_PROG_CC_C_O])" fi @@ -5735,7 +5735,7 @@ func_create_testdir () echo "AC_PROG_CC" echo "AC_PROG_INSTALL" echo "AC_PROG_MAKE_SET" - echo "AC_PROG_RANLIB" + echo "gl_PROG_AR_RANLIB" echo if test -n "$uses_subdirs"; then echo "AM_PROG_CC_C_O" @@ -5850,7 +5850,7 @@ func_create_testdir () echo "m4_pattern_allow([^gl_LIBOBJS\$])dnl a variable" echo "m4_pattern_allow([^gl_LTLIBOBJS\$])dnl a variable" echo - echo "AC_PROG_RANLIB" + echo "gl_PROG_AR_RANLIB" echo if test -n "$any_uses_subdirs"; then echo "AM_PROG_CC_C_O" diff --git a/m4/gnulib-common.m4 b/m4/gnulib-common.m4 index 6b5923a0ea..9dc8fbe8e4 100644 --- a/m4/gnulib-common.m4 +++ b/m4/gnulib-common.m4 @@ -1,4 +1,4 @@ -# gnulib-common.m4 serial 28 +# gnulib-common.m4 serial 29 dnl Copyright (C) 2007-2011 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -211,6 +211,35 @@ m4_ifndef([AS_VAR_IF], [m4_define([AS_VAR_IF], [AS_IF([test x"AS_VAR_GET([$1])" = x""$2], [$3], [$4])])]) +# gl_PROG_AR_RANLIB +# Determines the values for AR, ARFLAGS, RANLIB that fit with the compiler. +AC_DEFUN([gl_PROG_AR_RANLIB], +[ + dnl Minix 3 comes with two toolchains: The Amsterdam Compiler Kit compiler + dnl as "cc", and GCC as "gcc". They have different object file formats and + dnl library formats. In particular, the GNU binutils programs ar, ranlib + dnl produce libraries that work only with gcc, not with cc. + AC_REQUIRE([AC_PROG_CC]) + AC_EGREP_CPP([Amsterdam], + [ +#ifdef __ACK__ +Amsterdam +#endif + ], + [AR='cc -c.a' + ARFLAGS='-o' + RANLIB=':' + ], + [dnl Use the Automake-documented default values for AR and ARFLAGS. + AR='ar' + ARFLAGS='cru' + dnl Use the ranlib program if it is available. + AC_PROG_RANLIB + ]) + AC_SUBST([AR]) + AC_SUBST([ARFLAGS]) +]) + # AC_PROG_MKDIR_P # is a backport of autoconf-2.60's AC_PROG_MKDIR_P, with a fix # for interoperability with automake-1.9.6 from autoconf-2.62.