gnash-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnash-commit] gnash Makefile.am NEWS README configure.ac doc/...


From: Rob Savoye
Subject: [Gnash-commit] gnash Makefile.am NEWS README configure.ac doc/...
Date: Sun, 21 Jan 2007 22:41:03 +0000

CVSROOT:        /sources/gnash
Module name:    gnash
Changes by:     Rob Savoye <rsavoye>    07/01/21 22:41:03

Modified files:
        .              : Makefile.am NEWS README configure.ac 
        doc/C          : sources.xml 
        gui            : Makefile.am 
        libamf         : Makefile.am 
        plugin/klash   : Makefile.am 
        utilities      : Makefile.am 
        macros         : curl.m4 glib.m4 gtk2.m4 incllist libXML.m4 
                         libslist ming.m4 pthreads.m4 sdl.m4 

Log message:
                A pile of cross configuration patches for ARM-linux and OLPC.
        
                * Makefile.am: Organize the output of dumpconfig somewhat. Make
                some lines optional based on the configuration to save space.
                * NEWS: Add that cross compiling is now supported.
                * README: Mention trying cvs Head befor bug reporting.
                * configure.ac: Check for the build and host systems. We don't
                have to hack cross_compile. it works correctly now. Use
                $host_alias instead $target_alias for the directory search
                paths. Look for PNG, OLPC needs it. Define a restricted path for
                cross configuring and export it for the other m4 scripts.
                * doc/C/sources.xml: Clarify cross configuring based on current
                technique.
                * gui/Makefile.am: PTHREAD_LIBS must be after BOOST_LIBS.
                * libamf/Makefile.am: Remove unused libraries from LDFLAGS.
                * macros/curl.m4: Only look for curl-config in the pathlist
                variable.
                * macros/glib.m4: Look for glibconfig.h in the right place.
                * macros/gtk2.m4: Add -lgobject and -lgmodule for cross
                compiling.
                * macros/incllist, libslist: Look in $host_alias, not
                $target_alias.
                * macros/libXML.m4: Only look for xml2-config in the pathlist
                variable.
                * macros/ming.m4: Only look for ming-config in the pathlist
                variable.
                * macros/pthreads.m4: Use correct comment syntax. Also look for
                pthread.h and libpthread so we cross configure correctly.
                * macros/sdl.m4: Only look for sdl-config in the pathlist
                variable.
                * plugin/klash/Makefile.am: Don't build klash here anymore.
                * utilities/Makefile.am: Link in XML2 libs.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/Makefile.am?cvsroot=gnash&r1=1.58&r2=1.59
http://cvs.savannah.gnu.org/viewcvs/gnash/NEWS?cvsroot=gnash&r1=1.2&r2=1.3
http://cvs.savannah.gnu.org/viewcvs/gnash/README?cvsroot=gnash&r1=1.23&r2=1.24
http://cvs.savannah.gnu.org/viewcvs/gnash/configure.ac?cvsroot=gnash&r1=1.235&r2=1.236
http://cvs.savannah.gnu.org/viewcvs/gnash/doc/C/sources.xml?cvsroot=gnash&r1=1.25&r2=1.26
http://cvs.savannah.gnu.org/viewcvs/gnash/gui/Makefile.am?cvsroot=gnash&r1=1.57&r2=1.58
http://cvs.savannah.gnu.org/viewcvs/gnash/libamf/Makefile.am?cvsroot=gnash&r1=1.19&r2=1.20
http://cvs.savannah.gnu.org/viewcvs/gnash/plugin/klash/Makefile.am?cvsroot=gnash&r1=1.22&r2=1.23
http://cvs.savannah.gnu.org/viewcvs/gnash/utilities/Makefile.am?cvsroot=gnash&r1=1.45&r2=1.46
http://cvs.savannah.gnu.org/viewcvs/gnash/macros/curl.m4?cvsroot=gnash&r1=1.12&r2=1.13
http://cvs.savannah.gnu.org/viewcvs/gnash/macros/glib.m4?cvsroot=gnash&r1=1.24&r2=1.25
http://cvs.savannah.gnu.org/viewcvs/gnash/macros/gtk2.m4?cvsroot=gnash&r1=1.38&r2=1.39
http://cvs.savannah.gnu.org/viewcvs/gnash/macros/incllist?cvsroot=gnash&r1=1.1&r2=1.2
http://cvs.savannah.gnu.org/viewcvs/gnash/macros/libXML.m4?cvsroot=gnash&r1=1.27&r2=1.28
http://cvs.savannah.gnu.org/viewcvs/gnash/macros/libslist?cvsroot=gnash&r1=1.1&r2=1.2
http://cvs.savannah.gnu.org/viewcvs/gnash/macros/ming.m4?cvsroot=gnash&r1=1.11&r2=1.12
http://cvs.savannah.gnu.org/viewcvs/gnash/macros/pthreads.m4?cvsroot=gnash&r1=1.21&r2=1.22
http://cvs.savannah.gnu.org/viewcvs/gnash/macros/sdl.m4?cvsroot=gnash&r1=1.37&r2=1.38

Patches:
Index: Makefile.am
===================================================================
RCS file: /sources/gnash/gnash/Makefile.am,v
retrieving revision 1.58
retrieving revision 1.59
diff -u -b -r1.58 -r1.59
--- Makefile.am 16 Jan 2007 14:02:45 -0000      1.58
+++ Makefile.am 21 Jan 2007 22:41:02 -0000      1.59
@@ -15,7 +15,7 @@
 # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 # 
 
-# $Id: Makefile.am,v 1.58 2007/01/16 14:02:45 bjacques Exp $
+# $Id: Makefile.am,v 1.59 2007/01/21 22:41:02 rsavoye Exp $
 
 ## Process this file with automake to produce Makefile.in
 AUTOMAKE_OPTIONS = 1.6.0
@@ -134,73 +134,99 @@
 endif
 
 dumpconfig:
+       @echo ""
+       @echo "Building in directories: $(SUBDIRS)"
+       @echo "Some directories may be excluded from the build"
        @uname -a
        $(CXX) -v
+       @echo ""
+       @echo "Image decoding support..."
+       @echo " JPEG_CFLAGS is $(JPEG_CFLAGS)"
+       @echo " JPEG_LIBS is $(JPEG_LIBS)"
+       @echo " PNG_CFLAGS is $(PNG_CFLAGS)"
+       @echo " PNG_LIBS is $(PNG_LIBS)"
+       @echo "Audio decoding support..."
+if USE_SOUND_GST
+       @echo " GSTREAMER_CFLAGS is $(GSTREAMER_CFLAGS)"
+       @echo " GSTREAMER_LIBS is $(GSTREAMER_LIBS)"
+endif
+if USE_FFMPEG_ENGINE
+       @echo " FFMPEG_CFLAGS is $(FFMPEG_CFLAGS)"
+       @echo " FFMPEG_LIBS is $(FFMPEG_LIBS)"
+       @echo " OGG_CFLAGS is $(OGG_CFLAGS)"
+       @echo " OGG_LIBS is $(OGG_LIBS)"
+endif
+       @echo "GUI Toolkit decoding support..." 
+       @echo " SDL_CFLAGS is $(SDL_CFLAGS)"
+       @echo " SDL_LIBS is $(SDL_LIBS)"
+if USE_GUI_KDE
+       @echo " KDE_CFLAGS is $(KDE_CFLAGS)"
+       @echo " KDE_LIBS is $(KDE_LIBS)"
+endif
+if USE_GUI_FLTK
+       @echo " FLTK2_CFLAGS is $(FLTK2_CFLAGS)"
+       @echo " FLTK2_LIBS is $(FLTK2_LIBS)"
+endif
+if USE_GUI_GTK
+       @echo " GTK2_CFLAGS is $(GTK2_CFLAGS)"
+       @echo " GTK2_LIBS is $(GTK2_LIBS)"
+       @echo " XFT_CFLAGS is $(XFT_CFLAGS)"
+       @echo " XFT_LIBS is $(XFT_LIBS)"
+       @echo " PANGO_CFLAGS is $(PANGO_CFLAGS)"
+       @echo " PANGO_LIBS is $(PANGO_LIBS)"
+       @echo " ATK_CFLAGS is $(ATK_CFLAGS)"
+       @echo " ATK_LIBS is $(ATK_LIBS)"
+endif
+       @echo " X11_CFLAGS is $(X11_CFLAGS)"
+       @echo " X11_LIBS is $(X11_LIBS)"
+       @echo "Support libraries..."
+       @echo " INCLTDL $(INCLTDL) "
+       @echo " LIBLTDL $(LIBLTDL) "
+       @echo " GLIB_CFLAGS is $(GLIB_CFLAGS)"
+       @echo " GLIB_LIBS is $(GLIB_LIBS)"
+       @echo " Z_CFLAGS is $(Z_CFLAGS)"
+       @echo " Z_LIBS is $(Z_LIBS)"
+       @echo " LIBXML_CFLAGS is $(LIBXML_CFLAGS)"
+       @echo " LIBXML_LIBS is $(LIBXML_LIBS)"
+if HAVE_DMALLOC
+       @echo " DMALLOC_CFLAGS is $(DMALLOC_CFLAGS)"
+       @echo " DMALLOC_LIBS is $(DMALLOC_LIBS)"
+endif
+if EXTENSIONS
        @echo "MYSQL_CFLAGS is $(MYSQL_CFLAGS)"
        @echo "MYSQL_LIBS is $(MYSQL_LIBS)"
-       @echo "JPEG_CFLAGS is $(JPEG_CFLAGS)"
-       @echo "JPEG_LIBS is $(JPEG_LIBS)"
-       @echo "PNG_CFLAGS is $(PNG_CFLAGS)"
-       @echo "PNG_LIBS is $(PNG_LIBS)"
-       @echo "OGG_CFLAGS is $(OGG_CFLAGS)"
-       @echo "OGG_LIBS is $(OGG_LIBS)"
-       @echo "Z_CFLAGS is $(Z_CFLAGS)"
-       @echo "Z_LIBS is $(Z_LIBS)"
-       @echo "LIBXML_CFLAGS is $(LIBXML_CFLAGS)"
-       @echo "LIBXML_LIBS is $(LIBXML_LIBS)"
-       @echo "SDL_CFLAGS is $(SDL_CFLAGS)"
-       @echo "SDL_LIBS is $(SDL_LIBS)"
-       @echo "OPENGL_CFLAGS is $(OPENGL_CFLAGS)"
-       @echo "OPENGL_LIBS is $(OPENGL_LIBS)"
-       @echo "GLEXT_CFLAGS is $(GLEXT_CFLAGS)"
-       @echo "GLEXT_LIBS is $(GLEXT_LIBS)"
-       @echo "GTK2_CFLAGS is $(GTK2_CFLAGS)"
-       @echo "GTK2_LIBS is $(GTK2_LIBS)"
-       @echo "FLTK2_CFLAGS is $(FLTK2_CFLAGS)"
-       @echo "FLTK2_LIBS is $(FLTK2_LIBS)"
-       @echo "XFT_CFLAGS is $(XFT_CFLAGS)"
-       @echo "XFT_LIBS is $(XFT_LIBS)"
-       @echo "PANGO_CFLAGS is $(PANGO_CFLAGS)"
-       @echo "PANGO_LIBS is $(PANGO_LIBS)"
-       @echo "ATK_CFLAGS is $(ATK_CFLAGS)"
-       @echo "ATK_LIBS is $(ATK_LIBS)"
-       @echo "GLIB_CFLAGS is $(GLIB_CFLAGS)"
-       @echo "GLIB_LIBS is $(GLIB_LIBS)"
-       @echo "X_CFLAGS is $(X_CFLAGS)"
-       @echo "X_LIBS is $(X_LIBS)"
-       @echo "DMALLOC_CFLAGS is $(DMALLOC_CFLAGS)"
-       @echo "DMALLOC_LIBS is $(DMALLOC_LIBS)"
-       @echo "MAD_CFLAGS is $(MAD_CFLAGS)"
-       @echo "MAD_LIBS is $(MAD_LIBS)"
-       @echo "PTHREAD_CFLAGS is $(PTHREAD_CFLAGS)"
-       @echo "PTHREAD_LIBS is $(PTHREAD_LIBS)"
-       @echo "CURL_CFLAGS is $(CURL_CFLAGS)"
-       @echo "CURL_LIBS is $(CURL_LIBS)"
-       @echo "GSTREAMER_CFLAGS is $(GSTREAMER_CFLAGS)"
-       @echo "GSTREAMER_LIBS is $(GSTREAMER_LIBS)"
-       @echo "FFMPEG_CFLAGS is $(FFMPEG_CFLAGS)"
-       @echo "FFMPEG_LIBS is $(FFMPEG_LIBS)"
-       @echo "KDE_CFLAGS is $(KDE_CFLAGS)"
-       @echo "KDE_LIBS is $(KDE_LIBS)"
-       @echo "CAIRO_CFLAGS is $(CAIRO_CFLAGS)"
-       @echo "CAIRO_LIBS is $(CAIRO_LIBS)"
-       @echo "BOOST_CFLAGS is $(BOOST_CFLAGS)"
-       @echo "BOOST_LIBS is $(BOOST_LIBS)"
-       @echo "AGG_CFLAGS is $(AGG_CFLAGS)"
-       @echo "AGG_LIBS is $(AGG_LIBS)"
-       @echo "INCLTDL $(INCLTDL) "
-       @echo "LIBLTDL $(LIBLTDL) "
-       @echo "MING_VERSION_CODE $(MING_VERSION_CODE) "
-       @echo "MING_LIBS $(MING_LIBS) "
-       @echo "MING_CFLAGS $(MING_CFLAGS) "
-       @echo "MAKESWF $(MAKESWF) "
+endif
+if USE_MAD_ENGINE
+       @echo " MAD_CFLAGS is $(MAD_CFLAGS)"
+       @echo " MAD_LIBS is $(MAD_LIBS)"
+endif
+       @echo " PTHREAD_CFLAGS is $(PTHREAD_CFLAGS)"
+       @echo " PTHREAD_LIBS is $(PTHREAD_LIBS)"
+       @echo " CURL_CFLAGS is $(CURL_CFLAGS)"
+       @echo " CURL_LIBS is $(CURL_LIBS)"
+       @echo " BOOST_CFLAGS is $(BOOST_CFLAGS)"
+       @echo " BOOST_LIBS is $(BOOST_LIBS)"
+       @echo " MING_VERSION_CODE $(MING_VERSION_CODE) "
+       @echo " MING_LIBS $(MING_LIBS) "
+       @echo " MING_CFLAGS $(MING_CFLAGS) "
+       @echo " MAKESWF $(MAKESWF) "
+       @echo "Graphics support..."     
+       @echo " CAIRO_CFLAGS is $(CAIRO_CFLAGS)"
+       @echo " CAIRO_LIBS is $(CAIRO_LIBS)"
+if USE_RENDERER_OPENGL
+       @echo " GLEXT_CFLAGS is $(GLEXT_CFLAGS)"
+       @echo " GLEXT_LIBS is $(GLEXT_LIBS)"
+       @echo " OPENGL_CFLAGS is $(OPENGL_CFLAGS)"
+       @echo " OPENGL_LIBS is $(OPENGL_LIBS)"
+endif
+if USE_RENDERER_AGG
+       @echo " AGG_CFLAGS is $(AGG_CFLAGS)"
+       @echo " AGG_LIBS is $(AGG_LIBS)"
+endif
        @echo "A blank value for CFLAGS means the header is installed in the"
        @echo "default system header location. All the LIBS should have a"
        @echo "legit value"
        @echo ""
-       @echo "Building in directories: $(SUBDIRS)"
-       @echo "Some directories may be excluded from the build"
-       @echo ""
        @echo "Configurable options are:"
        @echo "Sound handler: $(SOUND_OPT)"
        @echo "MP3 decoder: $(ENGINE_OPT)"

Index: NEWS
===================================================================
RCS file: /sources/gnash/gnash/NEWS,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- NEWS        22 Oct 2006 01:00:54 -0000      1.2
+++ NEWS        21 Jan 2007 22:41:02 -0000      1.3
@@ -12,6 +12,7 @@
 is loading.
 * New AntiGrain (AGG) 2D backend added for framebuffer devices.
 * Sound now works.
+* Supports cross configuration and cross compiling for embedded targets.
 * A whole slew of minor bugs that kept various movies from playing.
 
 2006-04-20  Rob Savoye  <address@hidden>

Index: README
===================================================================
RCS file: /sources/gnash/gnash/README,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -b -r1.23 -r1.24
--- README      14 Oct 2006 15:28:08 -0000      1.23
+++ README      21 Jan 2007 22:41:02 -0000      1.24
@@ -1,4 +1,4 @@
-$Id: README,v 1.23 2006/10/14 15:28:08 rsavoye Exp $
+$Id: README,v 1.24 2007/01/21 22:41:02 rsavoye Exp $
 
                    Gnash: the GNU Flash Player
 
@@ -173,4 +173,6 @@
 complete a report as possible at 
 https://savannah.gnu.org/bugs/?group=gnash.  Please include the
 operating system name and version, and which gnash version you are
-using, in your bug reports.
+using, in your bug reports. Please try to reproduce your bug reports
+with Gnash cvs HEAD, as bugs are fixed there that may be broken in a
+standard release.

Index: configure.ac
===================================================================
RCS file: /sources/gnash/gnash/configure.ac,v
retrieving revision 1.235
retrieving revision 1.236
diff -u -b -r1.235 -r1.236
--- configure.ac        17 Jan 2007 11:21:58 -0000      1.235
+++ configure.ac        21 Jan 2007 22:41:02 -0000      1.236
@@ -15,7 +15,7 @@
 dnl  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 dnl  
 
-dnl $Id: configure.ac,v 1.235 2007/01/17 11:21:58 strk Exp $
+dnl $Id: configure.ac,v 1.236 2007/01/21 22:41:02 rsavoye Exp $
 
 AC_PREREQ(2.50)
 AC_INIT(gnash, cvs)
@@ -24,7 +24,9 @@
 AM_CONFIG_HEADER(config.h)
 AC_CONFIG_SUBDIRS(libltdl)
 
-AC_CANONICAL_TARGET
+dnl AC_CANONICAL_TARGET
+AC_CANONICAL_BUILD
+AC_CANONICAL_HOST
 
 dnl Some things you can only do by looking at the platform name.
 case "${host}" in
@@ -279,11 +281,6 @@
 AC_PROG_INSTALL
 AM_COMPILER_LIB
 
-dnl autoconf doesn't always get whether we're cross compiling or not,
-dnl so we try to figure this out on out own.
-if test ${host} != ${target} ; then
-  cross_compiling=yes
-fi
 dnl When cross compiling, limit the search directories cause otherwise
 dnl we may get the host headers or libraries by accident. These values
 dnl are exported, so all the other configure tests in macros/*.m4 use
@@ -292,12 +289,16 @@
 dnl options to configure.
 if test x$cross_compiling = xyes; then
   AC_MSG_NOTICE([Configuring Gnash for cross compilation])
-  export incllist="${prefix}/${target_alias}/include ${prefix}/include"
-  export libslist="${prefix}/${target_alias}/lib ${prefix}/lib64 
${prefix}/lib32 ${prefix}/lib"
+  export incllist="${prefix}/${host_alias}/include ${prefix}/include"
+  export libslist="${prefix}/${host_alias}/lib ${prefix}/lib64 ${prefix}/lib32 
${prefix}/lib"
+  export pathlist="${prefix}/${host_alias}/bin:${prefix}/bin"
+  LDFLAGS="${LDFLAGS} -Wl,--as-needed"
+  plugin=no
 else
   AC_MSG_NOTICE([Configuring Gnash for native compilation])
   export incllist=`cat ${srcdir}/macros/incllist`
   export libslist=`cat ${srcdir}/macros/libslist`
+  export pathlist=$PATH
 fi
 
 GNASH_PKG_FIND(dmalloc, [dmalloc.h], [dmalloc], mallinfo)
@@ -345,7 +346,8 @@
        LIBS=$save_LIBS
        ;;
 esac
-AC_PATH_XTRA
+dnl AC_PATH_XTRA
+GNASH_PATH_X11
 
 AC_CHECK_HEADERS(dejagnu.h)
 AC_CHECK_HEADERS(malloc.h)
@@ -474,8 +476,8 @@
 fi
 AM_CONDITIONAL(ENABLE_MYSQL, [ test x"$mysql" = xyes ])
 
-dnl currently unused
-dnl GNASH_PKG_FIND(png, [png.h], [playing oggs], ogg_sync_init)
+dnl currently used by Fedora Core 6
+GNASH_PKG_FIND(png, [png.h], [decode PNG images], png_process_data)
 
 AC_PATH_MING
 AM_CONDITIONAL(ENABLE_MING, [ test x"$MAKESWF" != x ])
@@ -982,17 +984,17 @@
   fi
 fi
 
-dnl if test x"${png}" != x ; then
-dnl   if test x"${PNG_CFLAGS}" != x ; then
-dnl     echo "        PNG flags are: $PNG_CFLAGS"
-dnl   else
-dnl     echo "        PNG flags are: default include path"
-dnl   fi
-dnl   echo "        PNG libs are: $PNG_LIBS"
-dnl else
-dnl   echo "        ERROR: No PNG library development package installed!"
-dnl   nogo=true
-dnl fi
+if test x"${png}" != x ; then
+  if test x"${PNG_CFLAGS}" != x ; then
+    echo "        PNG flags are: $PNG_CFLAGS"
+  else
+    echo "        PNG flags are: default include path"
+  fi
+  echo "        PNG libs are: $PNG_LIBS"
+else
+  echo "        ERROR: No PNG library development package installed!"
+  nogo=true
+fi
 
 if test x"${JPEG_LIBS}" != x ; then
   if test x"${JPEG_CFLAGS}" != x ; then

Index: doc/C/sources.xml
===================================================================
RCS file: /sources/gnash/gnash/doc/C/sources.xml,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -b -r1.25 -r1.26
--- doc/C/sources.xml   11 Dec 2006 11:28:46 -0000      1.25
+++ doc/C/sources.xml   21 Jan 2007 22:41:02 -0000      1.26
@@ -1231,7 +1231,7 @@
       </para>
 
       <programlisting>
-       ../gnash/configure --target=arm-unknown-linux-gnu --prefix=/usr/arm 
--host=arm-unknown-linux-gnu --build=i686-pc-linux-gnu --disable-plugin
+       ../../gnash/configure --build=i686-pc-linux-gnu --host=arm-linux 
--prefix=/usr/local/arm/oe --disable-plugin --enable-renderer=agg 
--disable-shared --with-mp3-decoder=mad
       </programlisting>
       
       <para>
@@ -1240,11 +1240,11 @@
 
        <variablelist>
          <varlistentry>
-           <term>--target</term>
+           <term>--build</term>
            <listitem>
              <para>
-               The target architecture. This is the architecture the
-               final executables are supposed to run on.
+               The build architecture. This is the architecture the
+               development tools we're using are supposed to run on.
              </para>
            </listitem>
          </varlistentry>
@@ -1253,21 +1253,7 @@
            <listitem>
              <para>
                The host architecture. This is the architecture the
-               executables are supposed to run on. This is usually the
-               same as <emphasis>--target</emphasis> except when building a
-               compiler as a 
-               Canadian Cross. This is when you build a cross
-               compiler on a Unix machine, that runs on a
-               <emphasis>win32</emphasis> machine, producing code for yet
-               a third architecture, like the <emphasis>ARM</emphasis>.
-             </para>
-           </listitem>
-         </varlistentry>
-         <varlistentry>
-           <term>--build</term>
-           <listitem>
-             <para>
-               This is the system this build is running on.
+               executables are supposed to run on.
              </para>
            </listitem>
          </varlistentry>

Index: gui/Makefile.am
===================================================================
RCS file: /sources/gnash/gnash/gui/Makefile.am,v
retrieving revision 1.57
retrieving revision 1.58
diff -u -b -r1.57 -r1.58
--- gui/Makefile.am     17 Jan 2007 12:16:28 -0000      1.57
+++ gui/Makefile.am     21 Jan 2007 22:41:02 -0000      1.58
@@ -17,7 +17,7 @@
 
 # 
 
-# $Id: Makefile.am,v 1.57 2007/01/17 12:16:28 bjacques Exp $
+# $Id: Makefile.am,v 1.58 2007/01/21 22:41:02 rsavoye Exp $
 
 AUTOMAKE_OPTIONS = 
 
@@ -30,14 +30,10 @@
         -I$(top_srcdir)/libbase \
         -I$(top_srcdir)/backend \
         -I$(top_srcdir)/libgeometry \
-        $(PTHREAD_CFLAGS) \
         $(SDL_CFLAGS) \
         $(DMALLOC_CFLAGS) \
-       $(BOOST_CFLAGS)
-#        $(PNG_CFLAGS) \
-#        $(JPEG_CFLAGS) \
-#        $(MP3_CFLAGS) \
-#        $(OGG_CFLAGS)
+       $(BOOST_CFLAGS) \
+        $(PTHREAD_CFLAGS)
 
 GTK_CFLAGS = \
        $(GTK2_CFLAGS) \
@@ -50,16 +46,22 @@
 GTK_LIBS =  \
        $(GTK2_LIBS) \
        $(GLEXT_LIBS) \
+       $(CAIRO_LIBS) \
        $(PANGO_LIBS) \
        $(ATK_LIBS) \
-       $(GLIB_LIBS) \
-       $(CAIRO_LIBS)
+       $(GLIB_LIBS)
+#        $(PNG_CFLAGS) \
+#        $(JPEG_CFLAGS) \
+#        $(MP3_CFLAGS) \
+#        $(OGG_CFLAGS)
 
 ## WARNING: make sure GLIB_LIBS appears first
 ## See: http://lists.gnu.org/archive/html/gnash-dev/2006-07/msg00076.html
 AM_LDFLAGS =  \
-       $(CURL_LIBS) \
        $(LIBLTDL) \
+       $(CURL_LIBS) \
+       $(LIBXML_LIBS) \
+       $(BOOST_LIBS) \
        $(PTHREAD_LIBS) \
        $(NULL)
 

Index: libamf/Makefile.am
===================================================================
RCS file: /sources/gnash/gnash/libamf/Makefile.am,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -b -r1.19 -r1.20
--- libamf/Makefile.am  24 Nov 2006 22:33:00 -0000      1.19
+++ libamf/Makefile.am  21 Jan 2007 22:41:02 -0000      1.20
@@ -15,7 +15,7 @@
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
-# $Id: Makefile.am,v 1.19 2006/11/24 22:33:00 strk Exp $
+# $Id: Makefile.am,v 1.20 2007/01/21 22:41:02 rsavoye Exp $
 
 AUTOMAKE_OPTIONS = 
 
@@ -23,15 +23,7 @@
 #AM_CPPFLAGS = 
 AM_LDFLAGS = \
        $(top_builddir)/libbase/libgnashbase.la \
-        $(OPENGL_LIBS)      \
-        $(SDL_LIBS)         \
-       $(X_LIBS)           \
-       $(JPEG_LIBS)        \
-       $(PNG_LIBS)         \
-        $(LIBXML_LIBS)      \
-       $(DMALLOC_LIBS)     \
-       $(MAD_LIBS)         \
-       $(OGG_LIBS)
+       $(DMALLOC_LIBS)
 
 
 # AM_LDFLAGS  = $(OPENGL_LIBNS) $(SDL_LIBS)

Index: plugin/klash/Makefile.am
===================================================================
RCS file: /sources/gnash/gnash/plugin/klash/Makefile.am,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -b -r1.22 -r1.23
--- plugin/klash/Makefile.am    17 Jan 2007 12:16:28 -0000      1.22
+++ plugin/klash/Makefile.am    21 Jan 2007 22:41:02 -0000      1.23
@@ -17,7 +17,7 @@
 
 # 
 
-# $Id: Makefile.am,v 1.22 2007/01/17 12:16:28 bjacques Exp $
+# $Id: Makefile.am,v 1.23 2007/01/21 22:41:02 rsavoye Exp $
 
 AUTOMAKE_OPTIONS = 
 
@@ -67,34 +67,34 @@
 if KLASH
 #bin_PROGRAMS = klash
 
-klash_SOURCES = klash.cpp
-klash_CPPFLAGS = \
-        -I.. \
-        -I$(top_srcdir) \
-        -I$(top_srcdir)/server  \
-        -I$(top_srcdir)/server/parser \
-        -I$(top_srcdir)/server/asobj \
-        -I$(top_srcdir)/server/vm \
-        -I$(top_srcdir)/libbase \
-        -I$(top_srcdir)/libgeometry \
-        -I$(top_srcdir)/backend \
-       $(LIBXML_CFLAGS) \
-       $(OPENGL_CFLAGS) \
-       $(KDE_CFLAGS) \
-       -DUSE_KDE
-
-klash_LDADD = \
-       $(KDE_LIBS) \
-       $(OPENGL_LIBS) \
-       $(LIBXML_LIBS) \
-       $(PTHREAD_LIBS) \
-        ../../backend/libgnashbackend.la \
-        ../../server/libgnashserver.la \
-        ../../server/asobj/libgnashasobjs.la \
-        ../../libgeometry/libgnashgeo.la \
-        ../../libbase/libgnashbase.la
+# klash_SOURCES = klash.cpp
+# klash_CPPFLAGS = \
+#         -I.. \
+#         -I$(top_srcdir) \
+#         -I$(top_srcdir)/server  \
+#         -I$(top_srcdir)/server/parser \
+#         -I$(top_srcdir)/server/asobj \
+#         -I$(top_srcdir)/server/vm \
+#         -I$(top_srcdir)/libbase \
+#         -I$(top_srcdir)/libgeometry \
+#         -I$(top_srcdir)/backend \
+#      $(LIBXML_CFLAGS) \
+#      $(OPENGL_CFLAGS) \
+#      $(KDE_CFLAGS) \
+#      -DUSE_KDE
+
+# klash_LDADD = \
+#      $(KDE_LIBS) \
+#      $(OPENGL_LIBS) \
+#      $(LIBXML_LIBS) \
+#      $(PTHREAD_LIBS) \
+#         ../../backend/libgnashbackend.la \
+#         ../../server/libgnashserver.la \
+#         ../../server/asobj/libgnashasobjs.la \
+#         ../../libgeometry/libgnashgeo.la \
+#         ../../libbase/libgnashbase.la
 
-klash_DEPENDENCIES =  klash.moc
+# klash_DEPENDENCIES =  klash.moc
 BUILT_SOURCES = klash_part.moc klash.moc
 
 CLEANFILES = klash_part.moc klash.moc

Index: utilities/Makefile.am
===================================================================
RCS file: /sources/gnash/gnash/utilities/Makefile.am,v
retrieving revision 1.45
retrieving revision 1.46
diff -u -b -r1.45 -r1.46
--- utilities/Makefile.am       9 Jan 2007 00:43:42 -0000       1.45
+++ utilities/Makefile.am       21 Jan 2007 22:41:02 -0000      1.46
@@ -36,6 +36,7 @@
        $(LIBADD_DL) \
        $(LIBLTDL) \
         $(MYSQL_LIBS) \
+       $(LIBXML_LIBS) \
        $(BOOST_LIBS) \
        $(PTHREAD_LIBS) \
        $(NULL)

Index: macros/curl.m4
===================================================================
RCS file: /sources/gnash/gnash/macros/curl.m4,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -b -r1.12 -r1.13
--- macros/curl.m4      9 Jan 2007 00:43:43 -0000       1.12
+++ macros/curl.m4      21 Jan 2007 22:41:02 -0000      1.13
@@ -14,7 +14,7 @@
 dnl  along with this program; if not, write to the Free Software
 dnl  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
-dnl $Id: curl.m4,v 1.12 2007/01/09 00:43:43 rsavoye Exp $
+dnl $Id: curl.m4,v 1.13 2007/01/21 22:41:02 rsavoye Exp $
 
 AC_DEFUN([GNASH_PATH_CURL],
 [
@@ -31,8 +31,7 @@
   ])
 
   curlconfig=""
-  if test x$cross_compiling = xno; then
-    AC_CHECK_PROG(curlconfig, [echo], [curl-config])
+  AC_CHECK_PROG(curlconfig, [echo], [curl-config], , ${pathlist})
     if test x"${curlconfig}" != "x" ; then
       AC_MSG_CHECKING([for RTMP support])
       rtmp=`${curlconfig} --protocols|grep -c RTMP`
@@ -44,7 +43,6 @@
        rtmp=yes
       fi
     fi
-  fi
 
   dnl If the path hasn't been specified, go look for it.
   if test x"${ac_cv_path_curl_incl}" = x; then

Index: macros/glib.m4
===================================================================
RCS file: /sources/gnash/gnash/macros/glib.m4,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -b -r1.24 -r1.25
--- macros/glib.m4      9 Jan 2007 00:43:43 -0000       1.24
+++ macros/glib.m4      21 Jan 2007 22:41:02 -0000      1.25
@@ -14,7 +14,7 @@
 dnl  along with this program; if not, write to the Free Software
 dnl  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
-dnl $Id: glib.m4,v 1.24 2007/01/09 00:43:43 rsavoye Exp $
+dnl $Id: glib.m4,v 1.25 2007/01/21 22:41:02 rsavoye Exp $
 
 AC_DEFUN([GNASH_PATH_GLIB],
 [
@@ -52,6 +52,10 @@
           gnash_glib_version=`echo ${gnash_glib_topdir} | sed -e 's:glib-::'`
           ac_cv_path_glib_incl="-I$j"
           AC_MSG_RESULT(${ac_cv_path_glib_incl})
+          gnash_glib_config=`echo $j | sed -e 's:include:lib:'`
+          if test -f ${gnash_glib_config}/include/glibconfig.h; then
+            ac_cv_path_glib_incl="${ac_cv_path_glib_incl} 
-I${gnash_glib_config}/include"
+          fi
           break
         fi
       done
@@ -62,6 +66,7 @@
     done
   fi
  
+
   dnl Look for the library
   AC_ARG_WITH(glib_lib, AC_HELP_STRING([--with-glib-lib], [directory where 
glib library is]), with_glib_lib=${withval})
   AC_CACHE_VAL(ac_cv_path_glib_lib,[
@@ -93,9 +98,6 @@
         fi
       fi
     done
-    if test -f $i/glib-${gnash_glib_version}/include/glibconfig.h; then
-      ac_cv_path_glib_incl="${ac_cv_path_glib_incl} 
-I$i/glib-${gnash_glib_version}/include"
-    fi
   fi
   AC_MSG_RESULT(${ac_cv_path_glib_lib})
  

Index: macros/gtk2.m4
===================================================================
RCS file: /sources/gnash/gnash/macros/gtk2.m4,v
retrieving revision 1.38
retrieving revision 1.39
diff -u -b -r1.38 -r1.39
--- macros/gtk2.m4      9 Jan 2007 00:43:43 -0000       1.38
+++ macros/gtk2.m4      21 Jan 2007 22:41:02 -0000      1.39
@@ -15,7 +15,7 @@
 dnl  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
 
-dnl $Id: gtk2.m4,v 1.38 2007/01/09 00:43:43 rsavoye Exp $
+dnl $Id: gtk2.m4,v 1.39 2007/01/21 22:41:02 rsavoye Exp $
 
 AC_DEFUN([GNASH_PATH_GTK2],
 [
@@ -99,10 +99,10 @@
     for i in $libslist; do
       if test -f $i/libgtk-x11-2.0.a -o -f $i/libgtk-x11-2.0.so; then
         if test x"$i" != x"/usr/lib"; then
-          ac_cv_path_gtk2_lib="-L$i -lgtk-x11-2.0 -lgdk-x11-2.0"
+          ac_cv_path_gtk2_lib="-L$i -lgtk-x11-2.0 -lgdk-x11-2.0 -lgobject-2.0 
-lgmodule-2.0"
           break
         else
-          ac_cv_path_gtk2_lib="-lgtk-x11-2.0 -lgdk-x11-2.0"
+          ac_cv_path_gtk2_lib="-lgtk-x11-2.0 -lgdk-x11-2.0 -lgobject-2.0 
-lgmodule-2.0 "
           break
         fi
       fi
@@ -110,7 +110,7 @@
   fi
 
   if test x"${ac_cv_path_gtk2_lib}" = x; then
-    AC_CHECK_LIB([gtk-x11-2.0], [gtk_init], 
[ac_cv_path_gtk2_lib="-lgtk-x11-2.0 -lgdk-x11-2.0"])
+    AC_CHECK_LIB([gtk-x11-2.0], [gtk_init], 
[ac_cv_path_gtk2_lib="-lgtk-x11-2.0 -lgdk-x11-2.0 -lgobject-2.0 -lgmodule-2.0"])
   fi
   AC_MSG_RESULT($ac_cv_path_gtk2_lib)
  

Index: macros/incllist
===================================================================
RCS file: /sources/gnash/gnash/macros/incllist,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- macros/incllist     9 Jan 2007 00:43:43 -0000       1.1
+++ macros/incllist     21 Jan 2007 22:41:03 -0000      1.2
@@ -1 +1 @@
-${prefix}/${target_alias}/include ${prefix}/include /sw/include 
/usr/nekoware/include /usr/freeware/include /pkg/include /opt/local/include 
/usr/local/include /home/latest/include /opt/include /opt/mesa/include 
/opt/include /usr/X11R6/include /usr/include /usr/pkg/include .. ../..
+${prefix}/${host_alias}/include ${prefix}/include /sw/include 
/usr/nekoware/include /usr/freeware/include /pkg/include /opt/local/include 
/usr/local/include /home/latest/include /opt/include /opt/mesa/include 
/opt/include /usr/X11R6/include /usr/include /usr/pkg/include .. ../..

Index: macros/libXML.m4
===================================================================
RCS file: /sources/gnash/gnash/macros/libXML.m4,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -b -r1.27 -r1.28
--- macros/libXML.m4    9 Jan 2007 00:57:58 -0000       1.27
+++ macros/libXML.m4    21 Jan 2007 22:41:03 -0000      1.28
@@ -14,7 +14,7 @@
 dnl  along with this program; if not, write to the Free Software
 dnl  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
-dnl $Id: libXML.m4,v 1.27 2007/01/09 00:57:58 rsavoye Exp $
+dnl $Id: libXML.m4,v 1.28 2007/01/21 22:41:03 rsavoye Exp $
 
 AC_DEFUN([GNASH_PATH_LIBXML], [
   has_xml=no
@@ -30,8 +30,8 @@
     fi
   ])
 
-  if test x${cross_compiling} = xno; then
-    AC_PATH_PROG(XML2_CONFIG, xml2-config, , 
,[${prefix}:${prefix}/${target_alias}:$PATH])
+  if test x"${ac_cv_path_libxml_incl}" = x; then
+    AC_PATH_PROG(XML2_CONFIG, xml2-config, ,[${pathlist}])
     if test "x$XML2_CONFIG" != "x" ; then
       if test "x$XML2_CFLAGS" = "x" ; then
         ac_cv_path_libxml_incl=`$XML2_CONFIG --cflags`

Index: macros/libslist
===================================================================
RCS file: /sources/gnash/gnash/macros/libslist,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- macros/libslist     9 Jan 2007 00:43:43 -0000       1.1
+++ macros/libslist     21 Jan 2007 22:41:03 -0000      1.2
@@ -1 +1 @@
-${prefix}/${target_alias}/lib ${prefix}/lib64 ${prefix}/lib32 ${prefix}/lib 
/usr/lib64 /usr/lib32 /usr/nekoware/lib /usr/freeware/lib /usr/lib /sw/lib 
/usr/local/lib /home/latest/lib /opt/lib /pkg/lib /opt/local/lib /usr/pkg/lib 
/usr/X11R6/lib /usr/lib/opengl/xorg-x11/lib /usr/lib64/opengl/xorg-x11/lib 
/usr/lib64/opengl/xorg-x11/lib64  /opt/mesa/lib64 /opt/mesa/lib .. ../..
+${prefix}/${host_alias}/lib ${prefix}/lib64 ${prefix}/lib32 ${prefix}/lib /lib 
/usr/lib64 /usr/lib32 /usr/nekoware/lib /usr/freeware/lib /usr/lib /sw/lib 
/usr/local/lib /home/latest/lib /opt/lib /pkg/lib /opt/local/lib /usr/pkg/lib 
/usr/X11R6/lib /usr/lib/opengl/xorg-x11/lib /usr/lib64/opengl/xorg-x11/lib 
/usr/lib64/opengl/xorg-x11/lib64  /opt/mesa/lib64 /opt/mesa/lib .. ../..

Index: macros/ming.m4
===================================================================
RCS file: /sources/gnash/gnash/macros/ming.m4,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -b -r1.11 -r1.12
--- macros/ming.m4      17 Jan 2007 12:50:54 -0000      1.11
+++ macros/ming.m4      21 Jan 2007 22:41:03 -0000      1.12
@@ -38,7 +38,6 @@
   MING_CFLAGS=""
   MING_LIBS=""
 
-  if test x$cross_compiling = xno; then
     AC_ARG_WITH(ming,[  --with-ming=[<ming-config>]    Path to the ming-config 
command], [
       case "${withval}" in
         yes|no) ;;
@@ -47,7 +46,7 @@
     ], MING_CONFIG="")
 
     if test x"$MING_CONFIG" = "x"; then
-      AC_PATH_PROG(MING_CONFIG, ming-config)
+    AC_PATH_PROG(MING_CONFIG, ming-config, ,[${pathlist}])
     fi
 
     if test x"$MING_CONFIG" != "x"; then
@@ -62,7 +61,8 @@
       MING_PATH=`$MING_CONFIG --bindir`
       AC_PATH_PROG([MAKESWF], [makeswf], , [$MING_PATH:$PATH])
     fi
-  else
+
+  if test x"${MING_CFLAGS}" = x; then
     AC_ARG_WITH(ming_incl, AC_HELP_STRING([--with-ming-incl], [Directory where 
Ming header is]), with_ming_incl=${withval})
     AC_CACHE_VAL(ac_cv_path_ming_incl, [
       if test x"${with_ming_incl}" != x ; then

Index: macros/pthreads.m4
===================================================================
RCS file: /sources/gnash/gnash/macros/pthreads.m4,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -b -r1.21 -r1.22
--- macros/pthreads.m4  9 Jan 2007 00:43:43 -0000       1.21
+++ macros/pthreads.m4  21 Jan 2007 22:41:03 -0000      1.22
@@ -15,7 +15,7 @@
 dnl  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
 dnl Copyright (C) 2006 Steven G. Johnson <address@hidden>.
-dnl $Id: pthreads.m4,v 1.21 2007/01/09 00:43:43 rsavoye Exp $
+dnl $Id: pthreads.m4,v 1.22 2007/01/21 22:41:03 rsavoye Exp $
 
 AC_DEFUN([GNASH_PATH_PTHREADS],
 [
@@ -23,14 +23,16 @@
 AC_LANG_SAVE
 AC_LANG_C
 pthreads=no
+PTHREAD_LIBS=""
+PTHREAD_CFLAGS=""
 
-# We used to check for pthread.h first, but this fails if pthread.h
-# requires special compiler flags (e.g. on True64 or Sequent).
-# It gets checked for in the link test anyway.
-
-# First of all, check if the user has set any of the PTHREAD_LIBS,
-# etcetera environment variables, and if threads linking works using
-# them:
+dnl We used to check for pthread.h first, but this fails if pthread.h
+dnl requires special compiler flags (e.g. on True64 or Sequent).
+dnl It gets checked for in the link test anyway.
+
+dnl First of all, check if the user has set any of the PTHREAD_LIBS,
+dnl etcetera environment variables, and if threads linking works using
+dnl them:
 if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then
         save_CFLAGS="$CFLAGS"
         CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
@@ -47,61 +49,63 @@
         CFLAGS="$save_CFLAGS"
 fi
 
-# We must check for the threads library under a number of different
-# names; the ordering is very important because some systems
-# (e.g. DEC) have both -lpthread and -lpthreads, where one of the
-# libraries is broken (non-POSIX).
-
-# Create a list of thread flags to try.  Items starting with a "-" are
-# C compiler flags, and other items are library names, except for "none"
-# which indicates that we try without any flags at all, and "pthread-config"
-# which is a program returning the flags for the Pth emulation library.
+dnl We must check for the threads library under a number of different
+dnl names; the ordering is very important because some systems
+dnl (e.g. DEC) have both -lpthread and -lpthreads, where one of the
+dnl libraries is broken (non-POSIX).
+
+dnl Create a list of thread flags to try.  Items starting with a "-" are
+dnl C compiler flags, and other items are library names, except for "none"
+dnl which indicates that we try without any flags at all, and "pthread-config"
+dnl which is a program returning the flags for the Pth emulation library.
 
 pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads 
-mthreads pthread --thread-safe -mt pthread-config pth-config"
 
-# The ordering *is* (sometimes) important.  Some notes on the
-# individual items follow:
+dnl The ordering *is* (sometimes) important.  Some notes on the
+dnl individual items follow:
 
-# pthreads:    AIX (must check this before -lpthread)
-# none:                in case threads are in libc; should be tried before 
-Kthread and
-#              other compiler flags to prevent continual compiler warnings
-# -Kthread:    Sequent (threads in libc, but -Kthread needed for pthread.h)
-# -kthread:    FreeBSD kernel threads (preferred to -pthread since SMP-able)
-# lthread:     LinuxThreads port on FreeBSD (also preferred to -pthread)
-# -pthread:    Linux/gcc (kernel threads), BSD/gcc (userland threads)
-# -pthreads:   Solaris/gcc
-# -mthreads:   Mingw32/gcc, Lynx/gcc
-# -mt:         Sun Workshop C (may only link SunOS threads [-lthread], but it
-#              doesn't hurt to check since this sometimes defines pthreads too;
-#              also defines -D_REENTRANT)
-#              ... -mt is also the pthreads flag for HP/aCC
-# pthread:     Linux, etcetera
-# --thread-safe: KAI C++
-# pth(read)-config: use pthread-config program (for GNU Pth library)
+dnl pthreads:  AIX (must check this before -lpthread)
+dnl none:              in case threads are in libc; should be tried before 
-Kthread and
+dnl            other compiler flags to prevent continual compiler warnings
+dnl -Kthread:  Sequent (threads in libc, but -Kthread needed for pthread.h)
+dnl -kthread:  FreeBSD kernel threads (preferred to -pthread since SMP-able)
+dnl lthread:   LinuxThreads port on FreeBSD (also preferred to -pthread)
+dnl -pthread:  Linux/gcc (kernel threads), BSD/gcc (userland threads)
+dnl -pthreads: Solaris/gcc
+dnl -mthreads: Mingw32/gcc, Lynx/gcc
+dnl -mt:               Sun Workshop C (may only link SunOS threads [-lthread], 
but it
+dnl            doesn't hurt to check since this sometimes defines pthreads too;
+dnl            also defines -D_REENTRANT)
+dnl            ... -mt is also the pthreads flag for HP/aCC
+dnl pthread:   Linux, etcetera
+dnl --thread-safe: KAI C++
+dnl pth(read)-config: use pthread-config program (for GNU Pth library)
 
 case "${host_cpu}-${host_os}" in
+  *linux*)
+    pthread_flags=""
+    ;;
         *solaris*)
 
-        # On Solaris (at least, for some versions), libc contains stubbed
-        # (non-functional) versions of the pthreads routines, so link-based
-        # tests will erroneously succeed.  (We need to link with -pthreads/-mt/
-        # -lpthread.)  (The stubs are missing pthread_cleanup_push, or rather
-        # a function called by this macro, so we could check for that, but
-        # who knows whether they'll stub that too in a future libc.)  So,
-        # we'll just look for -pthreads and -lpthread first:
+  dnl On Solaris (at least, for some versions), libc contains stubbed
+  dnl (non-functional) versions of the pthreads routines, so link-based
+  dnl tests will erroneously succeed.  (We need to link with -pthreads/-mt/
+  dnl -lpthread.)  (The stubs are missing pthread_cleanup_push, or rather
+  dnl a function called by this macro, so we could check for that, but
+  dnl who knows whether they'll stub that too in a future libc.)  So,
+  dnl we'll just look for -pthreads and -lpthread first:
 
         pthread_flags="-pthreads pthread -mt -pthread $pthread_flags"
         ;;
 esac
 
 if test x"$pthreads" = xno; then
-for flag in $pthread_flags; do
+  for flag in $pthread_flags; do
 
         case $flag in
                 none)
                 AC_MSG_CHECKING([whether pthreads work without any flags])
                 ;;
-
                 -*)
                 AC_MSG_CHECKING([whether pthreads work with $flag])
                 PTHREAD_CFLAGS="$flag"
@@ -109,14 +113,18 @@
 
                 pth-config)
                 AC_CHECK_PROG(pth_config, pth-config, yes, no)
-                if test x"$pth_config" = xno; then continue; fi
+       if test x"$pth_config" = xno; then
+         continue;
+       fi
                 PTHREAD_CFLAGS="`pth-config --cflags`"
                 PTHREAD_LIBS="`pth-config --ldflags` `pth-config --libs`"
                 ;;
 
                 pthread-config)
                 AC_CHECK_PROG(pthread_config, pthread-config, yes, no)
-                if test x"$pthread_config" = xno; then continue; fi
+       if test x"$pthread_config" = xno; then
+         continue;
+       fi
                 PTHREAD_CFLAGS="`pthread-config --cflags`"
                 PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config 
--libs`"
                 ;;
@@ -132,15 +140,15 @@
         LIBS="$PTHREAD_LIBS $LIBS"
         CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
 
-        # Check for various functions.  We must include pthread.h,
-        # since some functions may be macros.  (On the Sequent, we
-        # need a special flag -Kthread to make this header compile.)
-        # We check for pthread_join because it is in -lpthread on IRIX
-        # while pthread_create is in libc.  We check for pthread_attr_init
-        # due to DEC craziness with -lpthreads.  We check for
-        # pthread_cleanup_push because it is one of the few pthread
-        # functions on Solaris that doesn't have a non-functional libc stub.
-        # We try pthread_create on general principles.
+    dnl Check for various functions.  We must include pthread.h,
+    dnl since some functions may be macros.  (On the Sequent, we
+    dnl need a special flag -Kthread to make this header compile.)
+    dnl We check for pthread_join because it is in -lpthread on IRIX
+    dnl while pthread_create is in libc.  We check for pthread_attr_init
+    dnl due to DEC craziness with -lpthreads.  We check for
+    dnl pthread_cleanup_push because it is one of the few pthread
+    dnl functions on Solaris that doesn't have a non-functional libc stub.
+    dnl We try pthread_create on general principles.
         AC_TRY_LINK([#include <pthread.h>],
                     [pthread_t th; pthread_join(th, 0);
                      pthread_attr_init(0); pthread_cleanup_push(0, 0);
@@ -155,19 +163,35 @@
                 break;
         fi
 
-        PTHREAD_LIBS=""
-        PTHREAD_CFLAGS=""
-done
+  done
 fi
 
-# Various other checks:
+dnl Try a manual search, useful for cross-compiling
+if test x"${PTHREAD_LIBS}" = "x"; then
+  AC_MSG_CHECKING([searching for pthread library])
+  for i in $libslist; do
+   if test -f $i/libpthread.a -o -f $i/libpthread.so; then
+      pthreads=yes
+     if test x"$i" != x"/usr/lib"; then
+       PTHREAD_LIBS="-L$i -lpthread"
+       break
+      else
+       PTHREAD_LIBS="-lpthread"
+       break
+     fi
+      AC_MSG_RESULT(yes)
+    fi
+  done
+fi
+
+dnl Various other checks:
 if test "x$pthreads" = xyes; then
         save_LIBS="$LIBS"
         LIBS="$PTHREAD_LIBS $LIBS"
         save_CFLAGS="$CFLAGS"
         CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
 
-        # Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
+  dnl Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
         AC_MSG_CHECKING([for joinable pthread attribute])
         attr_name=unknown
         for attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
@@ -196,7 +220,7 @@
         LIBS="$save_LIBS"
         CFLAGS="$save_CFLAGS"
 
-        # More AIX lossage: must compile with cc_r (or xlc_r)
+  dnl More AIX lossage: must compile with cc_r (or xlc_r)
         case "${host_os}" in
           aix* )
             case "$CC" in
@@ -220,24 +244,21 @@
   PTHREAD_CXX="$CXX"
 fi
 
+  
 AC_SUBST(PTHREAD_LIBS)
 AC_SUBST(PTHREAD_CFLAGS)
 AC_SUBST(PTHREAD_CC)
 AC_SUBST(PTHREAD_CXX)
 
-# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
+dnl Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
 if test x"$pthreads" = xyes; then
-       if test "${PTHREAD_LIBS}x" = "x"; then
-               dnl PTHREAD_LIBS="-lpthread"
-               PTHREAD_LIBS=" "
-       fi
         ifelse([$1],,AC_DEFINE(HAVE_PTHREADS,1,[Define if you have POSIX 
threads libraries and header files.]),[$1])
         :
 else
         pthreads=no
         $2
 fi
-AC_LANG_RESTORE
+  AC_LANG_RESTORE
 ])
 
 # Local Variables:

Index: macros/sdl.m4
===================================================================
RCS file: /sources/gnash/gnash/macros/sdl.m4,v
retrieving revision 1.37
retrieving revision 1.38
diff -u -b -r1.37 -r1.38
--- macros/sdl.m4       16 Jan 2007 19:12:12 -0000      1.37
+++ macros/sdl.m4       21 Jan 2007 22:41:03 -0000      1.38
@@ -14,7 +14,7 @@
 dnl  along with this program; if not, write to the Free Software
 dnl  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
-dnl $Id: sdl.m4,v 1.37 2007/01/16 19:12:12 bjacques Exp $
+dnl $Id: sdl.m4,v 1.38 2007/01/21 22:41:03 rsavoye Exp $
 
 AC_DEFUN([GNASH_PATH_SDL], [
   has_sdl=no
@@ -48,17 +48,17 @@
   fi
   AC_MSG_RESULT(${gnash_sdl_version})
 
-dnl   AC_PATH_PROG(SDL_CONFIG, sdl-config, , 
,[${prefix}:${prefix}/${target_alias}:$PATH])
-dnl   if test "x$SDL_CONFIG" != "x" ; then
-dnl     if test "x$SDL_CFLAGS" = "x" ; then
-dnl       SDL_CFLAGS=`$SDL_CONFIG --cflags`
-dnl     fi
-dnl     if test "x$SDL_LIBS" = "x" ; then
-dnl       SDL_LIBS=`$SDL_CONFIG --libs | sed -e 's:-L/usr/lib::'`
-dnl     fi
-dnl   else
-dnl     AC_MSG_RESULT(no)
-dnl   fi
+  AC_PATH_PROG(SDL_CONFIG, sdl-config, , ,[${pathlist}])
+  if test "x$SDL_CONFIG" != "x" ; then
+    if test "x$SDL_CFLAGS" = "x" ; then
+      SDL_CFLAGS=`$SDL_CONFIG --cflags`
+    fi
+    if test "x$SDL_LIBS" = "x" ; then
+      SDL_LIBS=`$SDL_CONFIG --libs | sed -e 's:-L/usr/lib::'`
+    fi
+  else
+    AC_MSG_RESULT(no)
+  fi
 
   gnash_sdl_topdir=""
   gnash_sdl_version=""




reply via email to

[Prev in Thread] Current Thread [Next in Thread]