summaryrefslogtreecommitdiffstats
path: root/configure.ac
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 /configure.ac
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.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac43
1 files changed, 42 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index abc51879..5412d796 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