File: configure.in

package info (click to toggle)
ecawave 1%3A0.4.1-5
  • links: PTS
  • area: main
  • in suites: woody
  • size: 684 kB
  • ctags: 493
  • sloc: cpp: 3,382; sh: 2,640; makefile: 235; ansic: 3
file content (124 lines) | stat: -rw-r--r-- 3,043 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
dnl ---
dnl Process this file with autoconf to produce a configure script.
dnl ---
AC_INIT(src/ecawave.h)

dnl ---
dnl Init automake
dnl ---
AM_INIT_AUTOMAKE(ecawave, 0.4.1)
AM_CONFIG_HEADER(config.h)

dnl ---
dnl Checks for programs.
dnl ---
AC_PROG_CC
AC_PROG_CXX
AC_PROG_CPP
AC_PROG_MAKE_SET
AC_PROG_INSTALL
AC_CHECK_CXX_NAMESPACE_SUPPORT

ACLOCAL=aclocal
AUTOMAKE=automake
AUTOCONF=autoconf
AC_SUBST(ACLOCAL)
AC_SUBST(AUTOCONF)
AC_SUBST(AUTOMAKE)

dnl ---
dnl Set CXXFLAGS.
dnl ---
if test x$CXXFLAGS = x; then
	CXXFLAGS="-O2 -D_REENTRANT -DNDEBUG -ffast-math"
fi

AC_ARG_ENABLE(debug,
[  --enable-debug		  Enable debugging (default = no)],
include_debug=yes)
AM_CONDITIONAL(INCLUDE_DEBUG, test x$include_debug = xyes)
if test x$include_debug = xyes; then
CXXFLAGS="-D_REENTRANT -g -Wall -Wstrict-prototypes -pedantic"
dnl CXXFLAGS="-D_REENTRANT -DENABLE_DBC -g -Wall -Wstrict-prototypes -pedantic"
fi                                     

dnl ---
dnl Set up some operating system specific options for POSIX threads
dnl ---
case "$host" in
	*-*-openbsd*)
               CFLAGS="$CFLAGS -pthread"
               CXXFLAGS="$CXXFLAGS -pthread"
               echo "Setting OpenBSD compilation options for POSIX threads"
               ;;
	*-*-freebsd*)
               CFLAGS="$CFLAGS -pthread"
               CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE"
               CXXFLAGS="$CXXFLAGS -pthread"
               echo "Setting FreeBSD compilation options for POSIX threads"
               ;;
	*-*-solaris*)
               CPPFLAGS="$CPPFLAGS -D_POSIX_PTHREAD_SEMANTICS -DUSE_SOLARIS"
               echo "Setting Solaris compilation options for POSIX threads"
               ;;
	*)
	       echo "Using generic settings for POSIX thread support."
	       ;;
esac

dnl ---
dnl Check for qt
dnl ---
AC_PATH_QT_2
if test x$qt_includes = x ; then
	AC_MSG_ERROR([** Couldn't find Qt header files! **])
fi
if test x$qt_libraries = x ; then
	AC_MSG_ERROR([** Couldn't find Qt libries! **])
fi

AC_CHECK_LIBECASOUND(7)

dnl ---
dnl Checks for header files.
dnl ---
AC_STDC_HEADERS

dnl ---
dnl Checks for typedefs, structures, and compiler characteristics.
dnl ---
dnl AC_C_CONST
dnl AC_C_INLINE

dnl ---
dnl Create outputs 
dnl ---
AC_OUTPUT([
Makefile
ecawave.spec
src/Makefile
Documentation/Makefile
])

# And a short summary 
echo "-----------------------------------------------------------------"
echo "Following features were selected:"
if test x$include_debug = xyes ; then
	echo "Debugging info:		yes"
else
	echo "Debugging info:		no"	
fi
echo ""
echo "Ecasound library setup:"
echo "Linker flags:		$ecasound_libraries"
echo "Includes:		$ecasound_includes"
echo ""
echo "Following directories are used:"
echo "Directory prefix:	"$prefix
echo "Qt-moc:		 	"$MOC
echo "Qt-libraries:		"$qt_libraries
echo "Qt-includes:		"$qt_includes

echo "-----------------------------------------------------------------"
echo "Type 'make' to compile the package and 'make install' to install."
echo "-----------------------------------------------------------------"