[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: default searchpaths on *BSD machines?
From: |
Miles Bader |
Subject: |
Re: default searchpaths on *BSD machines? |
Date: |
Tue, 17 Apr 2012 10:24:11 +0900 |
Harlan Stenn <address@hidden> writes:
>> Hmm, OK, so in that case, does anybody know what typical practice
>> for FreeBSD users is (so I can be sure to cater to it)? They must
>> encounter this issue all the time.
>>
>> Do they usually just specify CFLAGS/CPPFLAGS/LDFLAGS on the
>> configure command line [maybe via a local config.site file as
>> mentioned]?
>
> It's never been an issue for me, and I've been using FreeBSD for a
> very long time. I have /usr/local/bin and /usr/local/sbin in my
> PATH, and when I run "configure" my builds just work.
Can you give some details as to the mechanism by which this works in
most cases? As far as I can tell, a configure script won't find any
includes or libraries in /usr/local by default -- at least _my_
configure script didn't, when I tested on a new install of FreeBSD.
To be more explicit, my configure script checks for libraries,
e.g. "libjpeg" using standard techniques:
# Check for jpeg image library
#
have_libjpeg=no
AC_CHECK_LIB([jpeg], [jpeg_start_compress], [have_libjpeg=yes])
if test $have_libjpeg = yes; then
AC_SUBST([libjpeg_LIBS], [-ljpeg])
AC_DEFINE([HAVE_LIBJPEG], [1], [Define if libjpeg is installed])
fi
AM_CONDITIONAL([have_libjpeg], [test $have_libjpeg = yes])
I installed "libjpeg" using the FreeBSD ports infrastructure, but my
configure script still couldn't "see" it... once I explicitly added
"-I/usr/local/include" to CPPFLAGS, and "-L/usr/local/lib" to LDFLAGS,
then it did find it.
> Just like anything else, it's up to the installer to put things where
> they are supposed to go, and it's up to the local admins to tell folks
> what the default PATHs should be for things to work as expected.
Ok, but which "PATHs" are these? The executable search path doesn't
cover include files or libraries...
Things I can think of: CPPFLAGS (for includes), LDFLAGS (for
libraries), PKG_CONFIG_PATH (for stuff that uses pkg-config), etc...
Thanks,
-miles
--
"Nah, there's no bigger atheist than me. Well, I take that back.
I'm a cancer screening away from going agnostic and a biopsy away
from full-fledged Christian." [Adam Carolla]
- default searchpaths on *BSD machines?, Miles Bader, 2012/04/15
- Re: default searchpaths on *BSD machines?, Bob Friesenhahn, 2012/04/15
- Re: default searchpaths on *BSD machines?, Miles Bader, 2012/04/15
- Re: default searchpaths on *BSD machines?, Bob Friesenhahn, 2012/04/16
- Re: default searchpaths on *BSD machines?, Miles Bader, 2012/04/16
- Re: default searchpaths on *BSD machines?, Harlan Stenn, 2012/04/16
- Re: default searchpaths on *BSD machines?,
Miles Bader <=
- Re: [autoconf] Re: default searchpaths on *BSD machines?, suzuki toshiya, 2012/04/16
- Re: default searchpaths on *BSD machines?, James K. Lowden, 2012/04/17