File: configure.in

package info (click to toggle)
osgal-cvs 20060903-3
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 3,836 kB
  • ctags: 424
  • sloc: sh: 8,806; cpp: 1,815; makefile: 86
file content (118 lines) | stat: -rwxr-xr-x 2,372 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
# INITIATE AUTOCONF
AC_INIT([src/Makefile.am])

#BEGIN DEFAULT SETTINGS


# General

CXXFLAGS="-Wall -W"


#END DEFAULT SETTINGS



# BEGIN GENERAL AUTOCONF STUFF

AC_CONFIG_AUX_DIR(config)
AM_INIT_AUTOMAKE(osgAL,0.3)

dnl C++ style
AC_LANG_CPLUSPLUS
#CXX=g++
AC_PROG_CXX
AC_PROG_CXXCPP
AC_PROG_LN_S
AC_PROG_MAKE_SET
AC_PROG_INSTALL
AM_PROG_LIBTOOL

dnl Check system type
#AC_CANONICAL_HOST

dnl create only shared libtool-libraries
AC_ENABLE_SHARED(yes)

dnl set the following to yes, if you want to create static
dnl libtool-libraries
AC_ENABLE_STATIC(no)

# ***** DEBUGGING
AC_ARG_ENABLE(debug,[  --enable-debug          enable debugging [default=no]])
if test "$enable_debug" = "yes"; then
    CXXFLAGS="-g $CXXFLAGS"
else
    CXXFLAGS="-O2 $CXXFLAGS"
fi

# ***** PROFILING
AC_ARG_ENABLE(profiling,[  --enable-profiling  enable profiling [default=no]])
if test "$enable_profiling" = "yes"; then
    CXXFLAGS="-pg $CXXFLAGS"
fi
CFLAGS="$CPPFLAGS -I/usr/local/include"

# ***** VRLAB_PREFIX
if test "$VRLAB_PREFIX"; then
  echo "Checking for VRLAB_PREFIX.."
  if test "$prefix" = "NONE"; then
    prefix="$VRLAB_PREFIX"
  fi
  CPPFLAGS="$CPPFLAGS -I$VRLAB_PREFIX/include"
  LDFLAGS="$LDFLAGS -L$VRLAB_PREFIX/lib"
fi

# ***** Open Scenegraph
# Check for openscenegraph
PKG_CHECK_MODULES(OPENSCENEGRAPH, openscenegraph >= 0.9.8, , [AC_MSG_ERROR(openscenegraph is a mandatory library)])
OSGAL_LIBS="$OSGAL_LIBS $OPENSCENEGRAPH_LIBS "


# ***** OpenAL++
# BUILD OUTPUT VARIABLES
OPENALPP_CFLAGS="`pkg-config --cflags openalpp`"
AC_SUBST(OPENALPP_CFLAGS)
OPENALPP_LIBS="`pkg-config --libs openalpp`"
AC_SUBST(OPENALPP_LIBS)



# END GENERAL AUTOCONF STUFF

dnl Checks for libraries.
# OpelAL
AC_CHECK_LIB(openal,main)


OSGAL_LIBS="$OSGAL_LIBS $OPENALPP_LIBS"
AC_SUBST(OSGAL_LIBS)

echo "CPPFLAGS=$CPPFLAGS"
echo "LDFLAGS=$LDFLAGS"
echo "OSGAL_LIBS=$OSGAL_LIBS"
echo "GL_CFLAGS=$GL_CFLAGS"
echo "GL_LIBS=$GL_LIBS"

dnl Checks for header files.
AC_HEADER_STDC

dnl Checks for typedefs, structures, and compiler characteristics.
#AC_C_CONST

dnl Checks for library functions.

AC_CONFIG_FILES([Makefile 
	include/Makefile 
	include/osgAL/Makefile 
	src/Makefile 
	src/osgAL/Makefile 
	src/osgPlugin/Makefile 
	examples/Makefile 
	osgal.pc
	examples/osgal/Makefile 
	examples/osgalocclude/Makefile 
	examples/osgalmultiple/Makefile 
	examples/osgalviewer/Makefile 
])
AC_OUTPUT