]> git.sesse.net Git - vlc/commitdiff
Turn this error:
authorRocky Bernstein <rocky@videolan.org>
Fri, 10 Dec 2004 02:14:10 +0000 (02:14 +0000)
committerRocky Bernstein <rocky@videolan.org>
Fri, 10 Dec 2004 02:14:10 +0000 (02:14 +0000)
  playlist.cpp:1351: error: ISO C++ forbids cast to non-reference type
into a warning by adding -fpermissive to CXX flags for wxwindows
CXXFLAGS. Fix suggested by Marius Kjeldahl.

However better would be to fix playlist.cpp

configure.ac

index d7d3ea0df0f8ba3cae3eb9e0a12817b03d3c283a..047c7c0f06a307cb65fc5eed1cc9b971ddb18bdb 100644 (file)
@@ -3492,6 +3492,17 @@ then
       AC_MSG_ERROR([Your development package for wxWindows is too old, you need at least version 2.3.0. Please upgrade and try again. Alternatively you can also configure with --disable-wxwindows.])
     fi
     AC_LANG_PUSH(C++)
+    # Turn this error:
+    #   playlist.cpp:1351: error: ISO C++ forbids cast to non-reference type
+    # into a warning. However better would be to fix playlist.cpp
+    AC_CACHE_CHECK([if \$CXX accepts -fpermissive],
+        [ac_cv_cxx_fpermissive],
+        [CXXFLAGS="${CXXFLAGS_save} -fpermissive"
+         AC_TRY_COMPILE([],,ac_cv_cxx_fpermissive=yes,
+                        ac_cv_cxx_fpermissive=no)])
+    if test "${ac_cv_cxx_fpermissive}" = "yes"; then
+      VLC_ADD_CXXFLAGS([wxwindows],-fpermissive)
+    fi
     VLC_ADD_CXXFLAGS([wxwindows],[`${WX_CONFIG} --cxxflags`])
     VLC_ADD_LDFLAGS([wxwindows],[`${WX_CONFIG} --libs`])
     # now look for the wxprec.h header