summaryrefslogtreecommitdiff
path: root/configure.ac
blob: 2130547e932fef360a5e9520df0fef261045c895 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
# Copyright (C) 2009, 2012 Free Software Foundation, Inc.
# 
# This file is part of the POSIX threading library.
#
# This program is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the
# Free Software Foundation; either version 2, or (at your option) any later
# version.
# 
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
# for more details.
# 
# You should have received a copy of the GNU General Public License along
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

m4_include([package.m4])
AC_INIT(
  [AC_PACKAGE_NAME],
  [AC_PACKAGE_VERSION],
  [AC_PACKAGE_BUGREPORT],
  [AC_PACKAGE_TARNAME]
)
AC_CONFIG_SRCDIR([include/pthread/pthread.h])
AC_CONFIG_AUX_DIR([build-aux])

AM_INIT_AUTOMAKE(
dnl Don't define `PACKAGE' and `VERSION'.
  [no-define]
dnl We require GNU make.
  [-Wall -Wno-portability]
)

AC_PROG_CC

AC_CHECK_FUNCS([uselocale])
AC_CHECK_LIB([ihash], [hurd_ihash_create], [:],
  [AC_MSG_ERROR([need libihash])]
)

AC_GNU_SOURCE

AC_CANONICAL_HOST
[arch_i386=false
case $host_cpu in
  i386 | i486 | i586 | i686)
    arch_i386=true
    ;;
  *)]
    AC_MSG_ERROR([unsupported architecture])
    [;;
esac]
AM_CONDITIONAL([ARCH_I386], [$arch_i386])
[os_gnu=false
case $host_os in
  gnu*)
    os_gnu=true
    ;;
  *)]
    AC_MSG_ERROR([unsupported system])
    [;;
esac]
AM_CONDITIONAL([OS_GNU], [$os_gnu])

AM_CONDITIONAL([ENABLE_TESTS], [false])

LT_INIT

AC_CONFIG_HEADERS([config.h])
AC_CONFIG_FILES(
  [Makefile.pre:Makefile.in]
)
# See the comment in `Makefile.am'.
AC_CONFIG_COMMANDS([Makefile],
  [# This is OK to get us going, the Makefile will then do the rest.
  cp Makefile.pre Makefile &&
  rm -f Makefile.stamp]
)

AC_OUTPUT