aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/others/mimesh/g3dviewer-0.2.99.4/configure.in
diff options
context:
space:
mode:
Diffstat (limited to 'src/others/mimesh/g3dviewer-0.2.99.4/configure.in')
-rw-r--r--src/others/mimesh/g3dviewer-0.2.99.4/configure.in102
1 files changed, 102 insertions, 0 deletions
diff --git a/src/others/mimesh/g3dviewer-0.2.99.4/configure.in b/src/others/mimesh/g3dviewer-0.2.99.4/configure.in
new file mode 100644
index 0000000..fc69654
--- /dev/null
+++ b/src/others/mimesh/g3dviewer-0.2.99.4/configure.in
@@ -0,0 +1,102 @@
1AC_INIT(configure.in)
2
3VERSION=0.2.99.4
4PACKAGE=g3dviewer
5
6AM_CONFIG_HEADER(config.h)
7
8AM_INIT_AUTOMAKE($PACKAGE, $VERSION, no-define)
9AC_SUBST(VERSION)
10
11AC_PROG_CC
12
13ALL_LINGUAS="de"
14AM_GLIB_GNU_GETTEXT
15
16GETTEXT_PACKAGE=$PACKAGE
17AC_SUBST(GETTEXT_PACKAGE)
18
19# glib 2.0
20AM_PATH_GLIB_2_0(2.4.0,,AC_MSG_ERROR([GLib >= 2.4.0 is required]))
21
22# gtk+ 2.0
23AM_PATH_GTK_2_0(2.4.0,,AC_MSG_ERROR([GTK+ >= 2.4.0 is required]))
24
25# libglade 2.0
26PKG_CHECK_MODULES(LIBGLADE, libglade-2.0 >= 2.4.0,,
27 AC_MSG_ERROR([libglade >= 2.4.0 is required]))
28
29# gtkglext
30AM_PATH_GTKGLEXT_1_0(1.0.0,,AC_MSG_ERROR([GtkGlExt >= 1.0.0 is required]))
31
32# libg3d
33PKG_CHECK_MODULES(LIBG3D, libg3d >= 0.0.5,,
34 AC_MSG_ERROR([libg3d >= 0.0.5 is required]))
35
36# Check OpenGL stuff
37AC_PATH_XTRA
38
39ac_save_CPPFLAGS="$CPPFLAGS"
40CPPFLAGS="$CPPFLAGS $X_CFLAGS"
41
42ac_save_LIBS="$LIBS"
43LIBS="$LIBS $X_LIBS"
44
45AC_CHECK_HEADERS(GL/gl.h GL/glu.h,,
46 AC_MSG_ERROR([some OpenGL headers missing]),
47 [#include <GL/gl.h>])
48
49AC_CHECK_LIB(GL, glBegin, have_gl=yes, have_gl=no)
50AC_CHECK_LIB(GLU, gluPerspective, have_glu=yes, have_glu=no, -lGL $GTK_LIBS)
51if test $have_gl = no || test $have_glu = no; then
52 AC_MSG_ERROR([libgl or libglu missing])
53else
54 GL_LIBS="-lGL -lGLU $GTK_LIBS"
55 AC_SUBST(GL_LIBS)
56fi
57
58# Check some UNIX headers
59AC_CHECK_HEADERS(dirent.h sys/stat.h unistd.h,,
60 AC_MSG_ERROR([missing header file]),
61 [#include <sys/types.h>])
62
63# Look for snprintf (optional)
64AC_CHECK_FUNC(snprintf,[AC_DEFINE(HAVE_SNPRINTF,1,[snprintf])],,stdio.h)
65
66# Look for fstat (required)
67AC_CHECK_FUNC(fstat, have_fstat=yes, have_fstat=no, [unistd.h sys/types.h])
68if test $have_fstat = no; then
69 AC_MSG_ERROR([fstat function not found])
70fi
71
72# Debug level (verbosity & optimization)
73AC_MSG_CHECKING([for debug level])
74AC_ARG_ENABLE(debug,
75 [[ --enable-debug[=LVL] enable debug level LVL or 1 (default is 0)]],
76 [if test "$enableval" = "yes" ; then DEBUG=1; else DEBUG=$enableval; fi],
77 DEBUG=0)
78AC_MSG_RESULT($DEBUG)
79AC_SUBST(DEBUG)
80
81if test "$DEBUG" = "0"; then
82 DBG_CFLAGS="-O2"
83else
84 DBG_CFLAGS="-g -DGLIB_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED"
85fi
86AC_SUBST(DBG_CFLAGS)
87
88# Data & plugin directories
89AC_DEFINE_DIR(DATA_DIR, datadir/$PACKAGE, [Data directory])
90
91# Create the files
92AC_OUTPUT(Makefile
93 m4/Makefile
94 man/Makefile
95 src/Makefile
96 thumbnailer/Makefile
97 pixmaps/Makefile
98 glade/Makefile
99 po/Makefile.in
100)
101
102