gnash-commit
[Top][All Lists]
Advanced

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

[Gnash-commit] gnash ChangeLog macros/gnashpkgtool.m4


From: Sandro Santilli
Subject: [Gnash-commit] gnash ChangeLog macros/gnashpkgtool.m4
Date: Wed, 17 Jan 2007 11:08:14 +0000

CVSROOT:        /sources/gnash
Module name:    gnash
Changes by:     Sandro Santilli <strk>  07/01/17 11:08:14

Modified files:
        .              : ChangeLog 
        macros         : gnashpkgtool.m4 

Log message:
                * macros/gnashpkgtool.m4: make sure to define HAVE_header when
                  a package header is found.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.2119&r2=1.2120
http://cvs.savannah.gnu.org/viewcvs/gnash/macros/gnashpkgtool.m4?cvsroot=gnash&r1=1.33&r2=1.34

Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.2119
retrieving revision 1.2120
diff -u -b -r1.2119 -r1.2120
--- ChangeLog   17 Jan 2007 09:53:23 -0000      1.2119
+++ ChangeLog   17 Jan 2007 11:08:14 -0000      1.2120
@@ -1,5 +1,7 @@
 2007-01-17 Sandro Santilli <address@hidden>
 
+       * macros/gnashpkgtool.m4: make sure to define HAVE_header when
+         a package header is found.
        * testsuite/samples/clip_as_button2-TestRunner.cpp: enable
          verbosity *before* attempting to load the movie, to know
          more about why the movie could not be loaded.

Index: macros/gnashpkgtool.m4
===================================================================
RCS file: /sources/gnash/gnash/macros/gnashpkgtool.m4,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -b -r1.33 -r1.34
--- macros/gnashpkgtool.m4      9 Jan 2007 00:43:43 -0000       1.33
+++ macros/gnashpkgtool.m4      17 Jan 2007 11:08:14 -0000      1.34
@@ -14,20 +14,25 @@
 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: gnashpkgtool.m4,v 1.33 2007/01/09 00:43:43 rsavoye Exp $
+dnl $Id: gnashpkgtool.m4,v 1.34 2007/01/17 11:08:14 strk Exp $
 
 dnl Generic macros for finding and setting include-paths and library-path
 dnl for packages. Implements GNASH_PKG_INCLUDES() and GNASH_PKG_LIBS().
 dnl 
 dnl TODO:
+dnl
 dnl   - always run AC_CHECK_HEADERS and AC_CHECK_LIB so that config.h end
 dnl     up with correct information about what's available and what not
 dnl     and every provided info is verified before acceptance.
+dnl
+dnl   - Document the interface of the macro !!
+dnl
 
 AC_DEFUN([GNASH_PKG_INCLUDES],
 [
   pushdef([UP], translit([$1], [a-z], [A-Z]))dnl Uppercase
   pushdef([DOWN], translit([$1], [A-Z], [a-z]))dnl Lowercase
+  pushdef([UPHEADER], translit([$2], [a-z./], [A-Z__]))dnl Uppercase header
 
   AC_ARG_ENABLE($1, AC_HELP_STRING([--enable-$1], [Enable support for $3.]), [
     case "${enableval}" in
@@ -68,13 +73,14 @@
 
        dnl If the path hasn't been specified, go look for it.
        if test x"${ac_cv_path_$1_incl}" = x; then
-         AC_CHECK_HEADER($2, [ac_cv_path_$1_incl=""], [
-           AC_CHECK_HEADER($1/$2, [ac_cv_path_$1_incl="-I/usr/include/$1"], [
-             AC_CHECK_HEADER($name/$2, 
[ac_cv_path_$1_incl="-I/usr/include/$name"], [
-               AC_CHECK_HEADER($2, [ac_cv_path_$1_incl="-I/usr/include/$2"], [
+         AC_CHECK_HEADER($2, [ac_cv_path_$1_incl=""; found_$1_incl="yes"], [
+           AC_CHECK_HEADER($1/$2, [ac_cv_path_$1_incl="-I/usr/include/$1"; 
found_$1_incl="yes"], [
+             AC_CHECK_HEADER($name/$2, 
[ac_cv_path_$1_incl="-I/usr/include/$name"; found_$1_incl="yes"], [
+               AC_CHECK_HEADER($2, [ac_cv_path_$1_incl="-I/usr/include/$2"; 
found_$1_incl="yes"], [
                if test x"${ac_cv_path_$1_incl}" = x; then
                  for i in $incllist; do
                    if test -f $i/$name; then
+                      found_$1_incl="yes"
                      if test x"$i" != x"/usr/include"; then
                        ac_cv_path_$1_incl="-I$i"
                        break
@@ -84,10 +90,12 @@
                      fi
                    else
                      if test -f $i/$name/$2; then
+                        found_$1_incl="yes"
                        ac_cv_path_$1_incl="-I$i/$name"
                        break
                      else
                        if test -f $i/$2; then
+                          found_$1_incl="yes"
                          ac_cv_path_$1_incl="-I$i"
                          break
                        fi
@@ -101,16 +109,25 @@
        ])
     fi
 
+    if test x"${found_$1_incl}" = "xyes"; then
+
+      dnl It seems we need to explicitly call AC_DEFINE as AC_CHECK_HEADER 
doesn't
+      dnl do this automatically. AC_CHECK_HEADERS (not the final S) would do 
it.
+      AC_DEFINE([HAVE_]UPHEADER, 1, [Define if you have the $2 header])
+
     if test x"${ac_cv_path_$1_incl}" != x ; then
       UP[]_CFLAGS="${ac_cv_path_$1_incl}"
     else
       UP[]_CFLAGS=""
     fi
+
+    fi
   fi
   AC_SUBST(UP[]_CFLAGS)
 
   popdef([UP])
   popdef([DOWN])
+  popdef([UPHEADER])
 ])
 
 AC_DEFUN([GNASH_PKG_LIBS], dnl GNASH_PKG_LIBS(cairo, cairo_status, [cairo 
render library.])




reply via email to

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