Welcome to mirror list, hosted at ThFree Co, Russian Federation.

configure.ac - github.com/Unity-Technologies/libatomic_ops.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 5d9d245450831fa2c6221d9c1230ac8e917ef1d5 (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
# Process this file with autoconf to produce a configure script.
AC_INIT([libatomic_ops],[1.1])
AC_CANONICAL_TARGET([])
AC_CONFIG_SRCDIR(src/atomic_ops.c)
AM_INIT_AUTOMAKE
AC_PROG_RANLIB

AM_CONFIG_HEADER(src/config.h)

# Checks for programs.
AC_PROG_CC
AM_PROG_AS

# Checks for functions.
AC_FUNC_MMAP

# Checks for header files.
AC_HEADER_STDC
# AC_CHECK_HEADERS([ ])

# Determine PIC flag, adjust default CFLAGS
need_asm=false
PICFLAG=
AC_MSG_CHECKING(Determining PIC compiler flag)
if test "$GCC" = yes; then
  AC_MSG_RESULT(-fPIC)
  PICFLAG=-fPIC
else
  case "$host" in
    *-*-hpux*)
      AC_MSG_RESULT("+Z")
      PICFLAG="+Z"
      if test "$GCC" != yes; then
        CFLAGS="$CFLAGS +O2 -mt"
      fi
      ;;
    *-*-solaris*)
      AC_MSG_RESULT(-Kpic)
      PICFLAG=-Kpic
      if test "$GCC" != yes; then
        CFLAGS="$CFLAGS -O"
        need_asm=true
      fi
      ;;
    *-*-linux*)
      AC_MSG_RESULT(-fPIC)
      PICFLAG=-fPIC
      # Any Linux compiler had better be gcc compatible.
      ;;
    *)
      AC_MSG_RESULT("<none>")
      ;;
  esac
fi
CFLAGS="$CFLAGS -DNDEBUG"

AC_SUBST(PICFLAG)
AC_SUBST(DEFS)

AM_CONDITIONAL(NEED_ASM, test x$need_asm = xtrue)

AC_CONFIG_FILES([Makefile src/Makefile src/atomic_ops/Makefile src/atomic_ops/sysdeps/Makefile doc/Makefile tests/Makefile])
AC_CONFIG_COMMANDS([default],[[]],[[PICFLAG=${PICFLAG}
CC=${CC}
DEFS=${DEFS}]])
AC_OUTPUT