Homebrew installed to home directory - how to link to libs in autoconf? -


not sure if belongs on here or superuser, here goes:

i have homebrew installed in $home/opt/homebrew dir (i'm pretty religious isolation user accounts - yes, i'm 1 of people). in case, homebrew doesn't install /usr/local/. works fine because added homebrew head of personal path in .bashrc.

i'm using autoconf. i'm c newb. have configure.ac checks apache portable runtime. --install generate ./configure fine. when run ./configure, doesn't find - because it's not looking homebrew installed it.

i assume have provide arguments ./configure script setting includedir , libdir. doesn't work. right way link these homebrew libs?

for posterity:

in configure.ac, use pkg_check_modules macro. assumes, of course, have pkg-check installed, via homebrew.

pkg_check_modules(glib2, glib-2.0, [], [ac_msg_failure([glib-2.0 not installed])]) 

the macro above sets group of variables use in autoconf , automake files prefixed glib2.

i use in makefile.am thus:

bin_programs = <myprogram> <myprogram>_sources = \         main.c <myprogram>_cflags = ${glib2_cflags} <myprogram>_ldadd = ${libs} ${glib2_libs} 

it's rather straightforward if use pkg-config. can package own libs , install them use way, linking them in place homebrew.


Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -