source: proiecte/HadoopJUnit/hadoop-0.20.1/src/c++/libhdfs/m4/apsupport.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: 4.8 KB
Line 
1dnl
2dnl Licensed to the Apache Software Foundation (ASF) under one or more
3dnl contributor license agreements.  See the NOTICE file distributed with
4dnl this work for additional information regarding copyright ownership.
5dnl The ASF licenses this file to You under the Apache License, Version 2.0
6dnl (the "License"); you may not use this file except in compliance with
7dnl the License.  You may obtain a copy of the License at
8dnl
9dnl     http://www.apache.org/licenses/LICENSE-2.0
10dnl
11dnl Unless required by applicable law or agreed to in writing, software
12dnl distributed under the License is distributed on an "AS IS" BASIS,
13dnl WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14dnl See the License for the specific language governing permissions and
15dnl limitations under the License.
16dnl
17
18dnl -------------------------------------------------------------------------
19dnl Author  Pier Fumagalli <mailto:pier.fumagalli@eng.sun.com>
20dnl Version $Id$
21dnl -------------------------------------------------------------------------
22
23AC_DEFUN([AP_SUPPORTED_HOST],[
24  AC_MSG_CHECKING([C flags dependant on host system type])
25
26  case $host_os in
27  darwin*)
28    CFLAGS="$CFLAGS -DOS_DARWIN -DDSO_DYLD"
29    supported_os="darwin"
30    ;;
31  solaris*)
32    CFLAGS="$CFLAGS -DOS_SOLARIS -DDSO_DLFCN"
33    supported_os="solaris"
34    LIBS="$LIBS -ldl -lthread"
35    ;;
36  linux*)
37    CFLAGS="$CFLAGS -DOS_LINUX -DDSO_DLFCN"
38    supported_os="linux"
39    LIBS="$LIBS -ldl -lpthread"
40    ;;
41  cygwin)
42    CFLAGS="$CFLAGS -DOS_CYGWIN -DDSO_DLFCN -DNO_SETSID"
43    supported_os="win32"
44    ;;
45  sysv)
46    CFLAGS="$CFLAGS -DOS_SYSV -DDSO_DLFCN"
47    LIBS="$LIBS -ldl"
48    ;;
49  sysv4)
50    CFLAGS="$CFLAGS -DOS_SYSV -DDSO_DLFCN -Kthread"
51    LDFLAGS="-Kthread $LDFLAGS"
52    LIBS="$LIBS -ldl"
53    ;;
54  freebsd*)
55    CFLAGS="$CFLAGS -DOS_FREEBSD -DDSO_DLFCN -D_THREAD_SAFE -pthread"
56    LDFLAGS="-pthread $LDFLAGS"
57    supported_os="freebsd"
58    ;;
59  osf5*)
60    CFLAGS="$CFLAGS -pthread -DOS_TRU64 -DDSO_DLFCN -D_XOPEN_SOURCE_EXTENDED"
61    LDFLAGS="$LDFLAGS -pthread"
62    ;;
63  hpux11*)
64    CFLAGS="$CFLAGS -pthread -DOS_HPUX -DDSO_DLFCN"
65    LDFLAGS="$LDFLAGS -pthread"
66    LIBS="$LIBS -lpthread"
67    ;;
68  *)
69    AC_MSG_RESULT([failed])
70    AC_MSG_ERROR([Unsupported operating system "$host_os"]);;
71  esac
72
73  case $host_cpu in
74  powerpc)
75    CFLAGS="$CFLAGS -DCPU=\\\"$host_cpu\\\""
76    HOST_CPU=$host_cpu;;
77  sparc*)
78    CFLAGS="$CFLAGS -DCPU=\\\"$host_cpu\\\""
79    HOST_CPU=$host_cpu;;
80  i?86)
81    CFLAGS="$CFLAGS -DCPU=\\\"i386\\\""
82    HOST_CPU=i386;;
83  x86_64)
84    CFLAGS="$CFLAGS -DCPU=\\\"amd64\\\""
85    HOST_CPU=amd64;;
86  bs2000)
87    CFLAGS="$CFLAGS -DCPU=\\\"osd\\\" -DCHARSET_EBCDIC -DOSD_POSIX"
88    supported_os="osd"
89    LDFLAGS="-Kno_link_stdlibs -B llm4"
90    LIBS="$LIBS -lBLSLIB"
91    LDCMD="/opt/C/bin/cc"
92    HOST_CPU=osd;;
93  mips)
94    CFLAGS="$CFLAGS -DCPU=\\\"mips\\\""
95    supported_os="mips"
96    HOST_CPU=mips;;
97  alpha*)
98    CFLAGS="$CFLAGS -DCPU=\\\"alpha\\\""
99    supported_os="alpha"
100    HOST_CPU=alpha;;
101  hppa2.0w)
102    CFLAGS="$CFLAGS -DCPU=\\\"PA_RISC2.0W\\\""
103    supported_os="hp-ux"
104    HOST_CPU=PA_RISC2.0W;;
105  hppa2.0)
106    CFLAGS="$CFLAGS -DCPU=\\\"PA_RISC2.0\\\""
107    supported_os="hp-ux"
108    HOST_CPU=PA_RISC2.0;;
109  mipsel)
110    CFLAGS="$CFLAGS -DCPU=\\\"mipsel\\\""
111    supported_os="mipsel"
112    HOST_CPU=mipsel;;
113  ia64)
114    CFLAGS="$CFLAGS -DCPU=\\\"ia64\\\""
115    supported_os="ia64"
116    HOST_CPU=ia64;;
117  s390)
118    CFLAGS="$CFLAGS -DCPU=\\\"s390\\\""
119    supported_os="s390"
120    HOST_CPU=s390;;
121  *)
122    AC_MSG_RESULT([failed])
123    AC_MSG_ERROR([Unsupported CPU architecture "$host_cpu"]);;
124  esac
125
126  AC_MSG_RESULT([ok])
127  AC_SUBST(CFLAGS)
128  AC_SUBST(LDFLAGS)
129])
130
131AC_DEFUN([AP_JVM_LIBDIR],[
132  AC_MSG_CHECKING([where on earth this jvm library is..])
133  javabasedir=$JAVA_HOME
134  case $host_os in
135    cygwin* | mingw* | pw23* )
136    lib_jvm_dir=`find $javabasedir -follow \( \
137        \( -name client -type d -prune \) -o \
138        \( -name "jvm.dll" -exec dirname {} \; \) \) 2> /dev/null | tr "\n" " "`
139    ;;
140    aix*)
141    lib_jvm_dir=`find $javabasedir \( \
142        \( -name client -type d -prune \) -o \
143        \( -name "libjvm.*" -exec dirname {} \; \) \) 2> /dev/null | tr "\n" " "`
144    if test -z "$lib_jvm_dir"; then
145       lib_jvm_dir=`find $javabasedir \( \
146       \( -name client -type d -prune \) -o \
147       \( -name "libkaffevm.*" -exec dirname {} \; \) \) 2> /dev/null | tr "\n" " "`
148    fi
149    ;;
150    *)
151    lib_jvm_dir=`find $javabasedir -follow \( \
152       \( -name client -type d -prune \) -o \
153       \( -name "libjvm.*" -exec dirname {} \; \) \) 2> /dev/null | tr "\n" " "`
154    if test -z "$lib_jvm_dir"; then
155       lib_jvm_dir=`find $javabasedir -follow \( \
156       \( -name client -type d -prune \) -o \
157       \( -name "libkaffevm.*" -exec dirname {} \; \) \) 2> /dev/null | tr "\n" " "`
158    fi
159    ;;
160  esac
161  LIB_JVM_DIR=$lib_jvm_dir
162  AC_MSG_RESULT([ohh u there ... $LIB_JVM_DIR])
163  AC_SUBST(LIB_JVM_DIR)
164])
Note: See TracBrowser for help on using the repository browser.