Subject: autoconf fight
To: None <>
From: Brian <>
List: netbsd-users
Date: 10/18/2004 21:49:44
I'm having an autoconf issue, specifying location of pthreads.

supposedly I can define paths via:

(the ./configure file content: )
Usage: $0 [OPTION]... [VAR=VALUE]...

To assign environment variables (e.g., CC, CFLAGS...), specify them as
VAR=VALUE.  See below for descriptions of some of the useful variables.

Defaults for the options are specified in brackets.

   -h, --help              display this help and exit
       --help=short        display options specific to this package
       --help=recursive    display the short help of all the included 
   -V, --version           display version information and exit
   -q, --quiet, --silent   do not print \`checking...' messages
       --cache-file=FILE   cache test results in FILE [disabled]
   -C, --config-cache      alias for \`--cache-file=config.cache'
   -n, --no-create         do not create output files
       --srcdir=DIR        find the sources in DIR [configure dir or 


   cat <<_ACEOF
Installation directories:
   --prefix=PREFIX         install architecture-independent files in 
   --exec-prefix=EPREFIX   install architecture-dependent files in 

By default, \`make install' will install all the files in
\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can 
an installation prefix other than \`$ac_default_prefix' using 
for instance \`--prefix=\$HOME'.

For better control, use the options below.

Fine tuning of the installation directories:
   --bindir=DIR           user executables [EPREFIX/bin]
   --sbindir=DIR          system admin executables [EPREFIX/sbin]
   --libexecdir=DIR       program executables [EPREFIX/libexec]
   --datadir=DIR          read-only architecture-independent data 
   --sysconfdir=DIR       read-only single-machine data [PREFIX/etc]
   --sharedstatedir=DIR   modifiable architecture-independent data 
   --localstatedir=DIR    modifiable single-machine data [PREFIX/var]
   --libdir=DIR           object code libraries [EPREFIX/lib]
   --includedir=DIR       C header files [PREFIX/include]
   --oldincludedir=DIR    C header files for non-gcc [/usr/include]
   --infodir=DIR          info documentation [PREFIX/info]
   --mandir=DIR           man documentation [PREFIX/man]

   cat <<\_ACEOF
  cat <<\_ACEOF

Program names:
   --program-prefix=PREFIX            prepend PREFIX to installed 
program names
   --program-suffix=SUFFIX            append SUFFIX to installed program 
   --program-transform-name=PROGRAM   run sed PROGRAM on installed 
program names

System types:
   --build=BUILD     configure for building on BUILD [guessed]
   --host=HOST       cross-compile to build programs to run on HOST 

if test -n "$ac_init_help"; then
   case $ac_init_help in
      short | recursive ) echo "Configuration of Icecast 2.0.2:";;
   cat <<\_ACEOF

Optional Features:
   --disable-FEATURE       do not include FEATURE (same as 
   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
   --enable-maintainer-mode enable make rules and dependencies not useful
                           (and sometimes confusing) to the casual 
   --disable-dependency-tracking Speeds up one-time builds
   --enable-dependency-tracking  Do not reject slow dependency extractors
                           build shared libraries [default=yes]
                           build static libraries [default=yes]
                           optimize for fast installation [default=yes]
   --disable-libtool-lock  avoid locking (might break parallel builds)
   --disable-yp            disable YP directory support

Optional Packages:
   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
   --with-pic              try to use only PIC/non-PIC objects 
                           include additional configurations [automatic]
   --with-xslt-config=PATH use xslt-config in PATH to find libxslt
   --with-ogg=PREFIX       Prefix where libogg is installed (optional)
   --with-vorbis=PREFIX    Prefix where libvorbis is installed (optional)
   --with-curl=PFX         Prefix where libcurl is installed (optional)
                           Use curl-config to find libcurl

Some influential environment variables:
   CC          C compiler command
   CFLAGS      C compiler flags
   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
               nonstandard directory <lib dir>
   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
               headers in a nonstandard directory <include dir>
   CPP         C preprocessor
   CXX         C++ compiler command
   CXXFLAGS    C++ compiler flags
   CXXCPP      C++ preprocessor
   F77         Fortran 77 compiler command
   FFLAGS      Fortran 77 compiler flags
   XSLTCONFIG  XSLT configuration program
  OGG_PREFIX  path to ogg installation
               path to vorbis installation

Use these variables to override the choices made by `configure' or to 
it to find libraries and programs with nonstandard names/locations.

Report bugs to <>.

./configure --with-ogg=/usr/pkg --libexecdir=/usr/pkg/lib 

(or any permutation of the includedir that I've tried) gives:

checking for the pthreads library -lpthreads... no
checking whether pthreads work without any flags... no
checking whether pthreads work with -Kthread... no
checking whether pthreads work with -kthread... no
checking for the pthreads library -llthread... no
checking whether pthreads work with -pthread... no
checking whether pthreads work with -pthreads... no
checking whether pthreads work with -mthreads... no
checking for the pthreads library -lpthread... no
checking whether pthreads work with --thread-safe... no
checking whether pthreads work with -mt... no
configure: error: POSIX threads missing

pthread.h is in Qube:{%/}:locate pthread.h

config.log shows:

It was created by Icecast configure 2.0.2, which was
generated by GNU Autoconf 2.57.  Invocation command line was

   $ ./configure --with-ogg=/usr/pkg --libexecdir=/usr/pkg/lib 

## --------- ##
## Platform. ##
## --------- ##

hostname = Qube
uname -m = cobalt
uname -r = 1.6.1
uname -s = NetBSD
uname -v = NetBSD 1.6.1 (QUBE2LCDATALKNSCSI) #0: Fri Jan 16 21:04:13 
UTC 2004     root@dhcppc4:/usr/src/sys/arch/cobalt/com$

/usr/bin/uname -p = mipsel
/bin/uname -X     = unknown

/bin/arch              = unknown
/usr/bin/arch -k       = unknown
/usr/convex/getsysinfo = unknown
hostinfo               = unknown
/bin/machine           = unknown
/usr/bin/oslevel       = unknown
/bin/universe          = unknown

PATH: /sbin
PATH: /usr/sbin
PATH: /bin
PATH: /usr/bin
PATH: /usr/pkg/sbin
PATH: /usr/pkg/bin
PATH: /usr/X11R6/bin
PATH: /usr/local/sbin
PATH: /usr/local/bin
configure:20673: test -s conftest
configure:20676: $? = 0
configure:20678: result: ok
configure:20748: checking for struct ovectl_ratemanage_arg
configure:20777: gcc -c -g -O2 -I/usr/pkg/include -I/usr/local/include  
conftest.c >&5
configure:20780: $? = 0
configure:20783: test -s conftest.o
configure:20786: $? = 0
configure:20797: result: yes
configure:20987: checking for the pthreads library -lpthreads
configure:21026: gcc -o conftest -g -O2    conftest.c -lpthreads  >&5
configure:21049: pthread.h: No such file or directory
configure:21029: $? = 1
configure: failed program was:
| #line 21007 "configure"
| /* confdefs.h.  */

  For the life of me I seem to force it to find pthread.h.  I can force 
it to find the ogg libraries just fine..... I should just have to feed 
it the parent directory path.

What am I missing?  It's got to be easy.

Sorry to those on the list who are thinking, "Oh Deity, he's messing 
around with the system again... :)



WARNING! Acme constructs each Klein Bottle from genuine Baryonic 
matter. Do
not allow your Acme Klein Bottle to come in contact with antimatter or
unpredictable results may occur. Acme cannot guarantee the 
dimensionality of
the result.  <>  (not an affiliate, just