Re: Autoconf regex test

2000-04-05 Thread Jim Meyering

Geoff Hutchison <[EMAIL PROTECTED]> writes:
| I need some help on writing a rather strange autoconf test. If this seems
| painfully obvious, I'm sorry, I'm just drawing a blank.
|
| My GPL'ed package includes the glibc regex.c source. Right now, this
| causes segfaults on BSDI and Digital Unix. I'm in the process of working
| out why this happens, but in the meantime, I'd like a test to see whether
| the included regex.o should be compiled and linked in.
|
| Basically, I want an AC_TRY_RUN test that includes the regex.c file in
| compilation. Is this possible, or can you only compile/link the test
| program file?

Sounds like this macro will do what you want -- to see it in action,
look in m4/ in ftp://alpha.gnu.org/gnu/fetish/sh-utils-2.0g.tar.gz



#serial 7

dnl Initially derived from code in GNU grep.
dnl Mostly written by Jim Meyering.

dnl Usage: jm_INCLUDED_REGEX([lib/regex.c])
dnl
AC_DEFUN(jm_INCLUDED_REGEX,
  [
dnl Even packages that don't use regex.c can use this macro.
dnl Of course, for them it doesn't do anything.

# Assume we'll default to using the included regex.c.
ac_use_included_regex=yes

# However, if the system regex support is good enough that it passes the
# the following run test, then default to *not* using the included regex.c.
# If cross compiling, assume the test would fail and use the included
# regex.c.  The first failing regular expression is from `Spencer ere
# test #75' in grep-2.3.
AC_CACHE_CHECK([for working re_compile_pattern],
   jm_cv_func_working_re_compile_pattern,
  AC_TRY_RUN(
[#include 
#include 
  int
  main ()
  {
static struct re_pattern_buffer regex;
const char *s;
re_set_syntax (RE_SYNTAX_POSIX_EGREP);
/* Add this third left square bracket, [, to balance the
   three right ones below.  Otherwise autoconf-2.14 chokes.  */
s = re_compile_pattern ("a[[:]:]]b\n", 9, ®ex);
/* This should fail with _Invalid character class name_ error.  */
if (!s)
  exit (1);

/* This should succeed, but doesn't for e.g. glibc-2.1.3.  */
s = re_compile_pattern ("{1", 2, ®ex);

exit (s ? 1 : 0);
  }
],
   jm_cv_func_working_re_compile_pattern=yes,
   jm_cv_func_working_re_compile_pattern=no,
   dnl When crosscompiling, assume it's broken.
   jm_cv_func_working_re_compile_pattern=no))
if test $jm_cv_func_working_re_compile_pattern = yes; then
  ac_use_included_regex=no
fi

test -n "$1" || AC_MSG_ERROR([missing argument])
syscmd([test -f $1])
ifelse(sysval, 0,
  [

AC_ARG_WITH(included-regex,
[  --without-included-regex don't compile regex; this is the default on
  systems with version 2 of the GNU C library
  (use with caution on other system)],
jm_with_regex=$withval,
jm_with_regex=$ac_use_included_regex)
if test "$jm_with_regex" = yes; then
  AC_SUBST(LIBOBJS)
  LIBOBJS="$LIBOBJS regex.$ac_objext"
fi
  ],
)
  ]
)



Testing for a library with $CXX (instead of $CC)

2000-04-05 Thread F Labrosse

Hi all,

Is it possible to test for a library using $CXX instead of $CC?  My problem 
is that on a Solaris box, some libraries won't link with cc while they do
with CC (e.g. qt).

Or is it better to set $CC to CC (instead of having $CC=cc and $CXX=CC).

TIA,

Fred




GNU make 3.79 released

2000-04-05 Thread Paul D. Smith

[[ Note to pretesters: until the tar file is available on ftp.gnu.org
   you can access it via ftp://alpha.gnu.org/gnu/make/make-3.79.tar.gz ]]

GNU Make version 3.79 is now available for download.

The `make' utility automates the process of compilation.  When the source
files of a large program change, Make automatically determines which pieces
need to be updated and recompiles only those files.

GNU make is fully compliant with the POSIX.2 standard, and also has many
powerful extensions: flexible implicit pattern rules, an extensive set of
text manipulation functions, conditional evaluation of makefiles, support
for parallel command execution, automatic updating of makefiles, and more.

In addition to UNIX systems, it can be built for DOS, Windows (95/98/NT),
VMS, and Amiga platforms.

This release of GNU make contains several important bug fixes and some
new features, including improved flexibility in debugging options.  This
version also integrates GNU gettext for internationalization support,
with at least partial translations for Dutch, French, German, Korean,
Polish, Russian, and Spanish.  Please see the ABOUT-NLS file for
information on enabling internationalization, and for reporting problems
with any translations.

See the NEWS file and the GNU Make User's Manual, contained in the
distribution, for full details on user-visible changes.

Please see the README and INSTALL files for information on building GNU
make for your system.

Bugs and problems should be reported to the <[EMAIL PROTECTED]> mailing
list.  Requests for help can be sent to <[EMAIL PROTECTED]>, or one of
the gnu.utils.bug or gnu.utils.help USENET newsgroups.  See the README
file for information on accessing the online bug database, or the latest
versions of GNU make via CVS.


The complete distribution is available from the GNU ftp site
ftp://ftp.gnu.org/gnu/make/ and its mirrors.  Please see:

  http://www.gnu.org/order/ftp.html

for a complete list of international mirror sites.  No patch file is
currently available, since it was over 245k compressed.  If you require
a patch file please contact <[EMAIL PROTECTED]>.

  make-3.79.tar.gz  is 959005 bytes

MD5 checksum is:

  a59cc0e5792474f6809131650d2fff5a  make-3.79.tar.gz

Have fun!

-- 
---
 Paul D. Smith <[EMAIL PROTECTED]>  Find some GNU make tips at:
 http://www.gnu.org  http://www.ultranet.com/~pauld/gmake/
 "Please remain calm...I may be mad, but I am a professional." --Mad Scientist




Re: Testing for a library with $CXX (instead of $CC)

2000-04-05 Thread Alexandre Oliva

On Apr  5, 2000, F Labrosse <[EMAIL PROTECTED]> wrote:

> Is it possible to test for a library using $CXX instead of $CC?

This is an `autoconf', not `automake', question.  See the `Language
Choice' node in the autoconf manual.

-- 
Alexandre OlivaEnjoy Guaraná, see http://www.ic.unicamp.br/~oliva/
Cygnus Solutions, a Red Hat companyaoliva@{redhat, cygnus}.com
Free Software Developer and EvangelistCS PhD student at IC-Unicamp
oliva@{lsd.ic.unicamp.br, gnu.org}   Write to mailing lists, not to me




Re: Testing for a library with $CXX (instead of $CC)

2000-04-05 Thread Tom Tromey

> "Fred" == F Labrosse <[EMAIL PROTECTED]> writes:

Fred> Is it possible to test for a library using $CXX instead of $CC?
Fred> My problem is that on a Solaris box, some libraries won't link
Fred> with cc while they do with CC (e.g. qt).

Can't you set the language to C++ and then test?
Seems like this ought to work.
If not, it is probably an autoconf bug.

Fred> Or is it better to set $CC to CC (instead of having $CC=cc and
Fred> $CXX=CC).

No, that's worse.

Tom




Re: automake --add-missing --copy

2000-04-05 Thread Tom Tromey

> "Lars" == Lars J Aas <[EMAIL PROTECTED]> writes:

Lars> I've always been annoyed that automake --add-missing --copy
Lars> doesn't pass the "--copy"-option along to libtoolize, so I end
Lars> up with symlinked config.guess, config.sub, ltconfig and
Lars> ltmain.sh.

Fixed.

Lars> This might be fixed already, it's an "old" (month at least)
Lars> automake 1.4a I've got installed.

That's funny, given the recent pace of development.

Tom