Next: , Previous: , Up: The Macros  


ax_check_strcspn

Synopsis

AX_CHECK_STRCSPN

Description

Not all systems have strcspn(3). See if we need to substitute. To make this work, you have to do horrible things. In one of your Makefile.am files, you must make an explicit rule to make this object. It should look like this:

  strcspn.lo : $(top_srcdir)/compat/strcspn.c
      $(LTCOMPILE) -o $@ -c $(top_srcdir)/compat/strcspn.c

and you must include “@COMPATOBJ@” in a LIBADD somewhere and, finally, you must add another artificial dependency, something like:

  makeshell.lo : genshell.c @COMPATOBJ@

It is all pretty horrific, but I have found nothing else that works.

Source Code

Download the latest version of ax_check_strcspn.m4 or browse the macro’s revision history.

License

Copyright © 2008 Bruce Korb bkorb@gnu.org

Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved. This file is offered as-is, without any warranty.