summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Schleef <ds@schleef.org>2009-02-25 20:47:15 -0800
committerDavid Schleef <ds@schleef.org>2009-02-25 20:47:15 -0800
commit80510aeee70ca73d3102559ce9a919134ce9629e (patch)
tree4d35f11304a672405a06671b7f6de50d68583cd8
parentb264c990747bbe837caf89bad1b6c4924750e9fd (diff)
Change how win32/common/config.h is updated
Generate win32/common/config.h-new directly from config.h.in, using shell variables in configure and some hard-coded information. Change top-level makefile so that 'make win32-update' copies the generated file to win32/common/config.h, which we keep in source control. It's kept in source control so that the git tree is buildable from VS. This change is similar to the one recently applied to GStreamer and gst-plugins-good. The previous config.h file in -good was in pretty bad shape, so unlike core and base, I didn't attempt to leave it strictly the same, but fixed it as necessary. Needs testing I cannot do myself.
-rw-r--r--Makefile.am4
-rw-r--r--configure.ac43
-rw-r--r--win32/common/config.h.in281
3 files changed, 46 insertions, 282 deletions
diff --git a/Makefile.am b/Makefile.am
index 46c6f5bbd..4247a9715 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -55,5 +55,9 @@ check-torture:
true
endif
+win32-update:
+ cp $(top_builddir)/win32/common/config.h-new \
+ $(top_srcdir)/win32/common/config.h
+
include $(top_srcdir)/common/coverage/lcov.mak
diff --git a/configure.ac b/configure.ac
index abc518792..5412d7969 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1143,11 +1143,52 @@ m4/Makefile
docs/Makefile
docs/plugins/Makefile
docs/version.entities
-win32/common/config.h
pkgconfig/Makefile
pkgconfig/gstreamer-plugins-good-uninstalled.pc
gst-plugins-good.spec
)
+
+dnl Create the config.h file for Visual Studio builds
+dnl Beware of spaces and /'s in some of the shell variable contents.
+sed \
+ -e 's/.*config.h.in.*autoheader.*/\/* Autogenerated config.h created for win32 Visual Studio builds *\/\n\n\/* PREFIX -- specifically added for Windows for easier moving *\/\n#define PREFIX "C:\\\\gstreamer"\n\n#define GST_INSTALL_PLUGINS_HELPER PREFIX "\\\\libexec\\\\gst-install-plugins-helper.exe"/' \
+ -e 's/.* GETTEXT_PACKAGE$/#define GETTEXT_PACKAGE "'$GETTEXT_PACKAGE'"/' \
+ -e 's/.* GST_DATADIR$/#define GST_DATADIR PREFIX "\\\\share"/' \
+ -e 's/.* GST_LEVEL_DEFAULT$/#define GST_LEVEL_DEFAULT GST_LEVEL_ERROR/' \
+ -e 's/.* GST_LICENSE$/#define GST_LICENSE "'$GST_LICENSE'"/' \
+ -e 's/.* GST_MAJORMINOR$/#define GST_MAJORMINOR "'$GST_MAJORMINOR'"/' \
+ -e "s,.* GST_PACKAGE_NAME$,#define GST_PACKAGE_NAME \"${GST_PACKAGE_NAME}\"," \
+ -e 's/.* GST_PACKAGE_ORIGIN$/#define GST_PACKAGE_ORIGIN "Unknown package origin"/' \
+ -e 's/.* HAVE_CPU_I386$/#define HAVE_CPU_I386 1/' \
+ -e 's/.* HAVE_FGETPOS$/#define HAVE_FGETPOS 1/' \
+ -e 's/.* HAVE_FSETPOS$/#define HAVE_FSETPOS 1/' \
+ -e 's/.* HAVE_LIBXML2$/#define HAVE_LIBXML2 1/' \
+ -e 's/.* HAVE_PROCESS_H$/#define HAVE_PROCESS_H 1/' \
+ -e 's/.* HAVE_STDLIB_H$/#define HAVE_STDLIB_H 1/' \
+ -e 's/.* HAVE_STRING_H$/#define HAVE_STRING_H 1/' \
+ -e 's/.* HAVE_SYS_STAT_H$/#define HAVE_SYS_STAT_H 1/' \
+ -e 's/.* HAVE_SYS_TYPES_H$/#define HAVE_SYS_TYPES_H 1/' \
+ -e 's/.* HAVE_WIN32$/#define HAVE_WIN32 1/' \
+ -e 's/.* HAVE_WINSOCK2_H$/#define HAVE_WINSOCK2_H 1/' \
+ -e 's/.* HOST_CPU$/#define HOST_CPU "i686"/' \
+ -e 's/.* LIBDIR$/#ifdef _DEBUG\n# define LIBDIR PREFIX "\\\\debug\\\\lib"\n#else\n# define LIBDIR PREFIX "\\\\lib"\n#endif/' \
+ -e 's/.* LOCALEDIR$/#define LOCALEDIR PREFIX "\\\\share\\\\locale"/' \
+ -e "s/.* PACKAGE$/#define PACKAGE \"$PACKAGE\"/" \
+ -e 's/.* PACKAGE_BUGREPORT$/#define PACKAGE_BUGREPORT "http:\/\/bugzilla.gnome.org\/enter_bug.cgi?product=GStreamer"/' \
+ -e "s/.* PACKAGE_NAME$/#define PACKAGE_NAME \"$PACKAGE_NAME\"/" \
+ -e "s/.* PACKAGE_STRING$/#define PACKAGE_STRING \"$PACKAGE_STRING\"/" \
+ -e 's/.* PACKAGE_TARNAME$/#define PACKAGE_TARNAME "'$PACKAGE_TARNAME'"/' \
+ -e 's/.* PACKAGE_VERSION$/#define PACKAGE_VERSION "'$PACKAGE_VERSION'"/' \
+ -e 's/.* PLUGINDIR$/#ifdef _DEBUG\n# define PLUGINDIR PREFIX "\\\\debug\\\\lib\\\\gstreamer-0.10"\n#else\n# define PLUGINDIR PREFIX "\\\\lib\\\\gstreamer-0.10"\n#endif/' \
+ -e 's/.* USE_BINARY_REGISTRY$/#define USE_BINARY_REGISTRY/' \
+ -e 's/.* VERSION$/#define VERSION "'$VERSION'"/' \
+ -e "s/.* DEFAULT_AUDIOSINK$/#define DEFAULT_AUDIOSINK \"directaudiosink\"/" \
+ -e "s/.* DEFAULT_VIDEOSINK$/#define DEFAULT_VIDEOSINK \"directdrawsink\"/" \
+ -e "s/.* DEFAULT_AUDIOSRC$/#define DEFAULT_AUDIOSRC \"audiotestsrc\"/" \
+ -e "s/.* DEFAULT_VIDEOSRC$/#define DEFAULT_VIDEOSRC \"videotestsrc\"/" \
+ -e "s/.* DEFAULT_VISUALIZER$/#define DEFAULT_VISUALIZER \"goom\"/" \
+ config.h.in >win32/common/config.h-new
+
AC_OUTPUT
AG_GST_OUTPUT_PLUGINS
diff --git a/win32/common/config.h.in b/win32/common/config.h.in
deleted file mode 100644
index 21b60390e..000000000
--- a/win32/common/config.h.in
+++ /dev/null
@@ -1,281 +0,0 @@
-/* config.h. Generated by configure. */
-/* config.h.in. Generated from configure.ac by autoheader. */
-
-/* Default audio sink */
-#define DEFAULT_AUDIOSINK "autoaudiosink"
-
-/* Default audio source */
-#define DEFAULT_AUDIOSRC "alsasrc"
-
-/* Default video sink */
-#define DEFAULT_VIDEOSINK "autovideosink"
-
-/* Default video source */
-#define DEFAULT_VIDEOSRC "v4lsrc"
-
-/* Default visualizer */
-#define DEFAULT_VISUALIZER "goom"
-
-/* Define to 1 if translation of program messages to the user's native
- language is requested. */
-#undef ENABLE_NLS
-
-/* gettext package name */
-#define GETTEXT_PACKAGE "@GETTEXT_PACKAGE@"
-
-/* PREFIX - specifically added for Windows for easier moving */
-#define PREFIX "C:\\gstreamer"
-
-/* Defined if gcov is enabled to force a rebuild due to config.h changing */
-/* #undef GST_GCOV_ENABLED */
-
-/* Default errorlevel to use */
-#define GST_LEVEL_DEFAULT GST_LEVEL_ERROR
-
-/* GStreamer license */
-#define GST_LICENSE "@GST_LICENSE@"
-
-/* package name in plugins */
-#define GST_PACKAGE_NAME "@GST_PACKAGE_NAME@"
-
-/* package origin */
-#define GST_PACKAGE_ORIGIN "@GST_PACKAGE_ORIGIN@"
-
-/* support for features: aasink */
-#define HAVE_AALIB
-
-/* support for features: skeldec cmmlenc cmmldec */
-#define HAVE_ANNODEX
-
-/* support for features: cairo */
-#define HAVE_CAIRO
-
-/* support for features: cdio */
-#define HAVE_CDIO
-
-/* Define if the host CPU is an Alpha */
-/* #undef HAVE_CPU_ALPHA */
-
-/* Define if the host CPU is an ARM */
-/* #undef HAVE_CPU_ARM */
-
-/* Define if the host CPU is a HPPA */
-/* #undef HAVE_CPU_HPPA */
-
-/* Define if the host CPU is an x86 */
-#define HAVE_CPU_I386 1
-
-/* Define if the host CPU is a IA64 */
-/* #undef HAVE_CPU_IA64 */
-
-/* Define if the host CPU is a M68K */
-/* #undef HAVE_CPU_M68K */
-
-/* Define if the host CPU is a MIPS */
-/* #undef HAVE_CPU_MIPS */
-
-/* Define if the host CPU is a PowerPC */
-/* #undef HAVE_CPU_PPC */
-
-/* Define if the host CPU is a S390 */
-/* #undef HAVE_CPU_S390 */
-
-/* Define if the host CPU is a SPARC */
-/* #undef HAVE_CPU_SPARC */
-
-/* Define if the host CPU is a x86_64 */
-/* #undef HAVE_CPU_X86_64 */
-
-/* Define if the GNU dcgettext() function is already present or preinstalled.
- */
-#undef HAVE_DCGETTEXT
-
-/* Define to 1 if you have the <dlfcn.h> header file. */
-#undef HAVE_DLFCN_H
-
-/* support for features: dv1394src */
-#define HAVE_DV1394
-
-/* support for features: esdsink */
-#define HAVE_ESD
-
-/* support for features: */
-#define HAVE_EXTERNAL
-
-/* FIONREAD ioctl found in sys/filio.h */
-/* #undef HAVE_FIONREAD_IN_SYS_FILIO */
-
-/* FIONREAD ioctl found in sys/ioclt.h */
-#define HAVE_FIONREAD_IN_SYS_IOCTL 1
-
-/* support for features: flacenc flacdec */
-#define HAVE_FLAC
-
-/* support for features: */
-#define HAVE_GCONF
-
-/* support for features: */
-#define HAVE_GCONFTOOL
-
-/* support for features: gdkpixbufsrc */
-#define HAVE_GDK_PIXBUF
-
-/* Define to 1 if you have the `getpagesize' function. */
-#undef HAVE_GETPAGESIZE
-
-/* Define if the GNU gettext() function is already present or preinstalled. */
-#undef HAVE_GETTEXT
-
-/* support for features: */
-#define HAVE_HAL
-
-/* Define if you have the iconv() function. */
-/* #undef HAVE_ICONV */
-
-/* Define to 1 if you have the <inttypes.h> header file. */
-#undef HAVE_INTTYPES_H
-
-/* support for features: jpegenc jpegdec */
-#define HAVE_JPEG
-
-/* support for features: ladspa */
-#define HAVE_LADSPA
-
-/* support for features: libcaca */
-#define HAVE_LIBCACA
-
-/* support for features: dvdec */
-#define HAVE_LIBDV
-
-/* support for features: pngenc */
-#define HAVE_LIBPNG
-
-/* Define if you have C99's lrint function. */
-#define HAVE_LRINT 1
-
-/* Define if you have C99's lrintf function. */
-#define HAVE_LRINTF 1
-
-/* Define to 1 if you have the <memory.h> header file. */
-#undef HAVE_MEMORY_H
-
-/* Define to 1 if you have a working `mmap' system call. */
-#undef HAVE_MMAP
-
-/* Define to 1 if you have the <netinet/in.h> header file. */
-#undef HAVE_NETINET_IN_H
-
-/* support for features: osssrc osssink */
-#define HAVE_OSS
-
-/* Define if OSS includes are in /machine/ */
-/* #undef HAVE_OSS_INCLUDE_IN_MACHINE */
-
-/* Define if OSS includes are in / */
-/* #undef HAVE_OSS_INCLUDE_IN_ROOT */
-
-/* Define if OSS includes are in /sys/ */
-#define HAVE_OSS_INCLUDE_IN_SYS
-
-/* Define if RDTSC is available */
-#undef HAVE_RDTSC
-
-/* support for features: shout2send */
-#define HAVE_SHOUT2
-
-/* support for features: speex */
-#define HAVE_SPEEX
-
-/* Define to 1 if you have the <stdint.h> header file. */
-#undef HAVE_STDINT_H
-
-/* Define to 1 if you have the <stdlib.h> header file. */
-#define HAVE_STDLIB_H 1
-
-/* Define to 1 if you have the <strings.h> header file. */
-#undef HAVE_STRINGS_H
-
-/* Define to 1 if you have the <string.h> header file. */
-#define HAVE_STRING_H 1
-
-/* support for features: sunaudiosink */
-/* #undef HAVE_SUNAUDIO */
-
-/* Define to 1 if you have the <sys/socket.h> header file. */
-#undef HAVE_SYS_SOCKET_H
-
-/* Define to 1 if you have the <sys/stat.h> header file. */
-#define HAVE_SYS_STAT_H 1
-
-/* Define to 1 if you have the <sys/types.h> header file. */
-#define HAVE_SYS_TYPES_H 1
-
-/* support for features: taglib */
-#define HAVE_TAGLIB
-
-/* Define to 1 if you have the <unistd.h> header file. */
-#undef HAVE_UNISTD_H
-
-/* Define if valgrind should be used */
-#undef HAVE_VALGRIND
-
-/* Define to 1 if you have the <winsock2.h> header file. */
-#define HAVE_WINSOCK2_H 1
-
-/* support for features: ximagesrc */
-#define HAVE_X
-
-/* support for features: */
-#define HAVE_XSHM
-
-/* support for features: */
-#define HAVE_ZLIB
-
-/* gettext locale dir */
-#define LOCALEDIR PREFIX "\\share\\locale"
-
-/* Name of package */
-#define PACKAGE "@PACKAGE@"
-
-/* Define to the address where bug reports for this package should be sent. */
-#define PACKAGE_BUGREPORT "@PACKAGE_BUGREPORT@"
-
-/* Define to the full name of this package. */
-#define PACKAGE_NAME "@PACKAGE_NAME@"
-
-/* Define to the full name and version of this package. */
-#define PACKAGE_STRING "@PACKAGE_STRING@"
-
-/* Define to the one symbol short name of this package. */
-#define PACKAGE_TARNAME "@PACKAGE_TARNAME@"
-
-/* Define to the version of this package. */
-#define PACKAGE_VERSION "@PACKAGE_VERSION@"
-
-/* Define the plugin directory */
-#ifdef _DEBUG
-# define PLUGINDIR PREFIX "\\debug\\lib\\gstreamer-0.10"
-#else
-# define PLUGINDIR PREFIX "\\lib\\gstreamer-0.10"
-#endif
-
-/* defined if speex 1.0.x API detected */
-#define SPEEX_1_0 1
-
-/* Define to 1 if you have the ANSI C header files. */
-#undef STDC_HEADERS
-
-/* Version number of package */
-#define VERSION "@VERSION@"
-
-/* Define to 1 if your processor stores words with the most significant byte
- first (like Motorola and SPARC, unlike Intel and VAX). */
-/* #undef WORDS_BIGENDIAN */
-
-/* Define to 1 if the X Window System is missing or not being used. */
-/* #undef X_DISPLAY_MISSING */
-
-/* Define socklen_t as it seems to be not defined in default VS setup */
-#ifndef socklen_t
-typedef int socklen_t;
-#endif \ No newline at end of file