hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ni...@apache.org
Subject svn commit: r726983 [6/8] - in /hadoop/core/trunk: ./ src/c++/libhdfs/ src/c++/libhdfs/m4/ src/c++/libhdfs/tests/ src/c++/pipes/
Date Tue, 16 Dec 2008 08:21:30 GMT
Propchange: hadoop/core/trunk/src/c++/libhdfs/ltmain.sh
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: hadoop/core/trunk/src/c++/libhdfs/ltmain.sh
------------------------------------------------------------------------------
    svn:executable = *

Propchange: hadoop/core/trunk/src/c++/libhdfs/ltmain.sh
------------------------------------------------------------------------------
    svn:keywords = Id Revision HeadURL

Added: hadoop/core/trunk/src/c++/libhdfs/m4/apfunctions.m4
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/c%2B%2B/libhdfs/m4/apfunctions.m4?rev=726983&view=auto
==============================================================================
--- hadoop/core/trunk/src/c++/libhdfs/m4/apfunctions.m4 (added)
+++ hadoop/core/trunk/src/c++/libhdfs/m4/apfunctions.m4 Tue Dec 16 00:21:29 2008
@@ -0,0 +1,41 @@
+dnl
+dnl Licensed to the Apache Software Foundation (ASF) under one or more
+dnl contributor license agreements.  See the NOTICE file distributed with
+dnl this work for additional information regarding copyright ownership.
+dnl The ASF licenses this file to You under the Apache License, Version 2.0
+dnl (the "License"); you may not use this file except in compliance with
+dnl the License.  You may obtain a copy of the License at
+dnl
+dnl     http://www.apache.org/licenses/LICENSE-2.0
+dnl
+dnl Unless required by applicable law or agreed to in writing, software
+dnl distributed under the License is distributed on an "AS IS" BASIS,
+dnl WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+dnl See the License for the specific language governing permissions and
+dnl limitations under the License.
+dnl
+
+dnl -------------------------------------------------------------------------
+dnl Author  Pier Fumagalli <mailto:pier.fumagalli@eng.sun.com>
+dnl Version $Id$
+dnl -------------------------------------------------------------------------
+
+AC_DEFUN([AP_MSG_HEADER],[
+  printf "*** %s ***\n" "$1" 1>&2
+  AC_PROVIDE([$0])
+])
+
+AC_DEFUN([AP_CANONICAL_HOST_CHECK],[
+  AC_MSG_CHECKING([cached host system type])
+  if { test x"${ac_cv_host_system_type+set}" = x"set"  &&
+       test x"$ac_cv_host_system_type" != x"$host" ; }
+  then
+    AC_MSG_RESULT([$ac_cv_host_system_type])
+    AC_MSG_ERROR([remove the \"$cache_file\" file and re-run configure])
+  else
+    AC_MSG_RESULT(ok)
+    ac_cv_host_system_type="$host"
+  fi
+  AC_PROVIDE([$0])
+])
+

Added: hadoop/core/trunk/src/c++/libhdfs/m4/apjava.m4
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/c%2B%2B/libhdfs/m4/apjava.m4?rev=726983&view=auto
==============================================================================
--- hadoop/core/trunk/src/c++/libhdfs/m4/apjava.m4 (added)
+++ hadoop/core/trunk/src/c++/libhdfs/m4/apjava.m4 Tue Dec 16 00:21:29 2008
@@ -0,0 +1,142 @@
+dnl
+dnl Licensed to the Apache Software Foundation (ASF) under one or more
+dnl contributor license agreements.  See the NOTICE file distributed with
+dnl this work for additional information regarding copyright ownership.
+dnl The ASF licenses this file to You under the Apache License, Version 2.0
+dnl (the "License"); you may not use this file except in compliance with
+dnl the License.  You may obtain a copy of the License at
+dnl
+dnl     http://www.apache.org/licenses/LICENSE-2.0
+dnl
+dnl Unless required by applicable law or agreed to in writing, software
+dnl distributed under the License is distributed on an "AS IS" BASIS,
+dnl WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+dnl See the License for the specific language governing permissions and
+dnl limitations under the License.
+dnl
+
+dnl -------------------------------------------------------------------------
+dnl Author  Pier Fumagalli <mailto:pier.fumagalli@eng.sun.com>
+dnl Version $Id$
+dnl -------------------------------------------------------------------------
+
+AC_DEFUN([AP_PROG_JAVAC_WORKS],[
+  AC_CACHE_CHECK([wether the Java compiler ($JAVAC) works],ap_cv_prog_javac_works,[
+    echo "public class Test {}" > Test.java
+    $JAVAC $JAVACFLAGS Test.java > /dev/null 2>&1
+    if test $? -eq 0
+    then
+      rm -f Test.java Test.class
+      ap_cv_prog_javac_works=yes
+    else
+      rm -f Test.java Test.class
+      AC_MSG_RESULT(no)
+      AC_MSG_ERROR([installation or configuration problem: javac cannot compile])
+    fi
+  ])
+])
+
+dnl Check for JAVA compilers.
+AC_DEFUN([AP_PROG_JAVAC],[
+  if test "$SABLEVM" != "NONE"
+  then
+    AC_PATH_PROG(JAVACSABLE,javac-sablevm,NONE,$JAVA_HOME/bin)
+  else
+    JAVACSABLE="NONE"
+  fi
+  if test "$JAVACSABLE" = "NONE"
+  then
+    XPATH="$JAVA_HOME/bin:$JAVA_HOME/Commands:$PATH"
+    AC_PATH_PROG(JAVAC,javac,NONE,$XPATH)
+  else
+    AC_PATH_PROG(JAVAC,javac-sablevm,NONE,$JAVA_HOME/bin)
+  fi
+  AC_MSG_RESULT([$JAVAC])
+  if test "$JAVAC" = "NONE"
+  then
+    AC_MSG_ERROR([javac not found])
+  fi
+  AP_PROG_JAVAC_WORKS()
+  AC_PROVIDE([$0])
+  AC_SUBST(JAVAC)
+  AC_SUBST(JAVACFLAGS)
+])
+
+dnl Check for jar archivers.
+AC_DEFUN([AP_PROG_JAR],[
+  if test "$SABLEVM" != "NONE"
+  then
+    AC_PATH_PROG(JARSABLE,jar-sablevm,NONE,$JAVA_HOME/bin)
+  else
+    JARSABLE="NONE"
+  fi
+  if test "$JARSABLE" = "NONE"
+  then
+    XPATH="$JAVA_HOME/bin:$JAVA_HOME/Commands:$PATH"
+    AC_PATH_PROG(JAR,jar,NONE,$XPATH)
+  else
+    AC_PATH_PROG(JAR,jar-sablevm,NONE,$JAVA_HOME/bin)
+  fi
+  if test "$JAR" = "NONE"
+  then
+    AC_MSG_ERROR([jar not found])
+  fi
+  AC_PROVIDE([$0])
+  AC_SUBST(JAR)
+])
+
+AC_DEFUN([AP_JAVA],[
+  AC_ARG_WITH(java,[  --with-java=DIR         Specify the location of your JDK installation],[
+    AC_MSG_CHECKING([JAVA_HOME])
+    if test -d "$withval"
+    then
+      JAVA_HOME="$withval"
+      AC_MSG_RESULT([$JAVA_HOME])
+    else
+      AC_MSG_RESULT([failed])
+      AC_MSG_ERROR([$withval is not a directory])
+    fi
+    AC_SUBST(JAVA_HOME)
+  ])
+  if test x"$JAVA_HOME" = x
+  then
+    AC_MSG_ERROR([Java Home not defined. Rerun with --with-java=[...] parameter])
+  fi
+])
+
+dnl check if the JVM in JAVA_HOME is sableVM
+dnl $JAVA_HOME/bin/sablevm and /opt/java/lib/sablevm/bin are tested.
+AC_DEFUN([AP_SABLEVM],[
+  if test x"$JAVA_HOME" != x
+  then
+    AC_PATH_PROG(SABLEVM,sablevm,NONE,$JAVA_HOME/bin)
+    if test "$SABLEVM" = "NONE"
+    then
+      dnl java may be SableVM.
+      if $JAVA_HOME/bin/java -version 2> /dev/null | grep SableVM > /dev/null
+      then
+        SABLEVM=$JAVA_HOME/bin/java
+      fi
+    fi
+    if test "$SABLEVM" != "NONE"
+    then
+      AC_MSG_RESULT([Using sableVM: $SABLEVM])
+      CFLAGS="$CFLAGS -DHAVE_SABLEVM"
+    fi
+  fi
+])
+
+dnl check if the JVM in JAVA_HOME is kaffe
+dnl $JAVA_HOME/bin/kaffe is tested.
+AC_DEFUN([AP_KAFFE],[
+  if test x"$JAVA_HOME" != x
+  then
+    AC_PATH_PROG(KAFFEVM,kaffe,NONE,$JAVA_HOME/bin)
+    if test "$KAFFEVM" != "NONE"
+    then
+      AC_MSG_RESULT([Using kaffe: $KAFFEVM])
+      CFLAGS="$CFLAGS -DHAVE_KAFFEVM"
+      LDFLAGS="$LDFLAGS -Wl,-rpath $JAVA_HOME/jre/lib/$HOST_CPU -L $JAVA_HOME/jre/lib/$HOST_CPU
-lkaffevm"
+    fi
+  fi
+])

Added: hadoop/core/trunk/src/c++/libhdfs/m4/apsupport.m4
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/c%2B%2B/libhdfs/m4/apsupport.m4?rev=726983&view=auto
==============================================================================
--- hadoop/core/trunk/src/c++/libhdfs/m4/apsupport.m4 (added)
+++ hadoop/core/trunk/src/c++/libhdfs/m4/apsupport.m4 Tue Dec 16 00:21:29 2008
@@ -0,0 +1,164 @@
+dnl
+dnl Licensed to the Apache Software Foundation (ASF) under one or more
+dnl contributor license agreements.  See the NOTICE file distributed with
+dnl this work for additional information regarding copyright ownership.
+dnl The ASF licenses this file to You under the Apache License, Version 2.0
+dnl (the "License"); you may not use this file except in compliance with
+dnl the License.  You may obtain a copy of the License at
+dnl
+dnl     http://www.apache.org/licenses/LICENSE-2.0
+dnl
+dnl Unless required by applicable law or agreed to in writing, software
+dnl distributed under the License is distributed on an "AS IS" BASIS,
+dnl WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+dnl See the License for the specific language governing permissions and
+dnl limitations under the License.
+dnl
+
+dnl -------------------------------------------------------------------------
+dnl Author  Pier Fumagalli <mailto:pier.fumagalli@eng.sun.com>
+dnl Version $Id$
+dnl -------------------------------------------------------------------------
+
+AC_DEFUN([AP_SUPPORTED_HOST],[
+  AC_MSG_CHECKING([C flags dependant on host system type])
+
+  case $host_os in
+  darwin*)
+    CFLAGS="$CFLAGS -DOS_DARWIN -DDSO_DYLD"
+    supported_os="darwin"
+    ;;
+  solaris*)
+    CFLAGS="$CFLAGS -DOS_SOLARIS -DDSO_DLFCN"
+    supported_os="solaris"
+    LIBS="$LIBS -ldl -lthread"
+    ;;
+  linux*)
+    CFLAGS="$CFLAGS -DOS_LINUX -DDSO_DLFCN"
+    supported_os="linux"
+    LIBS="$LIBS -ldl -lpthread"
+    ;;
+  cygwin)
+    CFLAGS="$CFLAGS -DOS_CYGWIN -DDSO_DLFCN -DNO_SETSID"
+    supported_os="win32"
+    ;;
+  sysv)
+    CFLAGS="$CFLAGS -DOS_SYSV -DDSO_DLFCN"
+    LIBS="$LIBS -ldl"
+    ;;
+  sysv4)
+    CFLAGS="$CFLAGS -DOS_SYSV -DDSO_DLFCN -Kthread"
+    LDFLAGS="-Kthread $LDFLAGS"
+    LIBS="$LIBS -ldl"
+    ;;
+  freebsd*)
+    CFLAGS="$CFLAGS -DOS_FREEBSD -DDSO_DLFCN -D_THREAD_SAFE -pthread"
+    LDFLAGS="-pthread $LDFLAGS"
+    supported_os="freebsd"
+    ;;
+  osf5*)
+    CFLAGS="$CFLAGS -pthread -DOS_TRU64 -DDSO_DLFCN -D_XOPEN_SOURCE_EXTENDED"
+    LDFLAGS="$LDFLAGS -pthread"
+    ;;
+  hpux11*)
+    CFLAGS="$CFLAGS -pthread -DOS_HPUX -DDSO_DLFCN"
+    LDFLAGS="$LDFLAGS -pthread"
+    LIBS="$LIBS -lpthread"
+    ;;
+  *)
+    AC_MSG_RESULT([failed])
+    AC_MSG_ERROR([Unsupported operating system "$host_os"]);;
+  esac
+
+  case $host_cpu in
+  powerpc)
+    CFLAGS="$CFLAGS -DCPU=\\\"$host_cpu\\\""
+    HOST_CPU=$host_cpu;;
+  sparc*)
+    CFLAGS="$CFLAGS -DCPU=\\\"$host_cpu\\\""
+    HOST_CPU=$host_cpu;;
+  i?86)
+    CFLAGS="$CFLAGS -DCPU=\\\"i386\\\""
+    HOST_CPU=i386;;
+  x86_64)
+    CFLAGS="$CFLAGS -DCPU=\\\"amd64\\\""
+    HOST_CPU=amd64;;
+  bs2000)
+    CFLAGS="$CFLAGS -DCPU=\\\"osd\\\" -DCHARSET_EBCDIC -DOSD_POSIX"
+    supported_os="osd"
+    LDFLAGS="-Kno_link_stdlibs -B llm4"
+    LIBS="$LIBS -lBLSLIB"
+    LDCMD="/opt/C/bin/cc"
+    HOST_CPU=osd;;
+  mips)
+    CFLAGS="$CFLAGS -DCPU=\\\"mips\\\""
+    supported_os="mips"
+    HOST_CPU=mips;;
+  alpha*)
+    CFLAGS="$CFLAGS -DCPU=\\\"alpha\\\""
+    supported_os="alpha"
+    HOST_CPU=alpha;;
+  hppa2.0w)
+    CFLAGS="$CFLAGS -DCPU=\\\"PA_RISC2.0W\\\""
+    supported_os="hp-ux"
+    HOST_CPU=PA_RISC2.0W;;
+  hppa2.0)
+    CFLAGS="$CFLAGS -DCPU=\\\"PA_RISC2.0\\\""
+    supported_os="hp-ux"
+    HOST_CPU=PA_RISC2.0;;
+  mipsel)
+    CFLAGS="$CFLAGS -DCPU=\\\"mipsel\\\""
+    supported_os="mipsel"
+    HOST_CPU=mipsel;;
+  ia64)
+    CFLAGS="$CFLAGS -DCPU=\\\"ia64\\\""
+    supported_os="ia64"
+    HOST_CPU=ia64;;
+  s390)
+    CFLAGS="$CFLAGS -DCPU=\\\"s390\\\""
+    supported_os="s390"
+    HOST_CPU=s390;;
+  *)
+    AC_MSG_RESULT([failed])
+    AC_MSG_ERROR([Unsupported CPU architecture "$host_cpu"]);;
+  esac
+
+  AC_MSG_RESULT([ok])
+  AC_SUBST(CFLAGS)
+  AC_SUBST(LDFLAGS)
+])
+
+AC_DEFUN([AP_JVM_LIBDIR],[
+  AC_MSG_CHECKING([where on earth this jvm library is..])
+  javabasedir=$JAVA_HOME
+  case $host_os in
+    cygwin* | mingw* | pw23* )
+    lib_jvm_dir=`find $javabasedir -follow \( \
+	\( -name client -type d -prune \) -o \
+        \( -name "jvm.dll" -exec dirname {} \; \) \) 2> /dev/null | tr "\n" " "`
+    ;;
+    aix*)
+    lib_jvm_dir=`find $javabasedir \( \
+        \( -name client -type d -prune \) -o \
+	\( -name "libjvm.*" -exec dirname {} \; \) \) 2> /dev/null | tr "\n" " "`
+    if test -z "$lib_jvm_dir"; then
+       lib_jvm_dir=`find $javabasedir \( \
+       \( -name client -type d -prune \) -o \
+       \( -name "libkaffevm.*" -exec dirname {} \; \) \) 2> /dev/null | tr "\n" " "`
+    fi
+    ;;
+    *)
+    lib_jvm_dir=`find $javabasedir -follow \( \
+       \( -name client -type d -prune \) -o \
+       \( -name "libjvm.*" -exec dirname {} \; \) \) 2> /dev/null | tr "\n" " "`
+    if test -z "$lib_jvm_dir"; then
+       lib_jvm_dir=`find $javabasedir -follow \( \
+       \( -name client -type d -prune \) -o \
+       \( -name "libkaffevm.*" -exec dirname {} \; \) \) 2> /dev/null | tr "\n" " "`
+    fi 
+    ;;
+  esac
+  LIB_JVM_DIR=$lib_jvm_dir
+  AC_MSG_RESULT([ohh u there ... $LIB_JVM_DIR])
+  AC_SUBST(LIB_JVM_DIR)
+])



Mime
View raw message