Added support for building version.rc
authorSam Lantinga <slouken@libsdl.org>
Wed, 18 Jul 2007 04:00:40 +0000
changeset 1644da51f0c28e4
parent 163 f7c68f30c3df
child 165 a853241b7a26
Added support for building version.rc
Makefile.am
configure.in
version.rc
     1.1 --- a/Makefile.am	Wed Jul 18 03:07:37 2007 +0000
     1.2 +++ b/Makefile.am	Wed Jul 18 04:00:40 2007 +0000
     1.3 @@ -23,6 +23,7 @@
     1.4  
     1.5  EXTRA_DIST =			\
     1.6  	CHANGES			\
     1.7 +	version.rc		\
     1.8  	VisualC.zip		\
     1.9  	Xcode.tar.gz		\
    1.10  	MPWmake.sea.bin		\
    1.11 @@ -33,11 +34,23 @@
    1.12  	gcc-fat.sh		\
    1.13  	autogen.sh
    1.14  
    1.15 +if USE_VERSION_RC
    1.16 +libSDL_image_la_LDFLAGS = 	\
    1.17 +	-no-undefined		\
    1.18 +	-release $(LT_RELEASE)	\
    1.19 +	-version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) -Wl,version.o
    1.20 +libSDL_image_la_LIBADD = $(IMG_LIBS)
    1.21 +libSDL_image_la_DEPENDENCIES = version.o
    1.22 +else
    1.23  libSDL_image_la_LDFLAGS = 	\
    1.24  	-no-undefined		\
    1.25  	-release $(LT_RELEASE)	\
    1.26  	-version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)
    1.27  libSDL_image_la_LIBADD = $(IMG_LIBS)
    1.28 +endif
    1.29 +
    1.30 +%.o : %.rc
    1.31 +	$(WINDRES) $< $@
    1.32  
    1.33  noinst_PROGRAMS = showimage
    1.34  
     2.1 --- a/configure.in	Wed Jul 18 03:07:37 2007 +0000
     2.2 +++ b/configure.in	Wed Jul 18 04:00:40 2007 +0000
     2.3 @@ -46,10 +46,16 @@
     2.4  
     2.5  AC_LIBTOOL_WIN32_DLL
     2.6  AM_PROG_LIBTOOL
     2.7 -AC_PROG_MAKE_SET
     2.8  AC_PROG_CC
     2.9  AC_C_INLINE
    2.10  AC_PROG_INSTALL
    2.11 +AC_PROG_MAKE_SET
    2.12 +if test -z "$host_alias"; then
    2.13 +    hostaliaswindres=
    2.14 +else
    2.15 +    hostaliaswindres="$host_alias-windres"
    2.16 +fi
    2.17 +AC_CHECK_PROGS(WINDRES, [windres $hostaliaswindres $host_os-windres])
    2.18  
    2.19  dnl The alpha architecture needs special flags for binary portability
    2.20  case "$host" in
    2.21 @@ -69,8 +75,12 @@
    2.22                  ac_default_prefix=$BUILD_PREFIX
    2.23              fi
    2.24          fi
    2.25 +        if test x$WINDRES != x; then
    2.26 +            use_version_rc=true
    2.27 +        fi
    2.28          ;;
    2.29  esac
    2.30 +AM_CONDITIONAL(USE_VERSION_RC, test x$use_version_rc = xtrue)
    2.31  
    2.32  dnl Check for SDL
    2.33  SDL_VERSION=1.2.10
    2.34 @@ -266,7 +276,8 @@
    2.35  
    2.36  LIBS="$saved_LIBS"
    2.37  
    2.38 -AC_SUBST([IMG_LIBS])
    2.39 +AC_SUBST(WINDRES)
    2.40 +AC_SUBST(IMG_LIBS)
    2.41  
    2.42  # Finally create all the generated files
    2.43  AC_OUTPUT([
     3.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.2 +++ b/version.rc	Wed Jul 18 04:00:40 2007 +0000
     3.3 @@ -0,0 +1,39 @@
     3.4 +#define APSTUDIO_READONLY_SYMBOLS
     3.5 +#include "afxres.h"
     3.6 +#undef APSTUDIO_READONLY_SYMBOLS
     3.7 +
     3.8 +LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
     3.9 +
    3.10 +/////////////////////////////////////////////////////////////////////////////
    3.11 +//
    3.12 +// Version
    3.13 +//
    3.14 +
    3.15 +VS_VERSION_INFO VERSIONINFO
    3.16 + FILEVERSION 1,2,6,0
    3.17 + PRODUCTVERSION 1,2,6,0
    3.18 + FILEFLAGSMASK 0x3fL
    3.19 + FILEFLAGS 0x0L
    3.20 + FILEOS 0x40004L
    3.21 + FILETYPE 0x2L
    3.22 + FILESUBTYPE 0x0L
    3.23 +BEGIN
    3.24 +    BLOCK "StringFileInfo"
    3.25 +    BEGIN
    3.26 +        BLOCK "040904b0"
    3.27 +        BEGIN
    3.28 +            VALUE "CompanyName", "\0"
    3.29 +            VALUE "FileDescription", "SDL_image\0"
    3.30 +            VALUE "FileVersion", "1, 2, 6, 0\0"
    3.31 +            VALUE "InternalName", "SDL_image\0"
    3.32 +            VALUE "LegalCopyright", "Copyright  2007 Sam Lantinga\0"
    3.33 +            VALUE "OriginalFilename", "SDL_image.dll\0"
    3.34 +            VALUE "ProductName", "Simple DirectMedia Layer\0"
    3.35 +            VALUE "ProductVersion", "1, 2, 6, 0\0"
    3.36 +        END
    3.37 +    END
    3.38 +    BLOCK "VarFileInfo"
    3.39 +    BEGIN
    3.40 +        VALUE "Translation", 0x409, 1200
    3.41 +    END
    3.42 +END