source: proiecte/HadoopJUnit/hadoop-0.20.1/src/c++/utils/m4/hadoop_utils.m4 @ 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.3 KB
Line 
1# Licensed to the Apache Software Foundation (ASF) under one
2# or more contributor license agreements.  See the NOTICE file
3# distributed with this work for additional information
4# regarding copyright ownership.  The ASF licenses this file
5# to you under the Apache License, Version 2.0 (the
6# "License"); you may not use this file except in compliance
7# with the License.  You may obtain a copy of the License at
8#
9#     http://www.apache.org/licenses/LICENSE-2.0
10#
11# Unless required by applicable law or agreed to in writing, software
12# distributed under the License is distributed on an "AS IS" BASIS,
13# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14# See the License for the specific language governing permissions and
15# limitations under the License.
16#
17# hadoop_utils.m4
18
19# Check to see if the install program supports -C
20# If so, use "install -C" for the headers. Otherwise, every install
21# updates the timestamps on the installed headers, which causes a recompilation
22# of any downstream libraries.
23AC_DEFUN([CHECK_INSTALL_CFLAG],[
24AC_REQUIRE([AC_PROG_INSTALL])
25touch foo
26if $INSTALL -C foo bar; then
27  INSTALL_DATA="$INSTALL_DATA -C"
28fi
29rm -f foo bar
30])
31
32# Set up the things we need for compiling hadoop utils
33AC_DEFUN([HADOOP_UTILS_SETUP],[
34AC_REQUIRE([AC_GNU_SOURCE])
35AC_REQUIRE([AC_SYS_LARGEFILE])
36])
37
38# define a macro for using hadoop utils
39AC_DEFUN([USE_HADOOP_UTILS],[
40AC_REQUIRE([HADOOP_UTILS_SETUP])
41AC_ARG_WITH([hadoop-utils],
42            AS_HELP_STRING([--with-hadoop-utils=<dir>],
43                           [directory to get hadoop_utils from]),
44            [HADOOP_UTILS_PREFIX="$withval"],
45            [HADOOP_UTILS_PREFIX="\${prefix}"])
46AC_SUBST(HADOOP_UTILS_PREFIX)
47])
48
49AC_DEFUN([HADOOP_PIPES_SETUP],[
50AC_CHECK_HEADERS([pthread.h], [],
51  AC_MSG_ERROR(Please check if you have installed the pthread library))
52AC_CHECK_LIB([pthread], [pthread_create], [],
53  AC_MSG_ERROR(Cannot find libpthread.so, please check))
54])
55
56# define a macro for using hadoop pipes
57AC_DEFUN([USE_HADOOP_PIPES],[
58AC_REQUIRE([USE_HADOOP_UTILS])
59AC_REQUIRE([HADOOP_PIPES_SETUP])
60AC_ARG_WITH([hadoop-pipes],
61            AS_HELP_STRING([--with-hadoop-pipes=<dir>],
62                           [directory to get hadoop pipes from]),
63            [HADOOP_PIPES_PREFIX="$withval"],
64            [HADOOP_PIPES_PREFIX="\${prefix}"])
65AC_SUBST(HADOOP_PIPES_PREFIX)
66])
Note: See TracBrowser for help on using the repository browser.