diff options
Diffstat (limited to '')
-rw-r--r-- | src/others/mimesh/g3dviewer-0.2.99.4/configure.in | 102 |
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 @@ | |||
1 | AC_INIT(configure.in) | ||
2 | |||
3 | VERSION=0.2.99.4 | ||
4 | PACKAGE=g3dviewer | ||
5 | |||
6 | AM_CONFIG_HEADER(config.h) | ||
7 | |||
8 | AM_INIT_AUTOMAKE($PACKAGE, $VERSION, no-define) | ||
9 | AC_SUBST(VERSION) | ||
10 | |||
11 | AC_PROG_CC | ||
12 | |||
13 | ALL_LINGUAS="de" | ||
14 | AM_GLIB_GNU_GETTEXT | ||
15 | |||
16 | GETTEXT_PACKAGE=$PACKAGE | ||
17 | AC_SUBST(GETTEXT_PACKAGE) | ||
18 | |||
19 | # glib 2.0 | ||
20 | AM_PATH_GLIB_2_0(2.4.0,,AC_MSG_ERROR([GLib >= 2.4.0 is required])) | ||
21 | |||
22 | # gtk+ 2.0 | ||
23 | AM_PATH_GTK_2_0(2.4.0,,AC_MSG_ERROR([GTK+ >= 2.4.0 is required])) | ||
24 | |||
25 | # libglade 2.0 | ||
26 | PKG_CHECK_MODULES(LIBGLADE, libglade-2.0 >= 2.4.0,, | ||
27 | AC_MSG_ERROR([libglade >= 2.4.0 is required])) | ||
28 | |||
29 | # gtkglext | ||
30 | AM_PATH_GTKGLEXT_1_0(1.0.0,,AC_MSG_ERROR([GtkGlExt >= 1.0.0 is required])) | ||
31 | |||
32 | # libg3d | ||
33 | PKG_CHECK_MODULES(LIBG3D, libg3d >= 0.0.5,, | ||
34 | AC_MSG_ERROR([libg3d >= 0.0.5 is required])) | ||
35 | |||
36 | # Check OpenGL stuff | ||
37 | AC_PATH_XTRA | ||
38 | |||
39 | ac_save_CPPFLAGS="$CPPFLAGS" | ||
40 | CPPFLAGS="$CPPFLAGS $X_CFLAGS" | ||
41 | |||
42 | ac_save_LIBS="$LIBS" | ||
43 | LIBS="$LIBS $X_LIBS" | ||
44 | |||
45 | AC_CHECK_HEADERS(GL/gl.h GL/glu.h,, | ||
46 | AC_MSG_ERROR([some OpenGL headers missing]), | ||
47 | [#include <GL/gl.h>]) | ||
48 | |||
49 | AC_CHECK_LIB(GL, glBegin, have_gl=yes, have_gl=no) | ||
50 | AC_CHECK_LIB(GLU, gluPerspective, have_glu=yes, have_glu=no, -lGL $GTK_LIBS) | ||
51 | if test $have_gl = no || test $have_glu = no; then | ||
52 | AC_MSG_ERROR([libgl or libglu missing]) | ||
53 | else | ||
54 | GL_LIBS="-lGL -lGLU $GTK_LIBS" | ||
55 | AC_SUBST(GL_LIBS) | ||
56 | fi | ||
57 | |||
58 | # Check some UNIX headers | ||
59 | AC_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) | ||
64 | AC_CHECK_FUNC(snprintf,[AC_DEFINE(HAVE_SNPRINTF,1,[snprintf])],,stdio.h) | ||
65 | |||
66 | # Look for fstat (required) | ||
67 | AC_CHECK_FUNC(fstat, have_fstat=yes, have_fstat=no, [unistd.h sys/types.h]) | ||
68 | if test $have_fstat = no; then | ||
69 | AC_MSG_ERROR([fstat function not found]) | ||
70 | fi | ||
71 | |||
72 | # Debug level (verbosity & optimization) | ||
73 | AC_MSG_CHECKING([for debug level]) | ||
74 | AC_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) | ||
78 | AC_MSG_RESULT($DEBUG) | ||
79 | AC_SUBST(DEBUG) | ||
80 | |||
81 | if test "$DEBUG" = "0"; then | ||
82 | DBG_CFLAGS="-O2" | ||
83 | else | ||
84 | DBG_CFLAGS="-g -DGLIB_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED" | ||
85 | fi | ||
86 | AC_SUBST(DBG_CFLAGS) | ||
87 | |||
88 | # Data & plugin directories | ||
89 | AC_DEFINE_DIR(DATA_DIR, datadir/$PACKAGE, [Data directory]) | ||
90 | |||
91 | # Create the files | ||
92 | AC_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 | |||