File: configure.ac

package info (click to toggle)
orc 1:0.4.6-2
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 3,856 kB
  • ctags: 2,889
  • sloc: ansic: 29,000; sh: 10,220; xml: 2,508; makefile: 196
file content (195 lines) | stat: -rw-r--r-- 5,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
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
AC_PREREQ([2.58])
AC_INIT(orc,0.4.6)

AS_NANO(ORC_CVS=no,ORC_CVS=yes)

AC_CANONICAL_HOST([])
AM_INIT_AUTOMAKE(1.6)

ORC_MAJORMINOR=0.4
AC_SUBST(ORC_MAJORMINOR)

AM_CONFIG_HEADER(config.h)

dnl CURRENT, REVISION, AGE
dnl - library source changed -> increment REVISION
dnl - interfaces added/removed/changed -> increment CURRENT, REVISION = 0
dnl - interfaces added -> increment AGE
dnl - interfaces removed -> AGE = 0
ORC_LIBVERSION="2:0:2"
AC_SUBST(ORC_LIBVERSION)
AC_LIBTOOL_WIN32_DLL
AC_LIBTOOL_TAGS([])
AC_PROG_LIBTOOL
AM_PROG_AS
AC_CONFIG_MACRO_DIR([m4])

AC_CONFIG_SRCDIR([orc/orc.h])

ACLOCAL_AMFLAGS="-I m4 $ACLOCAL_AMFLAGS"
AC_SUBST(ACLOCAL_AMFLAGS)

##################################################
# Check for gtk-doc.
##################################################

if test "x$cross_compiling" = "xyes" ; then
  enable_gtk_doc=no
fi
GTK_DOC_CHECK([1.0])


AS_HOST_DEFINES()

AC_C_BIGENDIAN

AX_CREATE_STDINT_H([orc/orc-stdint.h])

AC_FUNC_MMAP()

AC_CHECK_HEADERS([inttypes.h])
AC_CHECK_HEADERS([sys/time.h])
AC_CHECK_HEADERS([unistd.h])

AC_CHECK_FUNCS([gettimeofday])
AC_CHECK_FUNCS([sigaction])
AC_CHECK_FUNCS([sigsetjmp])

AC_CHECK_LIBM
AC_SUBST(LIBM)

AC_CHECK_LIB(rt, clock_gettime,
   AC_DEFINE(HAVE_CLOCK_GETTIME, 1, [Defined if we have clock_gettime()])
   LIBRT=-lrt
   )
AC_SUBST(LIBRT)

AC_CACHE_CHECK(for monotonic clocks,
    orc_cv_monotonic_clock,AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
#include <time.h>
#include <unistd.h>
int main() {
#if !(defined(_POSIX_MONOTONIC_CLOCK) && _POSIX_MONOTONIC_CLOCK >= 0 && defined(CLOCK_MONOTONIC))
        #error No monotonic clock
#endif
        return 0;
}
]])],orc_cv_monotonic_clock=yes,orc_cv_monotonic_clock=no))
if test "$orc_cv_monotonic_clock" = "yes"; then
  AC_DEFINE(HAVE_MONOTONIC_CLOCK,1,[Defined if we have a monotonic clock])
fi

AS_COMPILER_FLAG(-Wall, ORC_CFLAGS="$ORC_CFLAGS -Wall")
if test "x$ORC_CVS" = "xyes"
then
  AS_COMPILER_FLAG(-Werror, ORC_CFLAGS="$ORC_CFLAGS -Werror")
fi

case "${host_os}" in
  nobody_is_using_this_currently)
    AC_DEFINE(HAVE_CODEMEM_MALLOC, 1, [Use malloc to allocate code for execution])
    ;;
  mingw*|pw32*|cygwin*)
    AC_DEFINE(HAVE_CODEMEM_VIRTUALALLOC, 1, [Use VirtualAlloc to allocate code for execution])
    ;;
  linux*|darwin*|solaris*|netbsd*|freebsd*|openbsd*|kfreebsd*|gnu*)
    AC_DEFINE(HAVE_CODEMEM_MMAP, 1, [Use mmap to allocate code for execution])
    ;;
  *)
    AC_ERROR([no code allocation backend])
    ;;
esac

case "${host_os}" in
  mingw*|pw32*|cygwin*)
    AC_DEFINE(HAVE_THREAD_WIN32, 1, [Use Windows thread code])
    ;;
  *)
    AC_DEFINE(HAVE_THREAD_PTHREAD, 1, [Use pthread thread code])
    ;;
esac

AC_ARG_ENABLE(backend,
  AC_HELP_STRING([--enable-backend=[sse,mmx,neon,arm,all]], [include backend (default=all)]),
    [], [enable_backend=all])
case "${enable_backend}" in
  sse)
    ENABLE_BACKEND_SSE=yes
    AC_DEFINE(ENABLE_BACKEND_SSE, 1, [Enable SSE backend])
    ;;
  mmx)
    ENABLE_BACKEND_MMX=yes
    AC_DEFINE(ENABLE_BACKEND_MMX, 1, [Enable MMX backend])
    ;;
  altivec)
    ENABLE_BACKEND_ALTIVEC=yes
    AC_DEFINE(ENABLE_BACKEND_ALTIVEC, 1, [Enable Altivec backend])
    ;;
  neon)
    ENABLE_BACKEND_NEON=yes
    AC_DEFINE(ENABLE_BACKEND_NEON, 1, [Enable NEON backend])
    ;;
  arm)
    ENABLE_BACKEND_ARM=yes
    AC_DEFINE(ENABLE_BACKEND_ARM, 1, [Enable Arm backend])
    ;;
  c64x)
    ENABLE_BACKEND_C64X=yes
    AC_DEFINE(ENABLE_BACKEND_C64X, 1, [Enable c64x backend])
    ;;
  all|auto)
    ENABLE_BACKEND_SSE=yes
    AC_DEFINE(ENABLE_BACKEND_SSE, 1, [Enable SSE backend])
    ENABLE_BACKEND_MMX=yes
    AC_DEFINE(ENABLE_BACKEND_MMX, 1, [Enable MMX backend])
    ENABLE_BACKEND_ALTIVEC=yes
    AC_DEFINE(ENABLE_BACKEND_ALTIVEC, 1, [Enable Altivec backend])
    ENABLE_BACKEND_NEON=yes
    AC_DEFINE(ENABLE_BACKEND_NEON, 1, [Enable NEON backend])
    ENABLE_BACKEND_ARM=yes
    AC_DEFINE(ENABLE_BACKEND_ARM, 1, [Enable Arm backend])
    ENABLE_BACKEND_C64X=yes
    AC_DEFINE(ENABLE_BACKEND_C64X, 1, [Enable c64x backend])
    ;;
esac
AM_CONDITIONAL(ENABLE_BACKEND_SSE, test "x$ENABLE_BACKEND_SSE" = "xyes")
AM_CONDITIONAL(ENABLE_BACKEND_MMX, test "x$ENABLE_BACKEND_MMX" = "xyes")
AM_CONDITIONAL(ENABLE_BACKEND_ALTIVEC, test "x$ENABLE_BACKEND_ALTIVEC" = "xyes")
AM_CONDITIONAL(ENABLE_BACKEND_NEON, test "x$ENABLE_BACKEND_NEON" = "xyes")
AM_CONDITIONAL(ENABLE_BACKEND_ARM, test "x$ENABLE_BACKEND_ARM" = "xyes")
AM_CONDITIONAL(ENABLE_BACKEND_C64X, test "x$ENABLE_BACKEND_C64X" = "xyes")


AC_DEFINE(ORC_EXPORTS, 1, [Defined for compiling internal code])

ORC_CFLAGS="$ORC_CFLAGS -I\$(top_srcdir)"
AC_SUBST(ORC_CFLAGS)

ORC_LIBS="\$(top_builddir)/orc/liborc-$ORC_MAJORMINOR.la $LIBM $LIBRT"
AC_SUBST(ORC_LIBS)

#CFLAGS=`echo $CFLAGS | sed s/O2/O0/`

pkgconfigdir="\$(libdir)/pkgconfig"
AC_SUBST(pkgconfigdir)

orcbindir="\$(libdir)/orc/"
AC_SUBST(orcbindir)

AC_CONFIG_FILES([
Makefile 
doc/Makefile
doc/version.entities
orc/Makefile
orc-test/Makefile
testsuite/Makefile
testsuite/orcc/Makefile
examples/Makefile
tools/Makefile
orc-uninstalled.pc
orc.pc
])
AC_OUTPUT