• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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
11m4_include(m4/acx_pthread.m4)
12####################
13#  Autoconf/Automake Initialization
14
15dnl AC_INIT(PKG_NAME, CONFIG_VERSION, BUG_REPORTER)
16AC_INIT([MCLinker],[1.1],[mclinker@googlegroups.com])
17AC_PREREQ(2.59)
18
19AC_CONFIG_SRCDIR([./COPYING])
20AC_CONFIG_MACRO_DIR([m4])
21
22AM_INIT_AUTOMAKE([1.9 dist-bzip2 foreign])
23
24####################
25#  Versioning, see VERSION
26MAJOR=0
27MINOR=2
28MICRO=10
29AGE=1
30BUILD=18peaks
31
32DEV_VERSION=$MAJOR.$MINOR.$MICRO.$AGE-$BUILD
33PKG_VERSION=$MAJOR.$MINOR.$MICRO-$BUILD
34MCLD_VERSION=$DEV_VERSION
35AC_SUBST(MCLD_VERSION)
36
37####################
38#  Languages
39AC_PROG_CC
40AC_PROG_CXX
41AC_LANG([C++])
42LT_INIT
43
44####################
45#  Check for libraries
46
47#  Configure pthreads.
48AC_ARG_WITH([pthreads],
49            [AS_HELP_STRING([--with-pthreads],
50               [use pthreads (default is yes)])],
51            [with_pthreads=$withval],
52            [with_pthreads=check])
53
54have_pthreads=no
55AS_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"])
62AM_CONDITIONAL([HAVE_PTHREADS],[test "x$have_pthreads" == "xyes"])
63AC_SUBST(PTHREAD_CFLAGS)
64AC_SUBST(PTHREAD_LIBS)
65
66# Configure Unit-test
67AC_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])
76AM_CONDITIONAL([ENABLE_UNITTEST],[test "x${unittest}" == "xtrue" ])
77
78####################
79# Configure LLVM
80CHECK_LLVM([3.0])
81ENUM_LLVM_TARGETS
82
83####################
84# OUTPUT
85AC_CONFIG_FILES([VERSION])
86AC_CONFIG_FILES([Makefile])
87AC_CONFIG_FILES([debug/Makefile])
88AC_CONFIG_FILES([optimized/Makefile])
89AC_CONFIG_FILES([utils/Makefile])
90AC_CONFIG_FILES([utils/gtest/Makefile])
91AC_CONFIG_FILES([utils/gtest/obj/Makefile])
92AC_CONFIG_FILES([include/mcld/Config/Targets.def])
93AC_CONFIG_FILES([include/mcld/Config/Linkers.def])
94AC_CONFIG_FILES([include/mcld/Config/Config.h])
95AC_CONFIG_FILES([test/Makefile])
96
97AC_OUTPUT
98