Changeset 74764fb415c49ea93dcb9b02caa6b45247fa2978

Show
Ignore:
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
  • configure.ac

    r4465634 r74764fb  
    29572957  then 
    29582958    # 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 
    29602960      VLC_ADD_PLUGINS([vout_sdl aout_sdl]) 
    29612961    fi 
     
    29742974      <${SDL_IMAGE}>, Indicate the path of SDL_image.h) 
    29752975      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])]) 
    29762982      VLC_ADD_LDFLAGS([sdl_image], [-lSDL_image])], 
    29772983      [ AC_CHECK_HEADERS(SDL_image.h, AC_DEFINE(SDL_IMAGE_INCLUDE_FILE, <SDL_image.h>, 
     
    29872993--disable-sdl.]) 
    29882994    fi 
     2995 
    29892996  elif test "${enable_sdl}" =  "yes" 
    29902997  then 
     
    44734480AC_SUBST(VERSION_MINOR) 
    44744481AC_SUBST(VERSION_REVISION) 
     4482AC_DEFINE_UNQUOTED(VLC_COMPILE_BY, "`whoami`", [user who ran configure])  
     4483AC_DEFINE_UNQUOTED(VLC_COMPILE_HOST, "`hostname`", [host which ran configure])  
     4484AC_DEFINE_UNQUOTED(VLC_COMPILE_DOMAIN, "`dnsdomainname 2>/dev/null || domainname 2>/dev/null || echo unknown`", [domain of the host which ran configure])  
     4485AC_DEFINE_UNQUOTED(VLC_COMPILER, "`$CC -v 2>&1 | tail -n 1`", [compiler])  
    44754486 
    44764487dnl Old definitions for version-dependant plugins 
     
    44794490dnl AC_DEFINE_UNQUOTED(MODULE_SYMBOL, ${VLC_SYMBOL}, [Symbol suffix for module functions]) 
    44804491 
    4481 dnl New definitions with value matching 0.8.2 release 
     4492dnl New definitions with value matching 0.8.4 release 
    44824493module_symbol="0_8_4" 
    44834494AC_DEFINE_UNQUOTED(MODULE_SUFFIX, "__${module_symbol}", [String suffix for module functions]) 
  • include/vlc_common.h

    rc7880af r74764fb  
    10951095 *****************************************************************************/ 
    10961096VLC_EXPORT( const char *, VLC_Version, ( void ) ); 
    1097 VLC_EXPORT( const char *, VLC_CompileTime, ( void ) ); 
    10981097VLC_EXPORT( const char *, VLC_CompileBy, ( void ) ); 
    10991098VLC_EXPORT( const char *, VLC_CompileHost, ( void ) ); 
  • include/vlc_symbols.h

    rd80b925 r74764fb  
    371371playlist_item_t* playlist_ItemNewWithType (vlc_object_t *,const char *,const char *, int); 
    372372void __config_PutPsz (vlc_object_t *, const char *, const char *); 
    373 const char * VLC_CompileTime (void); 
    374373vlm_schedule_t * vlm_ScheduleNew (vlm_t *, char *); 
    375374void net_Close (int fd); 
     
    832831    const char * (*VLC_CompileHost_inner) (void); 
    833832    const char * (*VLC_Version_inner) (void); 
    834     const char * (*VLC_CompileTime_inner) (void)
     833    void *VLC_CompileTime_deprecated
    835834    int (*playlist_PreparseEnqueueItem_inner) (playlist_t *, playlist_item_t *); 
    836835    struct dirent * (*vlc_readdir_wrapper_inner) (void *); 
     
    12341233#  define VLC_CompileHost (p_symbols)->VLC_CompileHost_inner 
    12351234#  define VLC_Version (p_symbols)->VLC_Version_inner 
    1236 #  define VLC_CompileTime (p_symbols)->VLC_CompileTime_inner 
    12371235#  define playlist_PreparseEnqueueItem (p_symbols)->playlist_PreparseEnqueueItem_inner 
    12381236#  define vlc_readdir_wrapper (p_symbols)->vlc_readdir_wrapper_inner 
     
    16391637    ((p_symbols)->VLC_CompileHost_inner) = VLC_CompileHost; \ 
    16401638    ((p_symbols)->VLC_Version_inner) = VLC_Version; \ 
    1641     ((p_symbols)->VLC_CompileTime_inner) = VLC_CompileTime; \ 
    16421639    ((p_symbols)->playlist_PreparseEnqueueItem_inner) = playlist_PreparseEnqueueItem; \ 
    16431640    ((p_symbols)->vlc_readdir_wrapper_inner) = vlc_readdir_wrapper; \ 
     
    16481645    (p_symbols)->__osd_VolumeDown_deprecated = NULL; \ 
    16491646    (p_symbols)->__osd_VolumeUp_deprecated = NULL; \ 
     1647    (p_symbols)->VLC_CompileTime_deprecated = NULL; \ 
    16501648 
    16511649#  endif /* __PLUGIN__ */ 
  • modules/control/http/http.c

    rd80b925 r74764fb  
    480480        E_(mvar_AppendNewVar)( p_args->vars, "version", VLC_Version() ); 
    481481        E_(mvar_AppendNewVar)( p_args->vars, "copyright", COPYRIGHT_MESSAGE ); 
    482         E_(mvar_AppendNewVar)( p_args->vars, "vlc_compile_time", 
    483                            VLC_CompileTime() ); 
    484482        E_(mvar_AppendNewVar)( p_args->vars, "vlc_compile_by", VLC_CompileBy() ); 
    485483        E_(mvar_AppendNewVar)( p_args->vars, "vlc_compile_host", 
  • src/libvlc.c

    re67ac81 r74764fb  
    140140 
    141141/***************************************************************************** 
    142  * VLC_CompileTime, VLC_CompileBy, VLC_CompileHost, VLC_CompileDomain, 
     142 * VLC_CompileBy, VLC_CompileHost, VLC_CompileDomain, 
    143143 * VLC_Compiler, VLC_Changeset 
    144144 *****************************************************************************/ 
    145145#define DECLARE_VLC_VERSION( func, var )                                    \ 
    146 extern const char psz_vlc_##var [];                                         \ 
    147146char const * VLC_##func ( void )                                            \ 
    148147{                                                                           \ 
    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 
     151DECLARE_VLC_VERSION( CompileBy, COMPILE_BY ); 
     152DECLARE_VLC_VERSION( CompileHost, COMPILE_HOST ); 
     153DECLARE_VLC_VERSION( CompileDomain, COMPILE_HOST ); 
     154DECLARE_VLC_VERSION( Compiler, COMPILER ); 
     155 
     156extern const char psz_vlc_changeset[]; 
     157char const * VLC_Changeset( void ) 
     158
     159    return psz_vlc_changeset; 
     160
    158161 
    159162/***************************************************************************** 
     
    23932396 
    23942397    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"), 
    23962399             VLC_CompileBy(), VLC_CompileHost(), VLC_CompileDomain() ); 
    23972400    fprintf( stdout, _("Compiler: %s\n"), VLC_Compiler() ); 
    2398     if( *VLC_Changeset() ) 
     2401    if( strcmp( VLC_Changeset(), "exported" ) ) 
    23992402        fprintf( stdout, _("Based upon svn changeset [%s]\n"), 
    24002403                 VLC_Changeset() ); 
  • toolbox

    r0d7fde9 r74764fb  
    445445  fi 
    446446 
    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" 
    452448  if which svnversion 2>&1 >/dev/null; then 
    453449    VLC_CHANGESET=`svnversion $srcdir` 
     
    456452  fi 
    457453 
    458   cat >| src/misc/version.c << EOF 
     454  cat >| ${file}.tmp << EOF 
    459455/* 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 
    462458 * OFFICIAL VLC STABLE RELEASES. 
    463459 */ 
    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}"; 
    469460const char psz_vlc_changeset[] = "${VLC_CHANGESET}"; 
    470461 
    471462EOF 
     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 
    472472fi 
    473473