NEED_GTK_MAIN=yes
NEED_GNOME_MAIN=yes
ALIASES="${ALIASES} gnome-vlc"
+ dnl We need this because of some moronic gnomesupport.h flavours
+ AC_MSG_CHECKING(for strndup in gnome.h)
+ AC_EGREP_HEADER(strndup,gnome.h,[
+ AC_MSG_RESULT(yes)
+ AC_DEFINE(STRNDUP_IN_GNOME_H, 1,
+ Define if <gnome.h> defines strndup.)],[
+ AC_MSG_RESULT(no)])
],[
AC_MSG_ERROR([Can't find gnome headers. Please install the gnome
developement tools or remove the --enable-gnome option])
* Collection of useful common types and macros definitions
*****************************************************************************
* Copyright (C) 1998, 1999, 2000 VideoLAN
- * $Id: vlc_common.h,v 1.48 2003/01/16 09:02:46 sam Exp $
+ * $Id: vlc_common.h,v 1.49 2003/01/27 22:42:36 sam Exp $
*
* Authors: Samuel Hocevar <sam@via.ecp.fr>
* Vincent Seguin <seguin@via.ecp.fr>
#endif
#ifndef HAVE_STRNDUP
-# define strndup vlc_strndup
- VLC_EXPORT( char *, vlc_strndup, ( const char *s, size_t n ) );
+# if defined(STRNDUP_IN_GNOME_H) && \
+ (defined(MODULE_NAME_IS_gnome)||defined(MODULE_NAME_IS_gnome_main))
+ /* Do nothing: gnome.h defines strndup for us */
+# else
+# define strndup vlc_strndup
+ VLC_EXPORT( char *, vlc_strndup, ( const char *s, size_t n ) );
+# endif
#elif !defined(__PLUGIN__)
# define vlc_strndup NULL
#endif