Home | History | Annotate | Download | only in mclinker
      1 #                     The MCLinker project
      2 #
      3 # This file is distributed under the University of Illinois Open Source
      4 # License. See LICENSE.TXT for details.
      5 
      6 ##############################################################################
      7 ### WARNING: this file contains embedded tabs.  Do not run untabify on this file.
      8 
      9 ####################
     10 #  m4 includes
     11 m4_include(m4/acx_pthread.m4)
     12 ####################
     13 #  Autoconf/Automake Initialization
     14 
     15 dnl AC_INIT(PKG_NAME, CONFIG_VERSION, BUG_REPORTER)
     16 AC_INIT([MCLinker],[1.1],[mclinker (a] googlegroups.com])
     17 AC_PREREQ(2.59)
     18 
     19 AC_CONFIG_SRCDIR([./COPYING])
     20 AC_CONFIG_MACRO_DIR([m4])
     21 
     22 AM_INIT_AUTOMAKE([1.9 dist-bzip2 foreign])
     23 
     24 ####################
     25 #  Versioning, see VERSION
     26 MAJOR=0
     27 MINOR=2
     28 MICRO=10
     29 AGE=1
     30 BUILD=18peaks
     31 
     32 DEV_VERSION=$MAJOR.$MINOR.$MICRO.$AGE-$BUILD
     33 PKG_VERSION=$MAJOR.$MINOR.$MICRO-$BUILD
     34 MCLD_VERSION=$DEV_VERSION
     35 AC_SUBST(MCLD_VERSION)
     36 
     37 ####################
     38 #  Languages
     39 AC_PROG_CC
     40 AC_PROG_CXX
     41 AC_LANG([C++])
     42 LT_INIT
     43 
     44 ####################
     45 #  Check for libraries
     46 
     47 #  Configure pthreads.
     48 AC_ARG_WITH([pthreads],
     49             [AS_HELP_STRING([--with-pthreads],
     50                [use pthreads (default is yes)])],
     51             [with_pthreads=$withval],
     52             [with_pthreads=check])
     53 
     54 have_pthreads=no
     55 AS_IF([test "x$with_pthreads" != "xno"],
     56       [ACX_PTHREAD(
     57         [],
     58         [AS_IF([test "x$with_pthreads" != "xcheck"],
     59                [AC_MSG_FAILURE(
     60                  [--with-pthreads was specified, but unable to be used])])])
     61        have_pthreads="$acx_pthread_ok"])
     62 AM_CONDITIONAL([HAVE_PTHREADS],[test "x$have_pthreads" == "xyes"])
     63 AC_SUBST(PTHREAD_CFLAGS)
     64 AC_SUBST(PTHREAD_LIBS)
     65 
     66 # Configure Unit-test
     67 AC_ARG_ENABLE(unittest,
     68             [AS_HELP_STRING([--enable-unittest],
     69                 [turn on unit-tests (default is no)])],
     70             [case "${enableval}" in
     71               yes) unittest=true ;;
     72               no)  unittest=false ;;
     73               *) AC_MSG_ERROR(bad value ${enableval} for --enable-unittest) ;;
     74              esac],
     75              [unittest=false])
     76 AM_CONDITIONAL([ENABLE_UNITTEST],[test "x${unittest}" == "xtrue" ])
     77 
     78 ####################
     79 # Configure LLVM
     80 CHECK_LLVM([3.0])
     81 ENUM_LLVM_TARGETS
     82 
     83 ####################
     84 # OUTPUT
     85 AC_CONFIG_FILES([VERSION])
     86 AC_CONFIG_FILES([Makefile])
     87 AC_CONFIG_FILES([debug/Makefile])
     88 AC_CONFIG_FILES([optimized/Makefile])
     89 AC_CONFIG_FILES([utils/Makefile])
     90 AC_CONFIG_FILES([utils/gtest/Makefile])
     91 AC_CONFIG_FILES([utils/gtest/obj/Makefile])
     92 AC_CONFIG_FILES([include/mcld/Config/Targets.def])
     93 AC_CONFIG_FILES([include/mcld/Config/Linkers.def])
     94 AC_CONFIG_FILES([include/mcld/Config/Config.h])
     95 AC_CONFIG_FILES([test/Makefile])
     96 
     97 AC_OUTPUT
     98