autoconf
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Help with AC_REPLACE_FUNCS


From: Gary V . Vaughan
Subject: Re: Help with AC_REPLACE_FUNCS
Date: Tue, 31 Jul 2001 02:27:55 +0100

On Tuesday 31 July 2001 1:09 am, Grosch, Scott wrote:
> I am having trouble getting a replacement to work.  I'm trying this, but I
> get
> an error from sh when I run configure:
>
> AC_CHECK_FUNCS(strrchr, [],
>                   AC_CHECK_LIB(iberty, strrchr, [],
>
> AC_REPLACE_FUNCS([${srcdir}/replace/strrchr.c])))
>
> I basically want to check for the function, and if it's not there then
> check and
> see if I can find it in -liberty, and if they don't have that installed,
> then
> pull a copy from the toplevel replace dir where I have a copy of it.
>
> I get this:
>
> .../configure: syntax error at line 5419: `end of file' unexpected

Ypu haven't quoted the arguments to AC_CHECK_FUNCS, so the commas in 
AC_CHECK_LIB are taken to be argument delimiters in AC_CHECK_FUNCS.  
Something like this ought to work (I haven't checked the syntax for the macro 
calls, I'm just adjusting your quoting -- although you have misunderstood how 
to call AC_REPLACE_FUNCS):

AC_CHECK_FUNCS([strrchr],
    [],
    [AC_CHECK_LIB([iberty],
        [strrchr],
        [AC_REPLACE_FUNCS([strrchr])])
    ])

Cheers,
        Gary.
-- 
  ())_. Gary V. Vaughan     gary@(oranda.demon.co.uk|gnu.org)
  ( '/  Research Scientist  http://www.oranda.demon.co.uk       ,_())____
  / )=  GNU Hacker          http://www.gnu.org/software/libtool  \'      `&
`(_~)_  Tech' Author        http://sources.redhat.com/autobook   =`---d__/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]