[rizzo@icir.org: [asterisk-dev] autoconf issues for FreeBSD]

Alexander Leidinger Alexander at Leidinger.net
Fri Oct 6 06:03:45 PDT 2006


Quoting Luigi Rizzo <rizzo at icir.org> (from Wed, 4 Oct 2006 13:28:43 -0700):

> any autoconf guru here who can help me with the problem described below ?
>
> basically, what is the proper way to tell configure.ac to set CPPFLAGS
> and LDFLAGS properly (i.e. according to platform conventions) without
> having to put platform-specific code in configure.ac or invoking
> ./configure with these values set ?

I don't know about such a way.

If you put something like your proposal into place, I suggest to  
change it a little bit. The way outlined below discards any user  
specified settings. So I suggest to use FOO="$FOO bar" instead of  
FOO=bar. This way an user can override the search order.

Bye,
Alexander.

>
> Index: configure.ac
> ===================================================================
> --- configure.ac        (revision 44374)
> +++ configure.ac        (working copy)
> @@ -30,6 +30,8 @@
>  case "${host_os}" in
>       freebsd*)
>       ac_default_prefix=/usr/local
> +     CPPFLAGS=-I/usr/local/include
> +     LDFLAGS=-L/usr/local/lib
>       ;;
>       *)
>       ac_default_prefix=/usr

Bye,
Alexander.

-- 
I don't mind arguing with myself.
It's when I lose that it bothers me.
		-- Richard Powers

http://www.Leidinger.net    Alexander @ Leidinger.net: PGP ID = B0063FE7
http://www.FreeBSD.org       netchild @ FreeBSD.org  : PGP ID = 72077137



More information about the freebsd-ports mailing list