]> git.sesse.net Git - vlc/commitdiff
* ./evc/config.h, ./msvc/config.h: proper generation of these files using
authorSam Hocevar <sam@videolan.org>
Thu, 16 Jan 2003 12:49:28 +0000 (12:49 +0000)
committerSam Hocevar <sam@videolan.org>
Thu, 16 Jan 2003 12:49:28 +0000 (12:49 +0000)
    information from configure.ac.in. Thanks to Stephane van Hardeveld for
    spotting this.

configure.ac.in
evc/.cvsignore
evc/config.h.in [moved from evc/config.h with 96% similarity]
msvc/.cvsignore
msvc/config.h.in [moved from msvc/config.h with 96% similarity]
toolbox

index 5a10beae6a3da9c63ced6899cc5916d3017e9d10..65b29452419e44177eee4c7739aa399f7c6a393f 100644 (file)
@@ -2763,10 +2763,10 @@ dnl
 dnl  Stuff used by the program
 dnl
 AC_DEFINE_UNQUOTED(VERSION_MESSAGE, "${VERSION} ${CODENAME}", [Simple version string])
-AC_DEFINE_UNQUOTED(COPYRIGHT_MESSAGE, "VideoLAN Client - version ${VERSION} ${CODENAME} - (c) 1996-2002 VideoLAN", [Copyright string])
+AC_DEFINE_UNQUOTED(COPYRIGHT_MESSAGE, "VideoLAN Client - version ${VERSION} ${CODENAME} - (c) 1996-2003 VideoLAN", [Copyright string])
 AC_DEFINE_UNQUOTED(CONFIGURE_LINE, "${CONFIGURE_LINE}", [The ./configure command line])
 
-VLC_SYMBOL="`echo ${VERSION} | tr .- __`"
+VLC_SYMBOL="`echo ${VERSION} | sed -e 'y/.-/__/'`"
 AC_DEFINE_UNQUOTED(MODULE_SUFFIX, "__${VLC_SYMBOL}", [String suffix for module functions])
 AC_DEFINE_UNQUOTED(MODULE_SYMBOL, ${VLC_SYMBOL}, [Symbol suffix for module functions])
 AC_DEFINE_UNQUOTED(LIBEXT, "${LIBEXT}", [Dynamic object extension])
index 9624ccb9ff15d80efcea14e44c68a6db41303a25..75ef1d14d08fd40f95cb44af65cf0c6398619581 100644 (file)
@@ -8,6 +8,7 @@ SH4Dbg
 SH4Rel
 X86EMDbg
 X86EMRel
+config.h
 *.vcp
 *.vcl
 *.vcb
similarity index 96%
rename from evc/config.h
rename to evc/config.h.in
index 7a257432c458f6ae3250c853e07e4e9f4bcc920b..3bf7b6daa4e1d6f4a54988a00c38be5d041f6c64 100644 (file)
@@ -1,5 +1,4 @@
-/* config.h.  Generated by configure.  */
-/* config.h.in.  Generated from configure.ac by autoheader.  */
+/* config.h.in.  Generated by hand.  */
 
 /* Maximum supported data alignment */
 #define ATTRIBUTE_ALIGNED_MAX 16
 #define CAN_COMPILE_SSE 1
 
 /* The ./configure command line */
-#define CONFIGURE_LINE "./configure --disable-dvd"
+#define CONFIGURE_LINE "eMbedded Visual C++"
 
 /* Copyright string */
-#define COPYRIGHT_MESSAGE "VideoLAN Client - version 0.5.0-cvs-am Natalya - (c) 1996-2002 VideoLAN"
+#define COPYRIGHT_MESSAGE "VideoLAN Client - version @VERSION@ @CODENAME@ - (c) 1996-2003 VideoLAN"
 
 /* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP
    systems. This function is required for `alloca.c' support on those systems.
 #define LIBEXT ".dll"
 
 /* String suffix for module functions */
-#define MODULE_SUFFIX "__0_5_0_cvs_am"
+#define MODULE_SUFFIX "__@SYMBOL@"
 
 /* Symbol suffix for module functions */
-#define MODULE_SYMBOL 0_5_0_cvs_am
+#define MODULE_SYMBOL @SYMBOL@
 
 /* Define to 1 if your C compiler doesn't accept -c and -o together. */
 /* #undef NO_MINUS_C_MINUS_O */
 #define PACKAGE_NAME "vlc"
 
 /* Define to the full name and version of this package. */
-#define PACKAGE_STRING "vlc 0.5.0-cvs-am"
+#define PACKAGE_STRING "vlc @VERSION@"
 
 /* Define to the one symbol short name of this package. */
 #define PACKAGE_TARNAME "vlc"
 
 /* Define to the version of this package. */
-#define PACKAGE_VERSION "0.5.0-cvs-am"
+#define PACKAGE_VERSION "@VERSION@"
 
 /* Define if <pthread.h> defines pthread_cond_t. */
 #define PTHREAD_COND_T_IN_PTHREAD_H 1
 #define TIME_WITH_SYS_TIME 1
 
 /* Version number of package */
-#define VERSION "0.5.0-cvs-am"
+#define VERSION "@VERSION@"
 
 /* Simple version string */
-#define VERSION_MESSAGE "0.5.0-cvs-am Natalya"
+#define VERSION_MESSAGE "@VERSION@ @CODENAME@"
 
 /* big endian system */
 /* #undef WORDS_BIGENDIAN */
index 060eb3531bffc33f925b79b5e51def07fcd60370..7b6973ca0092e4a50fa06dfab3903877ddbd4efd 100644 (file)
@@ -1,5 +1,6 @@
 Debug
 Release
+config.h
 *.dsp
 *.ncb
 *.opt
similarity index 96%
rename from msvc/config.h
rename to msvc/config.h.in
index dd33b86ecebd31ba24db95cc79ac02f836a7fcde..b9dbd5f124b4a95b9c175bad9cd7484f505a0726 100644 (file)
@@ -1,5 +1,4 @@
-/* config.h.  Generated by configure.  */
-/* config.h.in.  Generated from configure.ac by autoheader.  */
+/* config.h.in.  Generated by hand.  */
 
 /* Maximum supported data alignment */
 #define ATTRIBUTE_ALIGNED_MAX 16
 #define CAN_COMPILE_SSE 1
 
 /* The ./configure command line */
-#define CONFIGURE_LINE "./configure --disable-dvd"
+#define CONFIGURE_LINE "Visual C++"
 
 /* Copyright string */
-#define COPYRIGHT_MESSAGE "VideoLAN Client - version 0.5.0-cvs-am Natalya - (c) 1996-2002 VideoLAN"
+#define COPYRIGHT_MESSAGE "VideoLAN Client - version @VERSION@ @CODENAME@ - (c) 1996-2003 VideoLAN"
 
 /* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP
    systems. This function is required for `alloca.c' support on those systems.
 #define LIBEXT ".dll"
 
 /* String suffix for module functions */
-#define MODULE_SUFFIX "__0_5_0_cvs_am"
+#define MODULE_SUFFIX "__@SYMBOL@"
 
 /* Symbol suffix for module functions */
-#define MODULE_SYMBOL 0_5_0_cvs_am
+#define MODULE_SYMBOL @SYMBOL@
 
 /* Define to 1 if your C compiler doesn't accept -c and -o together. */
 /* #undef NO_MINUS_C_MINUS_O */
 #define PACKAGE_NAME "vlc"
 
 /* Define to the full name and version of this package. */
-#define PACKAGE_STRING "vlc 0.5.0-cvs-am"
+#define PACKAGE_STRING "vlc @VERSION@"
 
 /* Define to the one symbol short name of this package. */
 #define PACKAGE_TARNAME "vlc"
 
 /* Define to the version of this package. */
-#define PACKAGE_VERSION "0.5.0-cvs-am"
+#define PACKAGE_VERSION "@VERSION@"
 
 /* Define if <pthread.h> defines pthread_cond_t. */
 #define PTHREAD_COND_T_IN_PTHREAD_H 1
 #define TIME_WITH_SYS_TIME 1
 
 /* Version number of package */
-#define VERSION "0.5.0-cvs-am"
+#define VERSION "@VERSION@"
 
 /* Simple version string */
-#define VERSION_MESSAGE "0.5.0-cvs-am Natalya"
+#define VERSION_MESSAGE "@VERSION@ @CODENAME@"
 
 /* big endian system */
 /* #undef WORDS_BIGENDIAN */
diff --git a/toolbox b/toolbox
index fd396d5e950db709740f58f260968caa18348644..e8667adb997c825f9378d831c73bee4dbb185119 100755 (executable)
--- a/toolbox
+++ b/toolbox
@@ -1,7 +1,7 @@
 #! /bin/sh
 
 ##  toolbox for vlc, the VideoLAN Client
-##  $Id: toolbox,v 1.4 2003/01/16 09:00:32 sam Exp $
+##  $Id: toolbox,v 1.5 2003/01/16 12:49:28 sam Exp $
 ##
 ##  Authors: Samuel Hocevar <sam@zoy.org>
 
@@ -75,6 +75,11 @@ then
   #  The evil ^M
   M='\r'
 
+  #  Variables we get from configure.ac.in
+  LIBVLC_VERSION=`sed -ne '/AC_INIT/s/.*,\(.*\))/\1/p' < configure.ac.in`
+  LIBVLC_CODENAME=`sed -ne '/CODENAME=/s/.*"\(.*\)"/\1/p' < configure.ac.in`
+  LIBVLC_SYMBOL=`echo $LIBVLC_VERSION | sed -e 'y/.-/__/'`
+
   #  Sources that get built under Win32 - FIXME: anyone wanna deuglify this? :)
   LIBVLC_SOURCES=`awk 'BEGIN{a=0}{if(!a&&/^'SOURCES_libvlc_common'[^-_a-zA-Z0-9]*=/){a=1;print$0;next;}if(a){if(/^[a-zA-Z]/){exit;}print $0}}' < Makefile.am | tr '\\ ' '\n\n' | sed -ne 's/[^$-_a-zA-Z0-9][^$-_a-zA-Z0-9]*\([a-zA-Z]\)/\1/p';  awk 'BEGIN{a=0}{if(!a&&/^'SOURCES_libvlc_win32'[^-_a-zA-Z0-9]*=/){a=1;print$0;next;}if(a){if(/^[a-zA-Z]/){exit;}print $0}}' < Makefile.am | tr '\\ ' '\n\n' | sed -ne 's/[^$-_a-zA-Z0-9][^$-_a-zA-Z0-9]*\([a-zA-Z]\)/\1/p'; awk 'BEGIN{a=0}{if(!a&&/^'SOURCES_libvlc_dirent'[^-_a-zA-Z0-9]*=/){a=1;print$0;next;}if(a){if(/^[a-zA-Z]/){exit;}print $0}}' < Makefile.am | tr '\\ ' '\n\n' | sed -ne 's/[^$-_a-zA-Z0-9][^$-_a-zA-Z0-9]*\([a-zA-Z]\)/\1/p'; awk 'BEGIN{a=0}{if(!a&&/^'SOURCES_libvlc_getopt'[^-_a-zA-Z0-9]*=/){a=1;print$0;next;}if(a){if(/^[a-zA-Z]/){exit;}print $0}}' < Makefile.am | tr '\\ ' '\n\n' | sed -ne 's/[^$-_a-zA-Z0-9][^$-_a-zA-Z0-9]*\([a-zA-Z]\)/\1/p'; awk 'BEGIN{a=0}{if(!a&&/^'SOURCES_libvlc_libc'[^-_a-zA-Z0-9]*=/){a=1;print$0;next;}if(a){if(/^[a-zA-Z]/){exit;}print $0}}' < Makefile.am | tr '\\ ' '\n\n' | sed -ne 's/[^$-_a-zA-Z0-9][^$-_a-zA-Z0-9]*\([a-zA-Z]\)/\1/p'`
 
@@ -85,6 +90,16 @@ then
   # Clean up
   rm -f evc/*.vcp msvc/*.dsp
 
+  # config files
+  for target in evc/config.h msvc/config.h
+  do
+    echo "${target}"
+    rm -f ${target}
+    sed -e "s/@CODENAME@/${LIBVLC_CODENAME}/" \
+        -e "s/@VERSION@/${LIBVLC_VERSION}/" \
+        -e "s/@SYMBOL@/${LIBVLC_SYMBOL}/" < ${target}.in > ${target}
+  done
+
   # libvlc files
   for target in evc/libvlc.vcp msvc/libvlc.dsp
   do