forked from QianMo/GPU-Gems-Book-Source-Code
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfigure.ac
More file actions
65 lines (53 loc) · 1.28 KB
/
configure.ac
File metadata and controls
65 lines (53 loc) · 1.28 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
dnl Process this file with autoconf to produce a configure script.
AC_INIT(exrplay/main.cpp)
dnl Checks for target
AC_CANONICAL_TARGET
OPENEXRGEMS_MAJOR_VERSION=1
OPENEXRGEMS_MINOR_VERSION=0
OPENEXRGEMS_MICRO_VERSION=0
OPENEXRGEMS_VERSION=$OPENEXRGEMS_MAJOR_VERSION.$OPENEXRGEMS_MINOR_VERSION.${OPENEXRGEMS_MICRO_VERSION}
AC_SUBST(OPENEXR_VERSION)
dnl GNU automake support.
AM_INIT_AUTOMAKE(OpenEXRGems, ${OPENEXRGEMS_VERSION})
AM_MAINTAINER_MODE
dnl Checks for programs.
AC_PROG_CXX
AC_PROG_INSTALL
AC_PROG_CC
AC_PROG_LN_S
AC_PROG_LIBTOOL
AC_PROG_MAKE_SET
dnl
dnl check for OpenEXR
dnl
AM_PATH_OPENEXR(,
AC_MSG_ERROR([
***
*** Can't build OpenEXR Gems because they require the OpenEXR libraries
*** and include files.
]))
dnl
dnl check for Cg libraries and headers.
dnl
AM_PATH_CG(,
AC_MSG_ERROR([
*** Can't build OpenEXR Gems because they require the Cg libraries and
*** include files.
]))
dnl
dnl Optimization flags
dnl
AC_MSG_CHECKING(for compiler optimization flags)
old_cflags=$CFLAGS
CFLAGS="$CFLAGS -O2 -funroll-loops -pipe"
AC_TRY_COMPILE([#include <stdio.h>],
[ printf ("hello, world"); ],
[ EXTRA_OPT_CFLAGS="-O2 -funroll-loops -pipe"],[ EXTRA_OPT_CFLAGS=""])
CFLAGS=$old_cflags
AC_MSG_RESULT([$EXTRA_OPT_CFLAGS])
AC_OUTPUT([
Makefile
Glut/Makefile
exrplay/Makefile
exrcomp/Makefile
])