I've been trying to compile the latest version of ClanLib with MinGW, I was able to get autogen.sh to work by adding a line to configure.ac

Code:
dnl -----------------------------------------------------
dnl Check commandline parameters to the configure script:
dnl -----------------------------------------------------

AC_CHECK_HEADER(libgen.h)
AC_CHECK_HEADER(sys/types.h)
AC_CHECK_HEADER(fstab.h, AC_DEFINE([HAVE_FSTAB_H]))

m4_pattern_allow([AC_MSG_CHECKING]) <--this is the line I added, this spot seamed to be the most appropriate
AC_MSG_CHECKING([for extern *__progname])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[extern const char *__progname;]])],[AC_MSG_RESULT(yes);AC_DEFINE(EXTERN___PROGNAME)],[AC_MSG_RESULT(no)])

dnl Check for GNU extensions
AC_CHECK_FUNCS(wcscasecmp)


dnl -----------------------------------------------------
When I run ./configure --enable-static --disable-shared [I don't like working with dll's, they add extra files to my projects], it went through and everytime it stopped with an error I would try to fix it and go at it again, was working pretty well, in order to get it to detect the dinput8 lib, I copied all the libs from the DirectX SDK to the lib folder in my MinGW lib folder, I also copied all the includes to the include folder, when I tried again, it still spit an error so I tried copying all the libs from the x86 lib folder directly into the MinGW lib folder instead of just having the x86 and x64 folders in the lib folder. That seamed to fix the problem with detecting dinput8, but now its complaining that it can't find the directsound libs.

heres the output when I run the script [BTW, I'm using MSYS bash to do this, I run Windows XP sp3]

Code:
C:\ClanLib>bash ./configure --enable-static --disable-shared
checking build system type... i686-pc-mingw32
checking host system type... i686-pc-mingw32
checking target system type... i686-pc-mingw32
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for g++... g++
checking whether the C++ compiler works... yes
checking for C++ compiler default output file name... a.exe
checking for suffix of executables... .exe
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking for style of include used by make... GNU
checking dependency style of g++... gcc3
checking for gcc... gcc
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking dependency style of gcc... gcc3
checking whether gcc and cc understand -c and -o together... yes
checking how to run the C preprocessor... gcc -E
checking how to print strings... printf
checking for a sed that does not truncate output... /usr/bin/sed
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for fgrep... /usr/bin/grep -F
checking for ld used by gcc... c:/mingw/mingw32/bin/ld.exe
checking if the linker (c:/mingw/mingw32/bin/ld.exe) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /mingw/bin/nm
checking the name lister (/mingw/bin/nm) interface... BSD nm
checking whether ln -s works... no, using cp -p
checking the maximum length of command line arguments... 8192
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking how to convert i686-pc-mingw32 file names to i686-pc-mingw32 format...
func_convert_file_msys_to_w32
checking how to convert i686-pc-mingw32 file names to toolchain format... func_c
onvert_file_msys_to_w32
checking for c:/mingw/mingw32/bin/ld.exe option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... file_magic ^x86 archive import|
^x86 DLL
checking for dlltool... dlltool
checking how to associate runtime and link libraries... func_cygming_dll_for_imp
lib
checking for ar... ar
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /mingw/bin/nm output from gcc object... ok
checking for sysroot... no
checking for mt... no
checking if : is a manifest tool... no
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... no
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -DDLL_EXPORT -DPIC
checking if gcc PIC flag -DDLL_EXPORT -DPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (c:/mingw/mingw32/bin/ld.exe) supports shared li
braries... yes
checking dynamic linker characteristics... Win32 ld.exe
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... no
checking whether to build static libraries... yes
checking how to run the C++ preprocessor... g++ -E
checking for ld used by g++... c:/mingw/mingw32/bin/ld.exe
checking if the linker (c:/mingw/mingw32/bin/ld.exe) is GNU ld... yes
checking whether the g++ linker (c:/mingw/mingw32/bin/ld.exe) supports shared li
braries... yes
checking for g++ option to produce PIC... -DDLL_EXPORT -DPIC
checking if g++ PIC flag -DDLL_EXPORT -DPIC works... yes
checking if g++ static flag -static works... yes
checking if g++ supports -c -o file.o... yes
checking if g++ supports -c -o file.o... (cached) yes
checking whether the g++ linker (c:/mingw/mingw32/bin/ld.exe) supports shared li
braries... yes
checking dynamic linker characteristics... Win32 ld.exe
checking how to hardcode library paths into programs... immediate
checking for ANSI C header files... (cached) yes
checking for stdbool.h that conforms to C99... yes
checking for _Bool... no
checking whether gcc needs -traditional... no
checking for pkg-config... no
checking for unistd.h... (cached) yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking sys/kd.h usability... no
checking sys/kd.h presence... no
checking for sys/kd.h... no
checking sys/vt.h usability... no
checking sys/vt.h presence... no
checking for sys/vt.h... no
checking sys/sysctl.h usability... no
checking sys/sysctl.h presence... no
checking for sys/sysctl.h... no
checking libgen.h usability... yes
checking libgen.h presence... yes
checking for libgen.h... yes
checking for sys/types.h... (cached) yes
checking fstab.h usability... no
checking fstab.h presence... no
checking for fstab.h... no
checking for extern *__progname... yes
checking for wcscasecmp... no
checking for SSE2 support... enabled
checking for main in -lz... yes

Checking for ClanLib Modules to build...
========================================
checking whether we should try to build API documentation... auto
checking whether we should try to build clanDisplay... auto
checking whether we should try to build clanGL... auto
checking whether we should try to build clanGL1... auto
checking whether we should try to build clanSound... auto
checking whether we should try to build clanDatabase... auto
checking whether we should try to build clanSqlite... auto
checking whether we should try to build clanRegExp... auto
checking whether we should try to build clanNetwork... auto
checking whether we should try to build clanGUI... auto
checking whether we should try to build clanCSSLayout... auto
checking whether we should try to build clanSWRender... auto
checking whether we should try to build clanMikMod... auto
checking whether we should try to build clanVorbis... auto

Checking for clanDisplay stuff
==============================
checking for png... yes
checking for jpeg... yes
checking for ttf... yes
checking linux/joystick.h usability... no
checking linux/joystick.h presence... no
checking for linux/joystick.h... no
checking linux/input.h usability... no
checking linux/input.h presence... no
checking for linux/input.h... no
checking for gdi32... yes
checking for dinput8... yes
Checking for clanGL stuff
==============================
checking for opengl32... yes

Checking for clanGL1 stuff
==============================
checking for opengl32... yes

Checking for clanSWRender stuff
==============================

Checking for clanCSSLayout stuff
==============================
Checking for clanGUI stuff
==============================

Checking for clanSound stuff
============================
checking for dsound... no
configure: WARNING:  *** Cannot find directsound libs. Disabling clanSound
./configure: line 18060: syntax error near unexpected token `clanVorbis,'
./configure: line 18060: `      PKG_CHECK_MODULES(clanVorbis, vorbis >= 1.0,,AC_
MSG_CHECKING([for libvorbis directly])'

C:\ClanLib>
anyone got any ideas?