Skip to content

Commit

Permalink
Added support for building version.rc
Browse files Browse the repository at this point in the history
  • Loading branch information
slouken committed Jul 18, 2007
1 parent c893709 commit 7763cb2
Show file tree
Hide file tree
Showing 3 changed files with 65 additions and 2 deletions.
13 changes: 13 additions & 0 deletions Makefile.am
Expand Up @@ -23,6 +23,7 @@ libSDL_image_la_SOURCES = \

EXTRA_DIST = \
CHANGES \
version.rc \
VisualC.zip \
Xcode.tar.gz \
MPWmake.sea.bin \
Expand All @@ -33,11 +34,23 @@ EXTRA_DIST = \
gcc-fat.sh \
autogen.sh

if USE_VERSION_RC
libSDL_image_la_LDFLAGS = \
-no-undefined \
-release $(LT_RELEASE) \
-version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) -Wl,version.o
libSDL_image_la_LIBADD = $(IMG_LIBS)
libSDL_image_la_DEPENDENCIES = version.o
else
libSDL_image_la_LDFLAGS = \
-no-undefined \
-release $(LT_RELEASE) \
-version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)
libSDL_image_la_LIBADD = $(IMG_LIBS)
endif

%.o : %.rc
$(WINDRES) $< $@

noinst_PROGRAMS = showimage

Expand Down
15 changes: 13 additions & 2 deletions configure.in
Expand Up @@ -46,10 +46,16 @@ dnl Check for tools

AC_LIBTOOL_WIN32_DLL
AM_PROG_LIBTOOL
AC_PROG_MAKE_SET
AC_PROG_CC
AC_C_INLINE
AC_PROG_INSTALL
AC_PROG_MAKE_SET
if test -z "$host_alias"; then
hostaliaswindres=
else
hostaliaswindres="$host_alias-windres"
fi
AC_CHECK_PROGS(WINDRES, [windres $hostaliaswindres $host_os-windres])

dnl The alpha architecture needs special flags for binary portability
case "$host" in
Expand All @@ -69,8 +75,12 @@ case "$host" in
ac_default_prefix=$BUILD_PREFIX
fi
fi
if test x$WINDRES != x; then
use_version_rc=true
fi
;;
esac
AM_CONDITIONAL(USE_VERSION_RC, test x$use_version_rc = xtrue)

dnl Check for SDL
SDL_VERSION=1.2.10
Expand Down Expand Up @@ -266,7 +276,8 @@ fi

LIBS="$saved_LIBS"

AC_SUBST([IMG_LIBS])
AC_SUBST(WINDRES)
AC_SUBST(IMG_LIBS)

# Finally create all the generated files
AC_OUTPUT([
Expand Down
39 changes: 39 additions & 0 deletions version.rc
@@ -0,0 +1,39 @@
#define APSTUDIO_READONLY_SYMBOLS
#include "afxres.h"
#undef APSTUDIO_READONLY_SYMBOLS

LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US

/////////////////////////////////////////////////////////////////////////////
//
// Version
//

VS_VERSION_INFO VERSIONINFO
FILEVERSION 1,2,6,0
PRODUCTVERSION 1,2,6,0
FILEFLAGSMASK 0x3fL
FILEFLAGS 0x0L
FILEOS 0x40004L
FILETYPE 0x2L
FILESUBTYPE 0x0L
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904b0"
BEGIN
VALUE "CompanyName", "\0"
VALUE "FileDescription", "SDL_image\0"
VALUE "FileVersion", "1, 2, 6, 0\0"
VALUE "InternalName", "SDL_image\0"
VALUE "LegalCopyright", "Copyright � 2007 Sam Lantinga\0"
VALUE "OriginalFilename", "SDL_image.dll\0"
VALUE "ProductName", "Simple DirectMedia Layer\0"
VALUE "ProductVersion", "1, 2, 6, 0\0"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x409, 1200
END
END

0 comments on commit 7763cb2

Please sign in to comment.