1832368 Members
2808 Online
110041 Solutions
New Discussion

lib

 
Ceaser123
Occasional Advisor

lib

When I need to configure with ./configure...Will I use these kind of paths to ensure it works?
/usr/local/lib or /opt/gnome/lib?
4 REPLIES 4
Patrick Wallek
Honored Contributor

Re: lib

It depends entirely on what you are compiling and what it requires. Some software may require libraries from the above pahts, some may not.

To be on the save side, set your SHLIB_PATH and LD_LIBRARY_PATH to include those directories.
Ceaser123
Occasional Advisor

Re: lib

I know it varies with whatever I'm configuring. My question was are these the "TYPE" of libs I point the ./configuration to.
ranganath ramachandra
Esteemed Contributor

Re: lib

what 'type's are you referring to ? if you mean 32-bit and 64-bit libraries, you can easily check that by using the 'file' command on any library in the path you are considering. for example, /usr/lib/libc.sl is a 32-bit library whereas /usr/lib/pa20_64/libc.sl is a 64-bit library.
 
--
ranga
hp-ux 11i v3[i work for hpe]

Accept or Kudo

H.Merijn Brand (procura
Honored Contributor

Re: lib

Good configure scripts know where to look for them, and if they cannot find them, they will ask you to type them in

Not so good configure script don't

All configure scripts from the GNU world, however know about $CONFIG_SITE an environment variable that should point to a shell script in which you can influence all configure's behaviour

http://www.google.com/search?q=.CONFIG_SITE&sourceid=opera&num=0&ie=utf-8&oe=utf-8

should give you some hints

Example (my $CONFIG_SITE on HP-UX and AIX):

--8<--- /pro/3gl/GNU/Policy.sh
# $CONFIG_SITE -> /pro/3gl/GNU/policy.sh

echo "OSTYPE: $OSTYPE, CC: $CC, CFLAGS: $CFLAGS, LDFLAGS: $LDFLAGS"
if [ $OSTYPE = hpux -a ${CC:-x} = x ]; then
CC=cc
# CFLAGS="-Ae -fast +Onolimit"
LDFLAGS="-Wl,+vnocompatwarnings $LDFLAGS"
CFLAGS="-Ae +O2 +Onolimit $CFLAGS"
if [ $HOST = d3 ]; then
CFLAGS=$CFLAGS" +DAportable"
fi
elif [ $OSTYPE = aix -a ${CC:-x} = x ]; then
CC=cc
CFLAGS="-O2 -qmaxmem=204800"
elif [ $OSTYPE = osf1 ]; then
CC=cc
CFLAGS="-O2 -std"
elif [ ${CC:-x} = gcc -o ${CC:-x} = gcc32 -o ${CC:-x} = gcc64 ]; then
CFLAGS="-O4 $CFLAGS"
else
#CC=cc
CFLAGS=-O2
fi

if [ $OSTYPE = hpux -a ${CC:-x} = gcc64 ]; then
PATH="/usr/local/pa20_64:$PATH"
CC=gcc
CFLAGS=$CFLAGS" -mpa-risc-2-0"
LDFLAGS="-s -L/usr/lib/pa20_64 "$LDFLAGS
elif [ $OSTYPE = hpux -a ${CC:-x} = gcc ]; then
if [ $HOST = d3 -o `uname -r` = "B.10.20" ]; then
CFLAGS=$CFLAGS" -mpa-risc-1-1"
else
CFLAGS=$CFLAGS" -mpa-risc-2-0"
fi
fi

case "$CFLAGS:$CC" in
*DA2.0w*|*DD64*|*:gcc64) ;;
*) CFLAGS=$CFLAGS" -I/pro/local/include"
LDFLAGS=$LDFLAGS" -s -L/pro/local/lib"
esac

if [ "${USE_NCURSES:-}" = "YES" ]; then
CFLAGS=`echo "$CFLAGS -I." | sed -e 's,-I,-I/pro/local/include/ncurses -I,'
-e 's, -I.$,,'`
fi

if [ -d /usr/include/X11R6 ]; then
CFLAGS=$CFLAGS" -I/usr/include/X11R6"
fi
if [ -d /usr/lib/X11R6 ]; then
LDFLAGS=$LDFLAGS" -L/usr/lib/X11R6"
fi
echo "OSTYPE: $OSTYPE, CC: $CC, CFLAGS: $CFLAGS, LDFLAGS: $LDFLAGS"

#In $CONFIG_SITE, you can do things like
#
# test x$CPPFLAGS = x && CPPFLAGS='-I/bla/bla/include'
# test x$LDFALGS = x && LDFLAGS='-L/bla/bla/lib'
#
#But even better, you can do things conditionally on whether or not
#you've set --prefix to something other than /usr/local:
#
# if test x$prefix != xNONE -a x$prefix != x/usr/local; then
# test -d $prefix/include && CPPFLAGS="$CPPFLAGS
# -I$prefix/include" test -d $prefix/lib && LDFLAGS="$LDFLAGS
# -L$prefix/lib"
# fi
-->8---

Sorry that the forum removes the formatting

Enjoy, Have FUN! H.Merijn
Enjoy, Have FUN! H.Merijn