Changeset 74764fb415c49ea93dcb9b02caa6b45247fa2978
- Timestamp:
- 23/08/05 16:24:35
(3 years ago)
- Author:
- Christophe Massiot <massiot@videolan.org>
- git-committer:
- Christophe Massiot <massiot@videolan.org> 1124807075 +0000
- git-parent:
[f60342e3528964c12c2afeca60e5380768d3e3e1]
- git-author:
- Christophe Massiot <massiot@videolan.org> 1124807075 +0000
- Message:
- toolbox: Removed compilation information from version.c to reduce the
compilation time.
- configure.ac: Compilation information are now determined at
configure-time. Fixed libSDL_image static linking.
- src/libvlc.c: Removed VLC_CompileTime() since this is not possible
without increasing the compilation time.
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r4465634 |
r74764fb |
|
| 2957 | 2957 | then |
|---|
| 2958 | 2958 | # SDL on Darwin is heavily patched and can only run SDL_image |
|---|
| 2959 | | if test "${SYS}" != "darwin"; then |
|---|
| | 2959 | if test "${SYS}" != "darwin" -a "${SYS}" != "mingw32"; then |
|---|
| 2960 | 2960 | VLC_ADD_PLUGINS([vout_sdl aout_sdl]) |
|---|
| 2961 | 2961 | fi |
|---|
| … | … | |
| 2974 | 2974 | <${SDL_IMAGE}>, Indicate the path of SDL_image.h) |
|---|
| 2975 | 2975 | VLC_ADD_PLUGINS([sdl_image]) |
|---|
| | 2976 | AC_CHECK_LIB(png, png_set_rows, |
|---|
| | 2977 | [VLC_ADD_LDFLAGS([sdl_image],[-lpng -lz])],[],[-lz]) |
|---|
| | 2978 | AC_CHECK_LIB(jpeg, jpeg_start_decompress, |
|---|
| | 2979 | [VLC_ADD_LDFLAGS([sdl_image],[-ljpeg])]) |
|---|
| | 2980 | AC_CHECK_LIB(tiff, TIFFClientOpen, |
|---|
| | 2981 | [VLC_ADD_LDFLAGS([sdl_image],[-ltiff])]) |
|---|
| 2976 | 2982 | VLC_ADD_LDFLAGS([sdl_image], [-lSDL_image])], |
|---|
| 2977 | 2983 | [ AC_CHECK_HEADERS(SDL_image.h, AC_DEFINE(SDL_IMAGE_INCLUDE_FILE, <SDL_image.h>, |
|---|
| … | … | |
| 2987 | 2993 | --disable-sdl.]) |
|---|
| 2988 | 2994 | fi |
|---|
| | 2995 | |
|---|
| 2989 | 2996 | elif test "${enable_sdl}" = "yes" |
|---|
| 2990 | 2997 | then |
|---|
| … | … | |
| 4473 | 4480 | AC_SUBST(VERSION_MINOR) |
|---|
| 4474 | 4481 | AC_SUBST(VERSION_REVISION) |
|---|
| | 4482 | AC_DEFINE_UNQUOTED(VLC_COMPILE_BY, "`whoami`", [user who ran configure]) |
|---|
| | 4483 | AC_DEFINE_UNQUOTED(VLC_COMPILE_HOST, "`hostname`", [host which ran configure]) |
|---|
| | 4484 | AC_DEFINE_UNQUOTED(VLC_COMPILE_DOMAIN, "`dnsdomainname 2>/dev/null || domainname 2>/dev/null || echo unknown`", [domain of the host which ran configure]) |
|---|
| | 4485 | AC_DEFINE_UNQUOTED(VLC_COMPILER, "`$CC -v 2>&1 | tail -n 1`", [compiler]) |
|---|
| 4475 | 4486 | |
|---|
| 4476 | 4487 | dnl Old definitions for version-dependant plugins |
|---|
| … | … | |
| 4479 | 4490 | dnl AC_DEFINE_UNQUOTED(MODULE_SYMBOL, ${VLC_SYMBOL}, [Symbol suffix for module functions]) |
|---|
| 4480 | 4491 | |
|---|
| 4481 | | dnl New definitions with value matching 0.8.2 release |
|---|
| | 4492 | dnl New definitions with value matching 0.8.4 release |
|---|
| 4482 | 4493 | module_symbol="0_8_4" |
|---|
| 4483 | 4494 | AC_DEFINE_UNQUOTED(MODULE_SUFFIX, "__${module_symbol}", [String suffix for module functions]) |
|---|
| rc7880af |
r74764fb |
|
| 1095 | 1095 | *****************************************************************************/ |
|---|
| 1096 | 1096 | VLC_EXPORT( const char *, VLC_Version, ( void ) ); |
|---|
| 1097 | | VLC_EXPORT( const char *, VLC_CompileTime, ( void ) ); |
|---|
| 1098 | 1097 | VLC_EXPORT( const char *, VLC_CompileBy, ( void ) ); |
|---|
| 1099 | 1098 | VLC_EXPORT( const char *, VLC_CompileHost, ( void ) ); |
|---|
| rd80b925 |
r74764fb |
|
| 371 | 371 | playlist_item_t* playlist_ItemNewWithType (vlc_object_t *,const char *,const char *, int); |
|---|
| 372 | 372 | void __config_PutPsz (vlc_object_t *, const char *, const char *); |
|---|
| 373 | | const char * VLC_CompileTime (void); |
|---|
| 374 | 373 | vlm_schedule_t * vlm_ScheduleNew (vlm_t *, char *); |
|---|
| 375 | 374 | void net_Close (int fd); |
|---|
| … | … | |
| 832 | 831 | const char * (*VLC_CompileHost_inner) (void); |
|---|
| 833 | 832 | const char * (*VLC_Version_inner) (void); |
|---|
| 834 | | const char * (*VLC_CompileTime_inner) (void); |
|---|
| | 833 | void *VLC_CompileTime_deprecated; |
|---|
| 835 | 834 | int (*playlist_PreparseEnqueueItem_inner) (playlist_t *, playlist_item_t *); |
|---|
| 836 | 835 | struct dirent * (*vlc_readdir_wrapper_inner) (void *); |
|---|
| … | … | |
| 1234 | 1233 | # define VLC_CompileHost (p_symbols)->VLC_CompileHost_inner |
|---|
| 1235 | 1234 | # define VLC_Version (p_symbols)->VLC_Version_inner |
|---|
| 1236 | | # define VLC_CompileTime (p_symbols)->VLC_CompileTime_inner |
|---|
| 1237 | 1235 | # define playlist_PreparseEnqueueItem (p_symbols)->playlist_PreparseEnqueueItem_inner |
|---|
| 1238 | 1236 | # define vlc_readdir_wrapper (p_symbols)->vlc_readdir_wrapper_inner |
|---|
| … | … | |
| 1639 | 1637 | ((p_symbols)->VLC_CompileHost_inner) = VLC_CompileHost; \ |
|---|
| 1640 | 1638 | ((p_symbols)->VLC_Version_inner) = VLC_Version; \ |
|---|
| 1641 | | ((p_symbols)->VLC_CompileTime_inner) = VLC_CompileTime; \ |
|---|
| 1642 | 1639 | ((p_symbols)->playlist_PreparseEnqueueItem_inner) = playlist_PreparseEnqueueItem; \ |
|---|
| 1643 | 1640 | ((p_symbols)->vlc_readdir_wrapper_inner) = vlc_readdir_wrapper; \ |
|---|
| … | … | |
| 1648 | 1645 | (p_symbols)->__osd_VolumeDown_deprecated = NULL; \ |
|---|
| 1649 | 1646 | (p_symbols)->__osd_VolumeUp_deprecated = NULL; \ |
|---|
| | 1647 | (p_symbols)->VLC_CompileTime_deprecated = NULL; \ |
|---|
| 1650 | 1648 | |
|---|
| 1651 | 1649 | # endif /* __PLUGIN__ */ |
|---|
| rd80b925 |
r74764fb |
|
| 480 | 480 | E_(mvar_AppendNewVar)( p_args->vars, "version", VLC_Version() ); |
|---|
| 481 | 481 | E_(mvar_AppendNewVar)( p_args->vars, "copyright", COPYRIGHT_MESSAGE ); |
|---|
| 482 | | E_(mvar_AppendNewVar)( p_args->vars, "vlc_compile_time", |
|---|
| 483 | | VLC_CompileTime() ); |
|---|
| 484 | 482 | E_(mvar_AppendNewVar)( p_args->vars, "vlc_compile_by", VLC_CompileBy() ); |
|---|
| 485 | 483 | E_(mvar_AppendNewVar)( p_args->vars, "vlc_compile_host", |
|---|
| re67ac81 |
r74764fb |
|
| 140 | 140 | |
|---|
| 141 | 141 | /***************************************************************************** |
|---|
| 142 | | * VLC_CompileTime, VLC_CompileBy, VLC_CompileHost, VLC_CompileDomain, |
|---|
| | 142 | * VLC_CompileBy, VLC_CompileHost, VLC_CompileDomain, |
|---|
| 143 | 143 | * VLC_Compiler, VLC_Changeset |
|---|
| 144 | 144 | *****************************************************************************/ |
|---|
| 145 | 145 | #define DECLARE_VLC_VERSION( func, var ) \ |
|---|
| 146 | | extern const char psz_vlc_##var []; \ |
|---|
| 147 | 146 | char const * VLC_##func ( void ) \ |
|---|
| 148 | 147 | { \ |
|---|
| 149 | | return psz_vlc_##var ; \ |
|---|
| 150 | | } |
|---|
| 151 | | |
|---|
| 152 | | DECLARE_VLC_VERSION( CompileTime, compile_time ); |
|---|
| 153 | | DECLARE_VLC_VERSION( CompileBy, compile_by ); |
|---|
| 154 | | DECLARE_VLC_VERSION( CompileHost, compile_host ); |
|---|
| 155 | | DECLARE_VLC_VERSION( CompileDomain, compile_domain ); |
|---|
| 156 | | DECLARE_VLC_VERSION( Compiler, compiler ); |
|---|
| 157 | | DECLARE_VLC_VERSION( Changeset, changeset ); |
|---|
| | 148 | return VLC_##var ; \ |
|---|
| | 149 | } |
|---|
| | 150 | |
|---|
| | 151 | DECLARE_VLC_VERSION( CompileBy, COMPILE_BY ); |
|---|
| | 152 | DECLARE_VLC_VERSION( CompileHost, COMPILE_HOST ); |
|---|
| | 153 | DECLARE_VLC_VERSION( CompileDomain, COMPILE_HOST ); |
|---|
| | 154 | DECLARE_VLC_VERSION( Compiler, COMPILER ); |
|---|
| | 155 | |
|---|
| | 156 | extern const char psz_vlc_changeset[]; |
|---|
| | 157 | char const * VLC_Changeset( void ) |
|---|
| | 158 | { |
|---|
| | 159 | return psz_vlc_changeset; |
|---|
| | 160 | } |
|---|
| 158 | 161 | |
|---|
| 159 | 162 | /***************************************************************************** |
|---|
| … | … | |
| 2393 | 2396 | |
|---|
| 2394 | 2397 | fprintf( stdout, _("VLC version %s\n"), VLC_Version() ); |
|---|
| 2395 | | fprintf( stdout, _("Compiled on %s by %s@%s.%s\n"), VLC_CompileTime(), |
|---|
| | 2398 | fprintf( stdout, _("Compiled by %s@%s.%s\n"), |
|---|
| 2396 | 2399 | VLC_CompileBy(), VLC_CompileHost(), VLC_CompileDomain() ); |
|---|
| 2397 | 2400 | fprintf( stdout, _("Compiler: %s\n"), VLC_Compiler() ); |
|---|
| 2398 | | if( *VLC_Changeset() ) |
|---|
| | 2401 | if( strcmp( VLC_Changeset(), "exported" ) ) |
|---|
| 2399 | 2402 | fprintf( stdout, _("Based upon svn changeset [%s]\n"), |
|---|
| 2400 | 2403 | VLC_Changeset() ); |
|---|
| r0d7fde9 |
r74764fb |
|
| 445 | 445 | fi |
|---|
| 446 | 446 | |
|---|
| 447 | | VLC_COMPILE_TIME=`LC_ALL=C LANG=C date` |
|---|
| 448 | | VLC_COMPILE_BY=`whoami` |
|---|
| 449 | | VLC_COMPILE_HOST=`hostname` |
|---|
| 450 | | VLC_COMPILE_DOMAIN=`dnsdomainname 2>/dev/null || domainname 2>/dev/null || echo unknown` |
|---|
| 451 | | VLC_COMPILER=`$CC -v 2>&1 | tail -n 1` |
|---|
| | 447 | file="${builddir}/src/misc/version.c" |
|---|
| 452 | 448 | if which svnversion 2>&1 >/dev/null; then |
|---|
| 453 | 449 | VLC_CHANGESET=`svnversion $srcdir` |
|---|
| … | … | |
| 456 | 452 | fi |
|---|
| 457 | 453 | |
|---|
| 458 | | cat >| src/misc/version.c << EOF |
|---|
| | 454 | cat >| ${file}.tmp << EOF |
|---|
| 459 | 455 | /* DO NOT EDIT THIS FILE - IT IS REGENERATED AT EVERY COMPILE - |
|---|
| 460 | | * IT GIVES BETTER TRACKING OFF VLC STABLE AND DEVELOPMENT VERSIONS |
|---|
| 461 | | * WETHER THEY ARE BUILD BY OTHERS OR DURING DEVELOPMENT OR FOR THE |
|---|
| | 456 | * IT GIVES BETTER TRACKING OF VLC STABLE AND DEVELOPMENT VERSIONS |
|---|
| | 457 | * WHETHER THEY ARE BUILT BY OTHERS OR DURING DEVELOPMENT OR FOR THE |
|---|
| 462 | 458 | * OFFICIAL VLC STABLE RELEASES. |
|---|
| 463 | 459 | */ |
|---|
| 464 | | const char psz_vlc_compile_time[] = "${VLC_COMPILE_TIME}"; |
|---|
| 465 | | const char psz_vlc_compile_by[] = "${VLC_COMPILE_BY}"; |
|---|
| 466 | | const char psz_vlc_compile_host[] = "${VLC_COMPILE_HOST}"; |
|---|
| 467 | | const char psz_vlc_compile_domain[] = "${VLC_COMPILE_DOMAIN}"; |
|---|
| 468 | | const char psz_vlc_compiler[] = "${VLC_COMPILER}"; |
|---|
| 469 | 460 | const char psz_vlc_changeset[] = "${VLC_CHANGESET}"; |
|---|
| 470 | 461 | |
|---|
| 471 | 462 | EOF |
|---|
| | 463 | if diff >/dev/null 2>&1 ${file} ${file}.tmp |
|---|
| | 464 | then |
|---|
| | 465 | rm -f ${file}.tmp |
|---|
| | 466 | else |
|---|
| | 467 | echo "creating new ${file}" |
|---|
| | 468 | mv -f ${file}.tmp ${file} |
|---|
| | 469 | fi |
|---|
| | 470 | |
|---|
| | 471 | exit 0 |
|---|
| 472 | 472 | fi |
|---|
| 473 | 473 | |
|---|