source: proiecte/HadoopJUnit/hadoop-0.20.1/src/native/configure.ac @ 120

Last change on this file since 120 was 120, checked in by (none), 14 years ago

Added the mail files for the Hadoop JUNit Project

  • Property svn:executable set to *
File size: 2.9 KB
Line 
1#
2# Licensed to the Apache Software Foundation (ASF) under one
3# or more contributor license agreements.  See the NOTICE file
4# distributed with this work for additional information
5# regarding copyright ownership.  The ASF licenses this file
6# to you under the Apache License, Version 2.0 (the
7# "License"); you may not use this file except in compliance
8# with the License.  You may obtain a copy of the License at
9#
10#     http://www.apache.org/licenses/LICENSE-2.0
11#
12# Unless required by applicable law or agreed to in writing, software
13# distributed under the License is distributed on an "AS IS" BASIS,
14# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15# See the License for the specific language governing permissions and
16# limitations under the License.
17#
18
19#
20# configure.ac for hadoop native code.
21#
22
23# Notes:
24# 1. This configure.ac depends on the following environment variables to function correctly:
25#    * HADOOP_NATIVE_SRCDIR
26#    * JAVA_HOME
27#    * JVM_DATA_MODEL
28#    * OS_NAME
29#    * OS_ARCH
30#    All these are setup by build.xml.
31
32#                                               -*- Autoconf -*-
33# Process this file with autoconf to produce a configure script.
34#
35
36AC_PREREQ(2.59)
37AC_INIT(src/org_apache_hadoop.h)
38AC_CONFIG_SRCDIR([src/org_apache_hadoop.h])
39AC_CONFIG_AUX_DIR(config)
40AC_CONFIG_HEADER([config.h])
41
42AM_INIT_AUTOMAKE(hadoop,1.0.0)
43
44# Checks for programs.
45AC_PROG_CC
46AC_PROG_LIBTOOL
47
48# Checks for libraries.
49dnl Check for '-ldl'
50AC_CHECK_LIB([dl], [dlopen])
51
52dnl Check for '-ljvm'
53JNI_LDFLAGS=""
54if test $JAVA_HOME != ""
55then
56  JNI_LDFLAGS="-L$JAVA_HOME/jre/lib/$OS_ARCH/server"
57fi
58ldflags_bak=$LDFLAGS
59LDFLAGS="$LDFLAGS $JNI_LDFLAGS"
60AC_CHECK_LIB([jvm], [JNI_GetCreatedJavaVMs])
61LDFLAGS=$ldflags_bak
62AC_SUBST([JNI_LDFLAGS])
63
64# Checks for header files.
65dnl Check for Ansi C headers
66AC_HEADER_STDC
67
68dnl Check for other standard C headers
69AC_CHECK_HEADERS([stdio.h stddef.h], [], AC_MSG_ERROR(Some system headers not found... please ensure their presence on your platform.))
70
71dnl Check for JNI headers
72JNI_CPPFLAGS=""
73if test $JAVA_HOME != ""
74then
75  for dir in `find $JAVA_HOME/include -follow -type d`
76  do
77    JNI_CPPFLAGS="$JNI_CPPFLAGS -I$dir"
78  done
79fi
80cppflags_bak=$CPPFLAGS
81CPPFLAGS="$CPPFLAGS $JNI_CPPFLAGS"
82AC_CHECK_HEADERS([jni.h], [], AC_MSG_ERROR([Native java headers not found. Is \$JAVA_HOME set correctly?]))
83CPPFLAGS=$cppflags_bak
84AC_SUBST([JNI_CPPFLAGS])
85
86dnl Check for zlib headers
87AC_CHECK_HEADERS([zlib.h zconf.h], AC_COMPUTE_NEEDED_DSO(z,HADOOP_ZLIB_LIBRARY), AC_MSG_ERROR(Zlib headers were not found... native-hadoop library needs zlib to build. Please install the requisite zlib development package.))
88
89# Checks for typedefs, structures, and compiler characteristics.
90AC_C_CONST
91
92# Checks for library functions.
93AC_CHECK_FUNCS([memset])
94
95AC_CONFIG_FILES([Makefile
96                 src/org/apache/hadoop/io/compress/zlib/Makefile
97                 lib/Makefile])
98AC_OUTPUT
99
100#
101#vim: sw=2: ts=2: noet
102#
Note: See TracBrowser for help on using the repository browser.