Alexandre Julliard : makefiles: Only allow includes and defines in pkg-config flags.

Alexandre Julliard julliard at winehq.org
Tue Oct 26 09:40:25 CDT 2021


Module: wine
Branch: stable
Commit: 1552a865a3a3288f1c02a254034324b6f753dcec
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=1552a865a3a3288f1c02a254034324b6f753dcec

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Thu Apr  8 11:43:13 2021 +0200

makefiles: Only allow includes and defines in pkg-config flags.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50811
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
(cherry picked from commit 4f04994ef47b5077e13c1b770ed0f818f59adcd5)
Signed-off-by: Michael Stefaniuc <mstefani at winehq.org>

---

 configure       | 11 +----------
 configure.ac    | 11 +----------
 tools/makedep.c |  2 +-
 3 files changed, 3 insertions(+), 21 deletions(-)

diff --git a/configure b/configure
index fab02c3da62..6a56303c2a9 100755
--- a/configure
+++ b/configure
@@ -14491,16 +14491,7 @@ $as_echo "$as_me:${as_lineno-$LINENO}: gstreamer-1.0 gstreamer-video-1.0 gstream
 $as_echo "$as_me:${as_lineno-$LINENO}: gstreamer-1.0 gstreamer-video-1.0 gstreamer-audio-1.0 libs: $GSTREAMER_LIBS" >&5
 ac_save_CPPFLAGS=$CPPFLAGS
 CPPFLAGS="$CPPFLAGS $GSTREAMER_CFLAGS"
-ac_gst_incl=""
-        for i in $GSTREAMER_CFLAGS
-        do
-            case "$i" in
-                -I*) ac_gst_incl="$ac_gst_incl $i";;
-            esac
-        done
-        GSTREAMER_CFLAGS=$ac_gst_incl
-        CPPFLAGS="$ac_save_CPPFLAGS $GSTREAMER_CFLAGS"
-        ac_fn_c_check_header_mongrel "$LINENO" "gst/gst.h" "ac_cv_header_gst_gst_h" "$ac_includes_default"
+ac_fn_c_check_header_mongrel "$LINENO" "gst/gst.h" "ac_cv_header_gst_gst_h" "$ac_includes_default"
 if test "x$ac_cv_header_gst_gst_h" = xyes; then :
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gint64 defined by gst/gst.h is indeed 64-bit" >&5
 $as_echo_n "checking whether gint64 defined by gst/gst.h is indeed 64-bit... " >&6; }
diff --git a/configure.ac b/configure.ac
index 6eedc151e83..430dd8802e3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1588,16 +1588,7 @@ dnl **** Check for gstreamer ****
 if test "x$with_gstreamer" != "xno"
 then
     WINE_PACKAGE_FLAGS(GSTREAMER,[gstreamer-1.0 gstreamer-video-1.0 gstreamer-audio-1.0],,,,
-        [ac_gst_incl=""
-        for i in $GSTREAMER_CFLAGS
-        do
-            case "$i" in
-                -I*) ac_gst_incl="$ac_gst_incl $i";;
-            esac
-        done
-        GSTREAMER_CFLAGS=$ac_gst_incl
-        CPPFLAGS="$ac_save_CPPFLAGS $GSTREAMER_CFLAGS"
-        AC_CHECK_HEADER([gst/gst.h],
+        [AC_CHECK_HEADER([gst/gst.h],
             [AC_MSG_CHECKING([whether gint64 defined by gst/gst.h is indeed 64-bit])
               AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <gst/gst.h>]],
                                                  [[static int a[sizeof(gint64) > 4 ? 1 : -1]; if (a[0]) return 0;]])],
diff --git a/tools/makedep.c b/tools/makedep.c
index 306a50eef5d..8e3323e8653 100644
--- a/tools/makedep.c
+++ b/tools/makedep.c
@@ -4259,7 +4259,7 @@ static void load_sources( struct makefile *make )
     for (i = 0; i < value.count; i++)
         if (!strncmp( value.str[i], "-I", 2 ))
             strarray_add_uniq( &make->include_paths, value.str[i] + 2 );
-        else
+        else if (!strncmp( value.str[i], "-D", 2 ) || !strncmp( value.str[i], "-U", 2 ))
             strarray_add_uniq( &make->define_args, value.str[i] );
     strarray_addall( &make->define_args, get_expanded_make_var_array( make, "EXTRADEFS" ));
 




More information about the wine-cvs mailing list