I was very frustrated today with autotools when building OpenAL on OpenSolaris 2008.05. I finally decide to gave up and use cmake build system instead, which works very well. I think there is a reason why so many projects(good ones like KDE4, WireShark) are starting to adapt cmake, and maybe jxta-c should do that too.
So allow me dump the problems here, and hopefully some experts will shed lights for me. Note that I do try with other projects using autotools, for example, jxta-c is working OK, but not for OpenAL. Let's see what is going on:
/tmp/openal-trunk/OpenAL-Sample$ ./autogen.sh
Can't exec "aclocal": No such file or directory at /usr/bin/autoreconf line 182.
Use of uninitialized value in pattern match (m//) at /usr/bin/autoreconf line 182.
Can't exec "automake": No such file or directory at /usr/bin/autoreconf line 183.
Use of uninitialized value in pattern match (m//) at /usr/bin/autoreconf line 183.
Can't exec "automake": No such file or directory at /usr/bin/autoreconf line 240.
Use of uninitialized value in pattern match (m//) at /usr/bin/autoreconf line 240.
Can't exec "aclocal": No such file or directory at /usr/share/autoconf/Autom4te/FileUtils.pm line 290.
autoreconf: failed to run aclocal: No such file or directory
OK, I think OpenSolaris should have a default symbolic link for aclocal and autoconf. Moved on.
/tmp/openal-trunk/OpenAL-Sample$ ACLOCAL=/usr/bin/aclocal-1.10 AUTOMAKE=/usr/bin/automake-1.10 ./autogen.sh
/usr/share/aclocal/gimpprint.m4:8: warning: underquoted definition of AM_PATH_GIMPPRINT
/usr/share/aclocal/gimpprint.m4:8: run info '(automake)Extending aclocal'
/usr/share/aclocal/gimpprint.m4:8: or see http://sources.redhat.com/automake/automake.html#Extending-aclocal
configure.ac:8: warning: The macro `AC_FOREACH' is obsolete.
configure.ac:8: You should run autoupdate.
autoconf/general.m4:198: AC_FOREACH is expanded from...
aclocal.m4:7044: _AM_SET_OPTIONS is expanded from...
aclocal.m4:6847: AM_INIT_AUTOMAKE is expanded from...
configure.ac:8: the top level
configure.ac:78: warning: The macro `AC_HELP_STRING' is obsolete.
configure.ac:78: You should run autoupdate.
autoconf/general.m4:209: AC_HELP_STRING is expanded from...
autoconf/general.m4:1373: AC_ARG_ENABLE is expanded from...
aclocal.m4:1943: AC_ENABLE_SHARED is expanded from...
aclocal.m4:231: AC_LIBTOOL_SETUP is expanded from...
aclocal.m4:86: _AC_PROG_LIBTOOL is expanded from...
aclocal.m4:66: AC_PROG_LIBTOOL is expanded from...
configure.ac:78: the top level
aclocal.m4:1982: AC_ENABLE_STATIC is expanded from...
aclocal.m4:2021: AC_ENABLE_FAST_INSTALL is expanded from...
autoconf/general.m4:1391: AC_ARG_WITH is expanded from...
aclocal.m4:2218: AC_PROG_LD is expanded from...
configure.ac:78: warning: The macro `AC_TRY_LINK' is obsolete.
configure.ac:78: You should run autoupdate.
autoconf/general.m4:2415: AC_TRY_LINK is expanded from...
../../lib/m4sugar/m4sh.m4:523: AS_IF is expanded from...
autoconf/general.m4:1905: AC_CACHE_VAL is expanded from...
autoconf/general.m4:1918: AC_CACHE_CHECK is expanded from...
aclocal.m4:619: _LT_AC_LOCK is expanded from...
aclocal.m4:1105: AC_LIBTOOL_SYS_HARD_LINK_LOCKS is expanded from...
aclocal.m4:2730: _LT_AC_LANG_C_CONFIG is expanded from...
aclocal.m4:2661: AC_LIBTOOL_LANG_C_CONFIG is expanded from...
aclocal.m4:1897: _LT_AC_TAGCONFIG is expanded from...
configure.ac:78: warning: back quotes and double quotes must not be escaped in: $as_me:$LINENO: error: tag name \"$tagname\" already exists
configure.ac:78: warning: back quotes and double quotes must not be escaped in: $as_me: error: tag name \"$tagname\" already exists
configure.ac:78: warning: The macro `AC_LANG_SAVE' is obsolete.
configure.ac:78: You should run autoupdate.
autoconf/lang.m4:170: AC_LANG_SAVE is expanded from...
aclocal.m4:4051: _LT_AC_LANG_GCJ_CONFIG is expanded from...
aclocal.m4:4003: AC_LIBTOOL_LANG_GCJ_CONFIG is expanded from...
configure.ac:78: warning: The macro `AC_LANG_RESTORE' is obsolete.
configure.ac:78: You should run autoupdate.
autoconf/lang.m4:176: AC_LANG_RESTORE is expanded from...
aclocal.m4:4095: _LT_AC_LANG_RC_CONFIG is expanded from...
aclocal.m4:4059: AC_LIBTOOL_LANG_RC_CONFIG is expanded from...
configure.ac:119: warning: The macro `AC_LANG_SAVE' is obsolete.
configure.ac:119: You should run autoupdate.
admin/autotools/m4/acx_pthread.m4:246: ACX_PTHREAD is expanded from...
configure.ac:119: the top level
configure.ac:119: warning: The macro `AC_LANG_C' is obsolete.
configure.ac:119: You should run autoupdate.
autoconf/c.m4:73: AC_LANG_C is expanded from...
configure.ac:119: warning: The macro `AC_TRY_LINK' is obsolete.
configure.ac:119: You should run autoupdate.
configure.ac:119: warning: The macro `AC_LANG_RESTORE' is obsolete.
configure.ac:119: You should run autoupdate.
Putting files in AC_CONFIG_AUX_DIR, `admin/autotools'.
/usr/share/aclocal/gimpprint.m4:8: warning: underquoted definition of AM_PATH_GIMPPRINT
/usr/share/aclocal/gimpprint.m4:8: run info '(automake)Extending aclocal'
/usr/share/aclocal/gimpprint.m4:8: or see http://sources.redhat.com/automake/automake.html#Extending-aclocal
configure.ac:8: warning: The macro `AC_FOREACH' is obsolete.
configure.ac:8: You should run autoupdate.
autoconf/general.m4:198: AC_FOREACH is expanded from...
aclocal.m4:7044: _AM_SET_OPTIONS is expanded from...
aclocal.m4:6847: AM_INIT_AUTOMAKE is expanded from...
configure.ac:8: the top level
configure.ac:78: warning: The macro `AC_HELP_STRING' is obsolete.
configure.ac:78: You should run autoupdate.
autoconf/general.m4:209: AC_HELP_STRING is expanded from...
autoconf/general.m4:1373: AC_ARG_ENABLE is expanded from...
aclocal.m4:1943: AC_ENABLE_SHARED is expanded from...
aclocal.m4:231: AC_LIBTOOL_SETUP is expanded from...
aclocal.m4:86: _AC_PROG_LIBTOOL is expanded from...
aclocal.m4:66: AC_PROG_LIBTOOL is expanded from...
configure.ac:78: the top level
aclocal.m4:1982: AC_ENABLE_STATIC is expanded from...
aclocal.m4:2021: AC_ENABLE_FAST_INSTALL is expanded from...
autoconf/general.m4:1391: AC_ARG_WITH is expanded from...
aclocal.m4:2218: AC_PROG_LD is expanded from...
configure.ac:78: warning: The macro `AC_TRY_LINK' is obsolete.
configure.ac:78: You should run autoupdate.
autoconf/general.m4:2415: AC_TRY_LINK is expanded from...
../../lib/m4sugar/m4sh.m4:523: AS_IF is expanded from...
autoconf/general.m4:1905: AC_CACHE_VAL is expanded from...
autoconf/general.m4:1918: AC_CACHE_CHECK is expanded from...
aclocal.m4:619: _LT_AC_LOCK is expanded from...
aclocal.m4:1105: AC_LIBTOOL_SYS_HARD_LINK_LOCKS is expanded from...
aclocal.m4:2730: _LT_AC_LANG_C_CONFIG is expanded from...
aclocal.m4:2661: AC_LIBTOOL_LANG_C_CONFIG is expanded from...
aclocal.m4:1897: _LT_AC_TAGCONFIG is expanded from...
configure.ac:78: warning: back quotes and double quotes must not be escaped in: $as_me:$LINENO: error: tag name \"$tagname\" already exists
configure.ac:78: warning: back quotes and double quotes must not be escaped in: $as_me: error: tag name \"$tagname\" already exists
configure.ac:78: warning: The macro `AC_LANG_SAVE' is obsolete.
configure.ac:78: You should run autoupdate.
autoconf/lang.m4:170: AC_LANG_SAVE is expanded from...
aclocal.m4:4051: _LT_AC_LANG_GCJ_CONFIG is expanded from...
aclocal.m4:4003: AC_LIBTOOL_LANG_GCJ_CONFIG is expanded from...
configure.ac:78: warning: The macro `AC_LANG_RESTORE' is obsolete.
configure.ac:78: You should run autoupdate.
autoconf/lang.m4:176: AC_LANG_RESTORE is expanded from...
aclocal.m4:4095: _LT_AC_LANG_RC_CONFIG is expanded from...
aclocal.m4:4059: AC_LIBTOOL_LANG_RC_CONFIG is expanded from...
configure.ac:119: warning: The macro `AC_LANG_SAVE' is obsolete.
configure.ac:119: You should run autoupdate.
admin/autotools/m4/acx_pthread.m4:246: ACX_PTHREAD is expanded from...
configure.ac:119: the top level
configure.ac:119: warning: The macro `AC_LANG_C' is obsolete.
configure.ac:119: You should run autoupdate.
autoconf/c.m4:73: AC_LANG_C is expanded from...
configure.ac:119: warning: The macro `AC_TRY_LINK' is obsolete.
configure.ac:119: You should run autoupdate.
configure.ac:119: warning: The macro `AC_LANG_RESTORE' is obsolete.
configure.ac:119: You should run autoupdate.
configure.ac:8: installing `admin/autotools/missing'
configure.ac:8: installing `admin/autotools/install-sh'
src/Makefile.am: installing `admin/autotools/depcomp'
Makefile.am: installing `./INSTALL'
OK, bunch of warnings. That's the craziness of autotools, but most of time they seems to be harmless for obsolete macros.
/tmp/openal-trunk/OpenAL-Sample$ ./configure
checking build system type... i386-pc-solaris2.11
checking host system type... i386-pc-solaris2.11
checking target system type... i386-pc-solaris2.11
checking for a BSD-compatible install... /usr/bin/ginstall -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/gnu/bin/mkdir -p
checking for gawk... no
checking for mawk... no
checking for nawk... nawk
checking whether make sets $(MAKE)... yes
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... unsupported
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking for an ANSI C-conforming const... yes
checking whether the C compiler supports __attribute__... yes
checking for a sed that does not truncate output... /usr/bin/sed
checking for grep that handles long lines and -e... /usr/gnu/bin/grep
checking for egrep... /usr/gnu/bin/grep -E
checking for ld used by gcc... /usr/ccs/bin/ld
checking if the linker (/usr/ccs/bin/ld) is GNU ld... no
checking for /usr/ccs/bin/ld option to reload object files... -r
checking for BSD-compatible nm... /usr/gnu/bin/nm -B
checking whether ln -s works... yes
checking how to recognise dependent libraries... pass_all
checking how to run the C preprocessor... gcc -E -traditional-cpp
checking for ANSI C header files... no
checking for sys/types.h... no
checking for sys/stat.h... no
checking for stdlib.h... no
checking for string.h... no
checking for memory.h... no
checking for strings.h... no
checking for inttypes.h... no
checking for stdint.h... no
checking for unistd.h... no
checking dlfcn.h usability... no
checking dlfcn.h presence... no
checking for dlfcn.h... no
Whoa, look at that, it failed for the most standard header files. I would never imagine this to happen. Something is seriously screwed up.
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... gcc3
checking how to run the C++ preprocessor... g++ -E
checking for g77... g77
checking whether we are using the GNU Fortran 77 compiler... yes
checking whether g77 accepts -g... yes
checking the maximum length of command line arguments... 262144
checking command to parse /usr/gnu/bin/nm -B output from gcc object... ok
checking for objdir... .libs
checking for ar... ar
checking for ranlib... ranlib
checking for strip... strip
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC
checking if gcc PIC flag -fPIC works... yes
checking if gcc static flag -static works... no
checking if gcc supports -c -o file.o... yes
checking whether the gcc linker (/usr/ccs/bin/ld) supports shared libraries... yes
checking whether -lc should be explicitly linked in... yes
checking dynamic linker characteristics... solaris2.11 ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
configure: creating libtool
appending configuration tag "CXX" to libtool
checking for ld used by g++... /usr/ccs/bin/ld
checking if the linker (/usr/ccs/bin/ld) is GNU ld... no
checking whether the g++ linker (/usr/ccs/bin/ld) supports shared libraries... yes
checking for g++ option to produce PIC... -fPIC
checking if g++ PIC flag -fPIC works... yes
checking if g++ static flag -static works... no
checking if g++ supports -c -o file.o... yes
checking whether the g++ linker (/usr/ccs/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... solaris2.11 ld.so
checking how to hardcode library paths into programs... immediate
appending configuration tag "F77" to libtool
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking for g77 option to produce PIC... -fPIC
checking if g77 PIC flag -fPIC works... yes
checking if g77 static flag -static works... no
checking if g77 supports -c -o file.o... yes
checking whether the g77 linker (/usr/ccs/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... solaris2.11 ld.so
checking how to hardcode library paths into programs... immediate
checking whether we are using the GNU C++ compiler... (cached) yes
checking whether g++ accepts -g... (cached) yes
checking dependency style of g++... (cached) gcc3
checking for pkg-config... pkg-config
checking stropts.h usability... no
checking stropts.h presence... no
checking for stropts.h... no
checking sys/ioctl.h usability... no
checking sys/ioctl.h presence... yes
configure: WARNING: sys/ioctl.h: present but cannot be compiled
configure: WARNING: sys/ioctl.h: check for missing prerequisite headers?
configure: WARNING: sys/ioctl.h: see the Autoconf documentation
configure: WARNING: sys/ioctl.h: section "Present But Cannot Be Compiled"
configure: WARNING: sys/ioctl.h: proceeding with the preprocessor's result
configure: WARNING: sys/ioctl.h: in the future, the compiler will take precedence
configure: WARNING: ## --------------------------------------------------- ##
configure: WARNING: ## Report this to openal-devel-AT-opensource.creative-DOT-com ##
configure: WARNING: ## --------------------------------------------------- ##
checking for sys/ioctl.h... yes
checking sys/time.h usability... no
checking sys/time.h presence... no
checking for sys/time.h... no
checking time.h usability... no
checking time.h presence... no
checking for time.h... no
checking windows.h usability... no
checking windows.h presence... no
checking for windows.h... no
checking for nanosleep... no
checking for usleep... no
checking for Sleep... no
checking for snprintf... no
checking for _snprintf... no
checking for cos in -lm... yes
checking whether pthreads work with -pthreads... no
checking for the pthreads library -lpthread... no
checking whether pthreads work with -mt... no
checking whether pthreads work with -pthread... no
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
checking for pthread-config... no
checking for windows.h... (cached) no
checking sys/select.h usability... no
checking sys/select.h presence... no
checking for sys/select.h... no
checking sys/socket.h usability... no
checking sys/socket.h presence... no
checking for sys/socket.h... no
checking types of arguments for select... int,int *,struct timeval *
checking for __int8... no
checking whether gcc accepts -finline-functions... yes
checking whether gcc accepts -ffast-math... yes
checking whether gcc accepts -fomit-frame-pointer... yes
checking whether byte ordering is bigendian... yes
Big Endian? Come on, this is a x86 laptop.
checking for dlfcn.h... (cached) no
configure: WARNING: Dynamic loading of libraries is not available.
checking whether gcc accepts -mmmx... yes
checking whether gcc accepts -mmmx -msse -msse2... yes
checking for yasm... no
checking for nasm... /usr/local/bin/nasm
checking whether gcc accepts -fvisibility=hidden... no
checking for ALSA compiler flags... unknown
checking for alsa/asoundlib.h... no
checking for ALSA backend support... none
checking for sys/soundcard.h... no
checking for OSS backend support... none
checking for native Darwin backend support... none
checking for esd-config... esd-config
checking for ESD compiler flags... none
checking for esd.h... no
checking for ESD backend support... none
checking for dmedia/audio.h... no
checking for native IRIX backend support... none
checking for null backend support... static
checking for sdl-config... sdl-config
checking for SDL compiler flags... -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT
checking for SDL.h... no
checking for SDL backend support... none
checking for sys/audioio.h... no
checking for native Solaris backend support... none
checking for WAVE backend support... static
checking for windows.h... (cached) no
checking for native Windows backend support... none
checking for Vorbis compiler flags...
checking for vorbis/vorbisfile.h... no
checking for AL_EXT_vorbis supprt support... none
checking for smpeg-config... no
checking for SMPEG compiler flags... unknown
checking for smpeg.h... no
checking for AL_EXT_mp3 extension support... none
checking for void *... no
checking size of void *... 0
configure: creating ./config.status
config.status: creating Makefile
config.status: creating admin/Makefile
config.status: creating admin/pkgconfig/Makefile
config.status: creating admin/pkgconfig/openal-config
config.status: creating admin/pkgconfig/openal.pc
config.status: creating admin/RPM/openal.spec
config.status: creating common/Makefile
config.status: creating common/include/Makefile
config.status: creating include/Makefile
config.status: creating src/Makefile
config.status: creating src/arch/Makefile
config.status: creating src/arch/i386/Makefile
config.status: creating config.h
config.status: executing depfiles commands
config.status: executing default commands
Gees, the compiler environment is so screwed up that most test actually fails, and I cannot even tell whose fault it is. :-(