-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathconfigure.ac
More file actions
110 lines (83 loc) · 3 KB
/
Copy pathconfigure.ac
File metadata and controls
110 lines (83 loc) · 3 KB
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
98
99
100
101
102
103
104
105
106
107
108
109
110
AC_INIT([libexsid], [2.1], [], [], [https://github.com/libsidplayfp/exsid-driver])
AC_CONFIG_AUX_DIR([build-aux])
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_SRCDIR([exSID.c])
AC_CONFIG_HEADERS([config.h])
AM_INIT_AUTOMAKE
dnl Initialize libtool.
LT_INIT([win32-dll])
PKG_PROG_PKG_CONFIG
AC_CANONICAL_HOST
AC_PROG_CC
AC_C_RESTRICT
AC_C_INLINE
dnl The dlopen() function is in the C library for *BSD and in
dnl libdl on GLIBC-based systems. Use native functions on MinGW.
AS_CASE([$host_os],
[mingw*], [MINGW32=yes],
[AC_SEARCH_LIBS([dlopen], [dl dld], [], [AC_MSG_ERROR([unable to find the dlopen() function])])]
)
AM_CONDITIONAL([MINGW32], [test "x$MINGW32" = "xyes"])
# debug options
AC_MSG_CHECKING([for debugging])
AC_ARG_ENABLE(debug, [AS_HELP_STRING([--enable-debug], [compile for debugging @<:@no/yes, default=no@:>@])],
[], [enable_debug=no])
AS_IF([test "x$enable_debug" = "xno"],
[AC_MSG_RESULT([Build without debugging messages]); debug_flags=-DNDEBUG],
[AC_MSG_RESULT([Build with debugging messages]); debug_flags=-DDEBUG]
)
AC_SUBST([debug_flags])
# check for libraries
AC_CHECK_HEADERS([ftd2xx.h],
[AC_DEFINE([HAVE_FTD2XX], 1, [Define to 1 if you have ftd2xx.h])],
[AC_MSG_WARN([ftd2xx.h not found, support will not be available])]
)
AC_MSG_CHECKING([for libftdi1])
PKG_CHECK_EXISTS([libftdi1 >= 1.0],
[AC_DEFINE([HAVE_FTDI], 1, [Define to 1 if you have ftdi.h])
FTDI_CFLAGS=`$PKG_CONFIG --cflags libftdi1`
AC_MSG_RESULT([yes])],
[AC_MSG_WARN([libftdi1 not found, support will not be available])]
)
AC_SUBST([FTDI_CFLAGS])
# check for thread model if available
AX_PTHREAD(
[AC_DEFINE([EXSID_THREADED], 1, [Define for threaded driver])]
[AC_DEFINE([HAVE_PTHREAD_H], 1, [Define to 1 if you have pthread.h])]
)
eval loadable_shrext=$shrext_cmds
AC_DEFINE_UNQUOTED([SHLIBEXT], ["${loadable_shrext}"], [Shared library extension])
AC_CACHE_CHECK([for __builtin_expect], [exsid_cv_builtin_expect],
[AC_COMPILE_IFELSE([AC_LANG_SOURCE([int main() { __builtin_expect(0, 0); }])],
[exsid_cv_builtin_expect=yes], [exsid_cv_builtin_expect=no])]
)
AS_IF([test "$exsid_cv_builtin_expect" = yes],
[AC_DEFINE([HAVE_BUILTIN_EXPECT], 1, [Define to 1 if you have builtin_expect.])]
)
# doxygen
AC_CHECK_PROGS([DOXYGEN], [doxygen])
AS_IF([test -z "$DOXYGEN"],
[AC_MSG_WARN([Doxygen not found - continuing without Doxygen support])],
[AC_CHECK_PROG([DOT], [dot], [YES], [NO])]
)
AM_CONDITIONAL([HAVE_DOXYGEN], [test -n "$DOXYGEN"])
AM_COND_IF([HAVE_DOXYGEN], [AC_CONFIG_FILES([Doxyfile])])
dnl libtool-style version-info number
#
# https://autotools.io/libtool/version.html
#
# Always increase the revision value.
#
# Increase the current value whenever an interface has been added, removed or changed.
#
# Increase the age value only if the changes made to the ABI are backward compatible.
LIBEXSIDCUR=2
LIBEXSIDREV=0
LIBEXSIDAGE=0
LIBEXSIDVERSION=$LIBEXSIDCUR:$LIBEXSIDREV:$LIBEXSIDAGE
AC_SUBST(LIBEXSIDVERSION)
AC_CONFIG_FILES([
Makefile
libexsid.pc
])
AC_OUTPUT