Subject: autoconf fight
To: None <port-cobalt@netbsd.org>
From: Brian <bmcewen@comcast.net>
List: port-cobalt
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.

Configuration:
   -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 
packages
   -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 
\`..']

_ACEOF

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

By default, \`make install' will install all the files in
\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can 
specify
an installation prefix other than \`$ac_default_prefix' using 
\`--prefix',
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 
[PREFIX/share]
   --sysconfdir=DIR       read-only single-machine data [PREFIX/etc]
   --sharedstatedir=DIR   modifiable architecture-independent data 
[PREFIX/com]
   --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]
_ACEOF

   cat <<\_ACEOF
  cat <<\_ACEOF

Program names:
   --program-prefix=PREFIX            prepend PREFIX to installed 
program names
   --program-suffix=SUFFIX            append SUFFIX to installed program 
names
   --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 
[BUILD]
_ACEOF
fi

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

Optional Features:
   --disable-FEATURE       do not include FEATURE (same as 
--enable-FEATURE=no)
   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
   --enable-maintainer-mode enable make rules and dependencies not useful
                           (and sometimes confusing) to the casual 
installer
   --disable-dependency-tracking Speeds up one-time builds
   --enable-dependency-tracking  Do not reject slow dependency extractors
   --enable-shared[=PKGS]
                           build shared libraries [default=yes]
   --enable-static[=PKGS]
                           build static libraries [default=yes]
   --enable-fast-install[=PKGS]
                           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 
[default=use
                           both]
   --with-tags[=TAGS]
                           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)
   --with-curl-config=curl-config
                           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
   VORBIS_PREFIX
               path to vorbis installation

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

Report bugs to <icecast@xiph.org>.
_ACEOF
fi
====================================================



but
./configure --with-ogg=/usr/pkg --libexecdir=/usr/pkg/lib 
--includedir=/usr/pkg/include

(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
/usr/pkg/include/mysql/my_no_pthread.h
/usr/pkg/include/mysql/my_pthread.h
/usr/pkg/include/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 
--includedir=/usr/pkg/include

## --------- ##
## 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.  */
|
[.....]
============================



It's going to fail later anyway as I've not enabled some kernel options 
:) , but 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.....

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

Thanks,

Brian
--
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.  <http://www.kleinbottle.com>  (not an affiliate, just 
aficionado)