configure.ac
上传用户:quxuerui
上传日期:2018-01-08
资源大小:41811k
文件大小:4k
源码类别:

网格计算

开发平台:

Java

  1. #
  2. # Copyright 2005 The Apache Software Foundation
  3. #
  4. # Licensed under the Apache License, Version 2.0 (the "License");
  5. # you may not use this file except in compliance with the License.
  6. # You may obtain a copy of the License at
  7. #
  8. #     http://www.apache.org/licenses/LICENSE-2.0
  9. #
  10. # Unless required by applicable law or agreed to in writing, software
  11. # distributed under the License is distributed on an "AS IS" BASIS,
  12. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. # See the License for the specific language governing permissions and
  14. # limitations under the License.
  15. #
  16. # Autoconf input file
  17. # $Id$
  18. AC_PREREQ(2.61)
  19. AC_INIT([libhdfs], [0.1.0], omalley@apache.org)
  20. AC_PREFIX_DEFAULT([`pwd`/../install])
  21. # Generates Makefile from Makefile.am. Modify when new subdirs are added.
  22. # Change Makefile.am also to add subdirectly.
  23. AM_INIT_AUTOMAKE(foreign no-dist)
  24. AC_CONFIG_FILES(Makefile)
  25. LT_INIT
  26.  
  27. AC_CONFIG_MACRO_DIR([m4])
  28. dnl -------------------------------------------------------------------------
  29. dnl Check current host (forget about cross compilation) and validate it
  30. dnl against the cache (fail if the cache differs)
  31. dnl -------------------------------------------------------------------------
  32. AP_MSG_HEADER([Current host])
  33. AC_CANONICAL_HOST()
  34. AP_CANONICAL_HOST_CHECK()
  35. dnl -------------------------------------------------------------------------
  36. dnl Check C environment
  37. dnl -------------------------------------------------------------------------
  38. AP_MSG_HEADER([C-Language compilation tools])
  39. AC_PROG_CC()
  40. AC_CHECK_TOOL(RANLIB, ranlib, :)
  41. dnl -------------------------------------------------------------------------
  42. dnl Check if this host is supported
  43. dnl -------------------------------------------------------------------------
  44. AP_MSG_HEADER([Host support])
  45. AP_SUPPORTED_HOST()
  46. if test "$supported_os" = "darwin"
  47. then
  48.   if test -z "$JAVA_HOME" -a -d /System/Library/Frameworks/JavaVM.framework/Home; then
  49.    JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Home
  50.   fi
  51.   _prevdir=`/bin/pwd`
  52.   if test -n "$JAVA_HOME" -a -d "$JAVA_HOME/include"; then
  53.     cd "$JAVA_HOME/include"
  54.   elif test -n "$JAVA_HOME" -a -d "$JAVA_HOME/../Headers"; then
  55.     cd "$JAVA_HOME/../Headers"
  56.   else
  57.     cd /System/Library/Frameworks/JavaVM.framework/Headers
  58.   fi
  59.   CFLAGS="$CFLAGS -m${JVM_ARCH} -I`/bin/pwd -P`"
  60.   cd $_prevdir
  61.   unset _prevdir
  62. fi
  63. dnl -------------------------------------------------------------------------
  64. dnl Check JAVA environment
  65. dnl -------------------------------------------------------------------------
  66. AP_MSG_HEADER([Java compilation tools])
  67. AP_JAVA()
  68. AP_SABLEVM()
  69. AP_KAFFE()
  70. AP_PROG_JAVAC()
  71. AP_PROG_JAR()
  72. AP_JVM_LIBDIR()
  73. if test "$supported_os" != "darwin"
  74. then
  75.   CFLAGS="$CFLAGS -m${JVM_ARCH} -I$JAVA_HOME/include -I$JAVA_HOME/include/$supported_os"
  76.   LDFLAGS="$LDFLAGS -m${JVM_ARCH} -L$LIB_JVM_DIR -ljvm -shared -Wl,-x"
  77.   AC_MSG_RESULT([VALUE OF JVM_ARCH IS :$JVM_ARCH])
  78. fi
  79. dnl -------------------------------------------------------------------------
  80. dnl Add gcc specific CFLAGS.
  81. dnl -------------------------------------------------------------------------
  82. if test "$GCC" = "yes"
  83. then
  84.    CFLAGS="$CFLAGS -Wall -Wstrict-prototypes"
  85.    AC_MSG_RESULT([gcc flags added])
  86. fi
  87. dnl -------------------------------------------------------------------------
  88. dnl Add gcc specific CFLAGS.
  89. dnl -------------------------------------------------------------------------
  90. if test -z "$LDCMD"
  91. then
  92.    LDCMD="$CC"
  93. fi
  94. AC_SUBST(LDCMD)
  95. AC_PROG_CC
  96. AC_PROG_LIBTOOL
  97. AC_TYPE_SIZE_T
  98. AC_CHECK_FUNCS([strdup strerror strtoul])
  99. AC_CHECK_HEADERS([fcntl.h])
  100. AC_C_CONST
  101. AC_C_VOLATILE
  102. #AC_FUNC_MALLOC
  103. AC_HEADER_STDBOOL
  104. AC_TYPE_INT16_T
  105. AC_TYPE_INT32_T
  106. AC_TYPE_INT64_T
  107. AC_TYPE_UINT16_T
  108. AC_SUBST(PRODUCT_MK)
  109. AC_OUTPUT