Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions IlmBase/Half/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,16 @@ EXTRA_DIST = eLut.cpp toFloat.cpp CMakeLists.txt

CLEANFILES = eLut eLut.h toFloat toFloat.h

eLut_SOURCES = eLut.cpp
eLut$(EXEEXT_FOR_BUILD): eLut.cpp
$(CXX_FOR_BUILD) $(CXXFLAGS_FOR_BUILD) $< -o $@

toFloat_SOURCES = toFloat.cpp
toFloat$(EXEEXT_FOR_BUILD): toFloat.cpp
$(CXX_FOR_BUILD) $(CXXFLAGS_FOR_BUILD) $< -o $@

eLut.h: eLut
./eLut > eLut.h
eLut.h: eLut$(EXEEXT_FOR_BUILD)
./$< > $@

toFloat.h: toFloat
./toFloat > toFloat.h
toFloat.h: toFloat$(EXEEXT_FOR_BUILD)
./$< > $@

BUILT_SOURCES = eLut.h toFloat.h

noinst_PROGRAMS = eLut toFloat
2 changes: 2 additions & 0 deletions IlmBase/configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ AC_PROG_CC
AC_PROG_LN_S
AC_PROG_LIBTOOL
AC_PROG_MAKE_SET
AX_CC_FOR_BUILD dnl for EXEEXT_FOR_BUILD not CC_FOR_BUILD
AX_PROG_CXX_FOR_BUILD

dnl
dnl PKGCONFIG preparations
Expand Down
21 changes: 11 additions & 10 deletions OpenEXR/IlmImf/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,9 @@ noinst_HEADERS = ImfCompressor.h \

EXTRA_DIST = $(noinst_HEADERS) b44ExpLogTable.cpp b44ExpLogTable.h dwaLookups.cpp dwaLookups.h CMakeLists.txt

CXXFLAGS_FOR_BUILD = @ILMBASE_CXXFLAGS_FOR_BUILD@ \
-I$(top_srcdir)/config-for-build \
$(ILMBASE_CFLAGS_FOR_BUILD)

AM_CPPFLAGS = @ILMBASE_CXXFLAGS@ \
-I$(top_builddir) \
Expand All @@ -201,18 +204,16 @@ AM_CPPFLAGS = @ILMBASE_CXXFLAGS@ \

CLEANFILES = b44ExpLogTable b44ExpLogTable.h dwaLookups dwaLookups.h

b44ExpLogTable_SOURCES = b44ExpLogTable.cpp
b44ExpLogTable_LDADD = @ILMBASE_LDFLAGS@ $(ILMBASE_LIBS)
b44ExpLogTable$(EXEEXT_FOR_BUILD): b44ExpLogTable.cpp
$(CXX_FOR_BUILD) $(CXXFLAGS_FOR_BUILD) $< -o $@

b44ExpLogTable.h: b44ExpLogTable
./b44ExpLogTable > b44ExpLogTable.h
dwaLookups$(EXEEXT_FOR_BUILD): dwaLookups.cpp
$(CXX_FOR_BUILD) $(CXXFLAGS_FOR_BUILD) $< -o $@

dwaLookups_SOURCES = dwaLookups.cpp
dwaLookups_LDADD = @ILMBASE_LDFLAGS@ $(ILMBASE_LIBS)
dwaLookups.h: dwaLookups$(EXEEXT_FOR_BUILD)
./$< > $@

dwaLookups.h: dwaLookups
./dwaLookups > dwaLookups.h
b44ExpLogTable.h: b44ExpLogTable$(EXEEXT_FOR_BUILD)
./$< > $@

BUILT_SOURCES = b44ExpLogTable.h dwaLookups.h

noinst_PROGRAMS = b44ExpLogTable dwaLookups
7 changes: 7 additions & 0 deletions OpenEXR/config-for-build/Makefile.am
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
## Process this file with automake to produce Makefile.in

configincludedir = $(includedir)/OpenEXR

nodist_configinclude_HEADERS = OpenEXRConfigInternal.h

EXTRA_DIST = OpenEXRConfigInternal.h.in
5 changes: 5 additions & 0 deletions OpenEXR/config-for-build/OpenEXRConfigInternal.h.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
//
// Define if we can use sysconf(_SC_NPROCESSORS_ONLN) to get CPU count
//

#undef OPENEXR_IMF_HAVE_SYSCONF_NPROCESSORS_ONLN
6 changes: 0 additions & 6 deletions OpenEXR/config/OpenEXRConfigInternal.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,6 @@

#undef OPENEXR_IMF_HAVE_COMPLETE_IOMANIP

//
// Define if we can use sysconf(_SC_NPROCESSORS_ONLN) to get CPU count
//

#undef OPENEXR_IMF_HAVE_SYSCONF_NPROCESSORS_ONLN

//
// Define if we can support GCC style inline asm with AVX instructions
//
Expand Down
41 changes: 41 additions & 0 deletions OpenEXR/configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ AC_CANONICAL_HOST
AC_CONFIG_SRCDIR(IlmImfTest/main.cpp)
AC_CONFIG_HEADERS([config/OpenEXRConfig.h])
AC_CONFIG_HEADERS([config/OpenEXRConfigInternal.h])
AC_CONFIG_HEADERS([config-for-build/OpenEXRConfigInternal.h])
AM_INIT_AUTOMAKE(1.6.3) dnl Require automake 1.6.3 or better
AM_MAINTAINER_MODE

Expand All @@ -36,11 +37,24 @@ AC_PROG_CC
AC_PROG_LN_S
AC_PROG_LIBTOOL
AC_PROG_MAKE_SET
AX_CC_FOR_BUILD dnl for EXEEXT_FOR_BUILD not CC_FOR_BUILD
AX_PROG_CXX_FOR_BUILD

dnl
dnl PKGCONFIG preparations
dnl

PKG_PROG_PKG_CONFIG
AC_ARG_VAR([PKG_CONFIG_FOR_BUILD], [path to the build platform's pkg-config utility])
AC_ARG_VAR([PKG_CONFIG_PATH_FOR_BUILD], [directories to add to the build platform's pkg-config's search path])
AC_ARG_VAR([PKG_CONFIG_LIBDIR_FOR_BUILD], [path overriding the build platform's pkg-config's built-in search path])
AC_ARG_WITH(pkg-config,[--with-pkg-config=PATH Specify which pkg-config to use (optional)], PKG_CONFIG="$withval",)
AC_ARG_WITH(pkg-config-for-build,[--with-pkg-config-for-build=PATH Specify which pkg-config to use at build time (optional)], PKG_CONFIG_FOR_BUILD="$withval",)

if [ "x$PKG_CONFIG_FOR_BUILD" = "x" ]; then
PKG_CONFIG_FOR_BUILD=$PKG_CONFIG
fi

dnl Checks for zlib
PKG_CHECK_MODULES([ZLIB], [zlib], [], [AC_CHECK_LIB(z, compress, [:], [AC_MSG_ERROR([
*** OpenEXR requires a recent version of zlib, which you don't appear to have.
Expand All @@ -63,6 +77,19 @@ AM_PATH_PKGCONFIG(
[ilmbase-prefix],
[ILMBASE])

pushdef([PKG_CONFIG], PKG_CONFIG_FOR_BUILD)dnl
AM_PATH_PKGCONFIG(
[ILMBASE_CXXFLAGS_FOR_BUILD],
[ILMBASE_LDFLAGS_FOR_BUILD],
[ILMBASE_LIBS_FOR_BUILD],
[IlmBase],
[OpenEXR],
[],
[-lImath -lHalf -lIlmThread -lIex -lpthread -lz],
[ilmbase-prefix],
[BUILD_ILMBASE])
popdef([PKG_CONFIG])

dnl Define the version string
AC_DEFINE_UNQUOTED([OPENEXR_VERSION_STRING], "${VERSION}", [OpenEXR version string])
AC_DEFINE_UNQUOTED([OPENEXR_PACKAGE_STRING], "${PACKAGE_STRING}", [OpenEXR version string])
Expand Down Expand Up @@ -203,6 +230,13 @@ AC_SUBST(AM_CFLAGS)
AC_SUBST(AM_CXXFLAGS)

dnl Check if sysconf(_SC_NPROCESSORS_ONLN) can be used for CPU count

dnl Use the standard macros, but make them use other variable names
dnl
pushdef([CC], CC_FOR_BUILD)dnl
pushdef([CPP], CPP_FOR_BUILD)dnl
pushdef([CCFLAGS], CCFLAGS_FOR_BUILD)dnl
pushdef([CPPFLAGS], CPPFLAGS_FOR_BUILD)dnl
AC_MSG_CHECKING([for sysconf(_SC_NPROCESSORS_ONLN)])
sysconf_nproc="no"
AC_COMPILE_IFELSE(
Expand All @@ -220,6 +254,13 @@ if test "x${sysconf_nproc}" = xyes ; then
AC_DEFINE([OPENEXR_IMF_HAVE_SYSCONF_NPROCESSORS_ONLN], [1], [Define if sysconf(_SC_NPROCESSORS_ONLN) can be used for CPU count])
fi

dnl Restore the old definitions
dnl
popdef([CC])dnl
popdef([CPP])dnl
popdef([CCFLAGS])dnl
popdef([CPPFLAGS])dnl

dnl Platform-specific stuff
case "$host" in
*linux*)
Expand Down