-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathconfigure.ac
97 lines (81 loc) · 2.52 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
# -*- Autoconf -*-
#
# Copyright (C) 2014, Enrico M. Crisostomo
#
# 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 3, 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, see <http://www.gnu.org/licenses/>.
#
# Process this file with autoconf to produce a configure script.
#
AC_PREREQ([2.69])
AC_INIT([fsw], [1.4.0], [[email protected]], [], [https://github.com/emcrisostomo/fsw])
AC_COPYRIGHT([2014 (C) Enrico M. Crisostomo])
AC_REVISION([$Revision: 1.4.0-1 $])
AC_CONFIG_SRCDIR([fsw.cpp])
AC_CONFIG_AUX_DIR([config])
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_FILES([Makefile])
AC_CONFIG_FILES([scripts/fswatch-run-bash scripts/fswatch-run-zsh])
AC_CONFIG_MACRO_DIRS([m4])
AC_CONFIG_MACRO_DIR([m4])
# Other packages
AC_CONFIG_SUBDIRS([libfsw])
# Initialize Automake
AM_INIT_AUTOMAKE([-Wall -Werror gnu subdir-objects])
AM_PROG_AR
# Initialize libtool
LT_PREREQ([2.4.2])
LT_INIT
AC_SUBST([LIBTOOL_DEPS])
# Configure language
AC_LANG(C++)
# Checks for programs.
AC_PROG_CXX([clang++ g++])
AC_PROG_LN_S
AC_PATH_PROG([ZSH_PROG], [zsh], [no])
AC_PATH_PROG([BASH_PROG], [bash], [no])
if test "x${ZSH_PROG}" = "xno" && test "x${BASH_PROG}" = "xno" ; then
AC_MSG_WARN([Either ZSH or the Bash shell is required by fswatch-run.])
fi
AM_CONDITIONAL([HAVE_ZSH], [test "x${ZSH_PROG}" != "xno"])
AM_CONDITIONAL([HAVE_BASH], [test "x${BASH_PROG}" != "xno"])
if test "x${ZSH_PROG}" = "xno" ; then
ZSH_PATH=/bin/zsh
else
ZSH_PATH=$ZSH_PROG
fi
if test "x${BASH_PROG}" = "xno" ; then
BASH_PATH=/bin/bash
else
BASH_PATH=$BASH_PROG
fi
AC_SUBST([ZSH_PATH])
AC_SUBST([BASH_PATH])
# Configure C++ compiler
AX_CXX_COMPILE_STDCXX_11(noext)
AX_CXXFLAGS_WARN_ALL
# Checks for libraries.
# Checks for header files.
AC_CHECK_HEADERS([stdlib.h getopt.h])
# Checks for typedefs, structures, and compiler characteristics.
AC_CHECK_HEADER_STDBOOL
# Checks for library functions.
AC_FUNC_STRTOD
AC_CHECK_FUNCS([getopt_long])
AC_CHECK_FUNCS(
[realpath],
,
AC_MSG_ERROR([The realpath function cannot be found.])
)
AC_CHECK_FUNCS([regcomp])
AC_OUTPUT