forked from gostor/gotgt
-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure.ac
60 lines (47 loc) · 1.19 KB
/
configure.ac
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
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_PREREQ([2.69])
AC_INIT([gotgt], [0.1.0], [github.com/gostor])
AM_INIT_AUTOMAKE([-Wall -Werror foreign subdir-objects])
# Checks for programs.
AC_PROG_CC
AM_PROG_AR
AC_PROG_RANLIB
AC_CANONICAL_BUILD
case $build_os in
darwin*)
AM_CONDITIONAL([ON_DARWIN], [ true ])
;;
*)
AM_CONDITIONAL([ON_DARWIN], [ false ])
;;
esac
# Checks for go tool chain
AC_CHECK_PROG([has_go], [go], [yes], [no])
if test "x$has_go" != "xyes" ; then
AC_MSG_ERROR(Unable to find go binary in PATH)
fi
# Platform specific setup
AC_CANONICAL_HOST
case $host_os in
linux*) AM_CONDITIONAL([ON_LINUX], [ true ]) ;;
*) AM_CONDITIONAL([ON_LINUX], [ false ]) ;;
esac
# Checks for header files.
AC_CHECK_HEADERS([stdlib.h string.h])
# Checks for typedefs, structures, and compiler characteristics.
AC_CHECK_HEADER_STDBOOL
AC_TYPE_PID_T
AC_TYPE_UINT32_T
AC_TYPE_UINT8_T
# Checks for library functions.
AC_FUNC_MALLOC
AC_CHECK_FUNCS([strdup])
AC_CONFIG_FILES([Makefile])
AC_OUTPUT
AC_MSG_RESULT([
${PACKAGE} ${VERSION}
build OS: ${build_os}
prefix: ${prefix}
has go: ${has_go}
])