jimhourihan / gto

Production Kitchen Sink Computer Graphics File Format

This URL has Read+Write access

gto / configure.in
100644 227 lines (182 sloc) 6.189 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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
dnl
dnl Process this file with autoconf to produce a configure script.
dnl
 
dnl ********************** Macro definitions:
 
AC_DEFUN([AC_CXX_NAMESPACES],
[AC_CACHE_CHECK(whether the compiler implements namespaces,
ac_cv_cxx_namespaces,
[AC_LANG_SAVE
 AC_LANG_CPLUSPLUS
 AC_TRY_COMPILE([namespace Outer { namespace Inner { int i = 0; }}],
                [using namespace Outer::Inner; return i;],
 ac_cv_cxx_namespaces=yes, ac_cv_cxx_namespaces=no)
 AC_LANG_RESTORE
])
if test "$ac_cv_cxx_namespaces" = yes; then
  AC_DEFINE(HAVE_NAMESPACES,,[define if the compiler implements namespaces])
fi
])
 
AC_DEFUN([AC_CXX_HAVE_STL],
[AC_CACHE_CHECK(whether the compiler supports Standard Template Library,
ac_cv_cxx_have_stl,
[AC_REQUIRE([AC_CXX_NAMESPACES])
 AC_LANG_SAVE
 AC_LANG_CPLUSPLUS
 AC_TRY_COMPILE([#include <list>
#include <deque>
#ifdef HAVE_NAMESPACES
using namespace std;
#endif],[list<int> x; x.push_back(5);
list<int>::iterator iter = x.begin(); if (iter != x.end()) ++iter; return 0;],
 ac_cv_cxx_have_stl=yes, ac_cv_cxx_have_stl=no)
 AC_LANG_RESTORE
])
if test "$ac_cv_cxx_have_stl" = yes; then
  AC_DEFINE(HAVE_STL,,[define if the compiler supports Standard Template Library])
fi
])
 
dnl ********************** Processing starts here...
 
AC_INIT(Gto, 3.5.3)
dnl AC_PREREQ(2.57)
 
AC_CONFIG_AUX_DIR(config)
 
AM_INIT_AUTOMAKE()
AC_LANG(C++)
AC_PROG_INSTALL
AC_PROG_CXX
 
# Check for fink installed stuff
if test `uname` = Darwin ; then
    CPPFLAGS="$CPPFLAGS -I/sw/include"
    LDFLAGS="$LDFLAGS -L/sw/lib"
fi
 
SHARED_VERSION_INFO="3:5:1"
AC_DISABLE_SHARED()
AC_PROG_LIBTOOL()
 
dnl ********************** ./configure options ***********************
 
AC_ARG_WITH([maya-dir],
            [AC_HELP_STRING([--with-maya-dir=DIR],
                            [Maya install location])],
            [gto_maya_location=$withval])
AC_SUBST(gto_maya_location,$gto_maya_location)
 
AC_ARG_ENABLE([maya-plugin],
          [AC_HELP_STRING([--enable-maya-plugin],
                         [Build GtoIO plugin for Maya (default=no)])],
          [gto_build_maya=$enableval],
          [gto_build_maya=no])
 
AM_CONDITIONAL(GTO_BUILD_MAYA, test "$gto_build_maya" = yes)
 
AC_ARG_WITH([rman-dir],
            [AC_HELP_STRING([--with-rman-dir=DIR],
                            [Renderman® install location])],
            [gto_rman_location=$withval])
AC_SUBST(gto_rman_location,$gto_rman_location)
 
AC_ARG_ENABLE([rman-plugin],
          [AC_HELP_STRING([--enable-rman-plugin],
                         [Build RiGto plugin for RenderMan® (default=no)])],
          [gto_build_rman=$enableval],
          [gto_build_rman=no])
 
AM_CONDITIONAL(GTO_BUILD_RMAN, test "$gto_build_rman" = yes)
 
 
dnl ********************** Basic System Checks ***********************
 
# Checks for header files.
AC_FUNC_ALLOCA
AC_HEADER_STDC
AC_CHECK_HEADERS([float.h malloc.h stdlib.h string.h unistd.h])
 
# Checks for typedefs, structures, and compiler characteristics.
AC_HEADER_STDBOOL
AC_C_CONST
AC_C_INLINE
AC_TYPE_SIZE_T
 
# Checks for library functions.
AC_REPLACE_FNMATCH
AC_FUNC_MALLOC
AC_FUNC_REALLOC
AC_FUNC_STAT
AC_CHECK_FUNCS([regcomp strtol])
 
AC_CHECK_LIB(z, gzopen, [AC_DEFINE(GTO_SUPPORT_ZIP) LIBS="$LIBS -lz"])
AC_CHECK_LIB(tiff, TIFFOpen, [gto_build_gtoimage=yes],[gto_build_gtoimage=no])
 
AM_CONDITIONAL(GTO_BUILD_GTOIMAGE, test "$gto_build_gtoimage" = yes)
 
AC_CXX_HAVE_STL
if test "$ac_cv_cxx_have_stl" = yes; then :; else
    AC_MSG_ERROR(STL Support is required)
fi
 
AC_SUBST([CYCLE_OBJ])
if test `uname` = Linux; then
        # Keeps maya includes from complaining about deprecated #pragmas
        AC_DEFINE( LINUX )
fi
 
AC_MSG_CHECKING(for ios_base)
    AC_TRY_COMPILE(
    [
    #include <iostream>
    ],
    [
    if(std::ios_base::cur);
    ],
    [AC_MSG_RESULT(yes)
    AC_DEFINE(HAVE_FULL_IOSTREAMS)],
    [AC_MSG_RESULT(no)])
 
 
dnl ********************** Maya Checks ***********************
 
if test "$gto_build_maya" = yes; then
 
    if test -e $gto_maya_location/include/maya/MGlobal.h ; then
        AC_SUBST(DEVKIT_LOCATION,$gto_maya_location)
    else
        if test -e $gto_maya_location/../../devkit/include/maya/MGlobal.h ; then
            AC_SUBST(DEVKIT_LOCATION,$gto_maya_location/../../devkit)
        else
            AC_MSG_ERROR("No valid installation of Maya was found.")
        fi
    fi
    AC_MSG_RESULT([Using Maya Location: $gto_maya_location])
    AC_SUBST(MAYA_LOCATION,$gto_maya_location)
else
    AC_SUBST(DEVKIT_LOCATION,../config)
fi
 
 
dnl ********************** Renderman Checks ***********************
 
if test "$gto_build_rman" = yes; then
 
if test -e $gto_rman_location/include/ri.h; then
    AC_MSG_RESULT([Using Renderman® Location: $gto_rman_location])
else
    AC_MSG_ERROR("No valid installation of Renderman® was found.")
fi
 
fi
 
 
dnl ********************** Texi checks
 
AC_CHECK_PROG(HTMLGEN,texi2html,
                      [texi2html -split=chapter -subdir=html],
                      [$MAKEINFO --html --output=html])
 
 
dnl ********************** Output:
 
AC_CONFIG_FILES([Makefile
                 doc/Makefile
                 bin/Makefile
                 bin/gtoinfo/Makefile
                 bin/gtofilter/Makefile
                 bin/gtomerge/Makefile
                 bin/gto2obj/Makefile
                 bin/gtoimage/Makefile
                 bin/RiGtoRibOut/Makefile
                 lib/WFObj/Makefile
                 lib/Gto/Makefile
                 lib/Gto/test/Makefile
                 lib/GtoContainer/Makefile
                 lib/GtoContainer/test/Makefile
                 lib/RiGto/Makefile
                 lib/RiGtoStub/Makefile
                 lib/Makefile
                 plugins/Makefile
                 plugins/maya/Makefile
                 plugins/maya/GtoDeformer/Makefile
                 plugins/maya/gtoIO/Makefile
                 plugins/rman/Makefile
                 ])
 
AC_OUTPUT
 
echo
echo "Configuration: "
if test "$gto_build_maya" = yes; then
echo " Maya Plugins: yes"
echo " Using Maya build config: $DEVKIT_LOCATION/plug-ins/buildconfig"
else
echo " Maya Plugins: no"
fi
 
if test "$gto_build_rman" = yes; then
echo " Renderman Plugins: yes"
else
echo " Renderman Plugins: no"
fi
echo