File: configure.in

package info (click to toggle)
yafray 0.0.7-2
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 4,036 kB
  • ctags: 3,461
  • sloc: cpp: 21,032; sh: 8,321; makefile: 205
file content (146 lines) | stat: -rwxr-xr-x 3,404 bytes parent folder | download
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
AC_INIT(src/yafraycore/light.h)
AM_INIT_AUTOMAKE(yafray,0.0.7)
AM_CONFIG_HEADER(config.h)
AC_DISABLE_STATIC 
AM_DISABLE_STATIC
AC_PROG_CXX
AC_PROG_CC 
AC_PROG_CPP 
AC_PROG_CXXCPP
AC_PROG_INSTALL
dnl AC_PROG_RANLIB
AM_PROG_LIBTOOL

PIXBUF=no
NODOUBLE=1

dnl AC_CHECK_LIB(gtk,gtk_main,HAVE_GTK=1,HAVE_GTK=0,-lgdk)
dnl if test $HAVE_GTK = 1 ; then 
dnl 	AC_CHECK_LIB(gdk_pixbuf,gdk_pixbuf_render_to_drawable,HAVE_PIX=1,
dnl 							HAVE_PIX=0,-lgtk -lgdk)
dnl 	if test $HAVE_PIX = 1 ; then
dnl 		AC_CHECK_PROG(GTKCONF,gtk-config,yes,no)
dnl 		if test $GTKCONF = yes ; then
dnl 			AC_CHECK_PROG(PIXBUFCONF,gdk-pixbuf-config,yes,no)
dnl 			if test $PIXBUFCONF = no ; then
dnl 				echo Cannot find gdk-pixbuf-config program
dnl 			else
dnl 				PIXBUF=yes
dnl 			fi
dnl 		else
dnl 			echo Cannot find gtk-config program
dnl 		fi
dnl 	else
dnl 		echo You need gdk_pixbuf installed to use GTK output
dnl 	fi
dnl else
dnl echo You need GTK installed to use GTK output
dnl fi


AC_CHECK_LIB(jpeg,jpeg_read_header,HAVE_JPG=1,HAVE_JPG=0,-ljpeg)
if test $HAVE_JPG = 0 ; then 
	echo Jpeg shared library not found
else
	AC_CHECK_HEADER(jpeglib.h,HAVE_JPG=1,HAVE_JPG=0)
	if test $HAVE_JPG = 0 ; then
		echo Jpeg header files not found
	fi

fi

AC_CHECK_LIB(z,gzopen,HAVE_ZLIB=1,HAVE_ZLIB=0)
if test $HAVE_ZLIB = 1 ; then
	AC_CHECK_HEADER(zlib.h,HAVE_ZLIB=1,HAVE_ZLIB=0)
fi

AC_CHECK_LIB(pthread,pthread_self,HAVE_PT=1,HAVE_PT=0)
if test $HAVE_PT = 1 ; then
	AC_CHECK_HEADER(pthread.h,HAVE_PT=1,HAVE_PT=0)
fi

AC_ARG_ENABLE(doublecoords,
	[  --enable-doublecoords   Use double precision floats for 3d world],
	NODOUBLE=0,NODOUBLE=1)


if test $NODOUBLE = 1 ; then
	PTYPE=float
	dnl AC_DEFINE(PFLOAT,float,"float type for points")
	AC_DEFINE(MIN_RAYDIST,0.000005,"minimal ray dist to hit an object")
else
	PTYPE=double
	dnl AC_DEFINE(PFLOAT,double,"float type for points")
	AC_DEFINE(MIN_RAYDIST,0.0000000000001,"minimal ray dist to hit an object")
fi


if test $HAVE_JPG = 1; then
	AC_DEFINE(HAVE_JPEG,1,"whenever jpeglib is available")
	JPEGLIBS="-ljpeg"
	echo "Building jpeg support ... yes"
else
	JPEGLIBS=
	echo "Building jpeg support ... no"
fi

if test $HAVE_ZLIB = 1 ; then
	AC_DEFINE(HAVE_ZLIB,1,"whenever zlib is available")
	ZLIBS="-lz"
	echo "Building zlib support for .gz files ... yes"
else
	ZLIBS=
	echo "Building zlib support for .gz files ... no"
fi

if test $HAVE_PT = 1 ; then
	AC_DEFINE(HAVE_PTHREAD,1,"whenever pthreads are available")
	PTLIBS="-lpthread"
	echo "Building pthread multi-cpu support  ... yes"
else
	PTLIBS=
	echo "Building pthread multi-cpu support  ... no"
fi

if test "x$prefix" = xNONE ; then
	AC_DEFINE_UNQUOTED(LIBPATH,"$ac_default_prefix/lib","library path")
else
	AC_DEFINE_UNQUOTED(LIBPATH,"$prefix/lib","library path")
fi

AC_DEFINE_UNQUOTED(__POINT_TYPE,$PTYPE,"Don't know a better way to do this")

AH_BOTTOM([#define __BEGIN_YAFRAY namespace yafray {
#define __END_YAFRAY }
#define YAFRAYPLUGIN_EXPORT
#define YAFRAYCORE_EXPORT

__BEGIN_YAFRAY
typedef float CFLOAT;
typedef float GFLOAT;
typedef __POINT_TYPE PFLOAT;
__END_YAFRAY])

AC_SUBST(GTKCFLAGS)
AC_SUBST(GTKLIBS)
AC_SUBST(PIXCFLAGS)
AC_SUBST(PIXLIBS)
AC_SUBST(ZLIBS)
AC_SUBST(PTLIBS)
AC_SUBST(JPEGLIBS)
AC_SUBST(LIBTOOL)
AC_SUBST(LIBTOOL_DEPS)




AC_OUTPUT([
Makefile
src/Makefile
src/yafraycore/Makefile
src/lights/Makefile
src/shaders/Makefile
src/backgrounds/Makefile
src/interface/Makefile
src/loader/Makefile
])