forked from thayama/libshjpeg
-
Notifications
You must be signed in to change notification settings - Fork 3
/
configure.ac
118 lines (102 loc) · 4.29 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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_PREREQ([2.63])
AC_INIT([libshjpeg], [1.3.7], [[email protected]])
AC_SUBST([LIBSHJPEG_VERSION], [1.3.7])
################################################################################
# Set the shared versioning info, according to section 6.3 of the libtool info #
# pages. CURRENT:REVISION:AGE must be updated immediately before each release: #
# #
# * If the library source code has changed at all since the last #
# update, then increment REVISION (`C:R:A' becomes `C:r+1:A'). #
# #
# * If any interfaces have been added, removed, or changed since the #
# last update, increment CURRENT, and set REVISION to 0. #
# #
# * If any interfaces have been added since the last public release, #
# then increment AGE. #
# #
# * If any interfaces have been removed since the last public release, #
# then set AGE to 0. #
# #
################################################################################
AC_SUBST([LIBSHJPEG_VERSION_INFO], [4:7:3])
AM_INIT_AUTOMAKE([-Wall -Werror])
AC_CONFIG_SRCDIR([src/shjpeg_decode.c])
AC_CONFIG_HEADERS([config.h])
AC_ARG_WITH([libjpeg-path],
AS_HELP_STRING([--with-libjpeg-path=<path>],
[path to libjpeg source files for version to use on target]),
libjpeg_inc_path=$withval
fi])
AM_CONDITIONAL(MAKE_JPEG_WRAPPER, test x = x)
AM_CONDITIONAL(CUSTOM_JPEG_LIB, test x$libjpeg_inc_path != x)
PKG_CHECK_MODULES(DIRECTFB, directfb >= 1.4.0, HAVE_DIRECTFB=yes, HAVE_DIRECTFB=no)
PKG_CHECK_MODULES(UIOMUX, uiomux >= 1.6.0)
AM_CONDITIONAL(MAKE_DIRECTFB_TEST, test x$HAVE_DIRECTFB = xyes)
AC_SUBST([libjpeg_inc_path])
AC_CANONICAL_BUILD
AC_CANONICAL_HOST
# Checks for programs.
AC_PROG_CC
AM_PROG_CC_C_O
AC_PROG_INSTALL
AC_PROG_LIBTOOL
AC_C_INLINE
# Check for external programs
AC_CHECK_PROG(HAVE_PKG_CONFIG, pkg-config, yes)
AC_CHECK_PROG(HAVE_DOXYGEN, doxygen, true, false)
AM_CONDITIONAL(HAVE_DOXYGEN, $HAVE_DOXYGEN)
if test $HAVE_DOXYGEN = "false"; then
AC_MSG_WARN([*** doxygen not found, docs will not be built])
fi
# Checks for libraries.
AC_CHECK_LIB([dl], [dlopen],, [AC_MSG_ERROR([libdl not found!])])
AC_DEFINE(LIBJPEG_WRAPPER_SUPPORT, 1, [Indicate support of libjpeg wrapper])
# Checks for header files.
AC_CHECK_HEADERS([fcntl.h sys/param.h stdint.h string.h sys/ioctl.h unistd.h jpeglib.h malloc.h])
# Checks for typedefs, structures, and compiler characteristics.
AC_HEADER_STDBOOL
AC_C_INLINE
AC_TYPE_INT16_T
AC_TYPE_INT32_T
AC_TYPE_INT64_T
AC_TYPE_INT8_T
AC_TYPE_SIZE_T
AC_TYPE_UINT16_T
AC_TYPE_UINT32_T
AC_TYPE_UINT64_T
AC_TYPE_UINT8_T
# Checks for library functions.
#AC_FUNC_MALLOC
AC_FUNC_MMAP
AC_CHECK_FUNCS([getpagesize memset munmap strerror])
# Checks for a color space conversion library
ac_enable_vio=yes
AC_ARG_ENABLE(vio,
[ --disable-vio disable color space conversion by VIO ],
[ ac_enable_vio=no ], [ ac_enable_vio=yes] )
if test "x${ac_enable_vio}" = xyes ; then
PKG_CHECK_MODULES(SHVIO, shvio >= 1.7.0, HAVE_SHVIO=yes, HAVE_SHVIO=no)
if test "x$HAVE_SHVIO" = "xyes" ; then
AC_DEFINE(HAVE_SHVIO, [1], [Define to 1 if you have SHVIO])
AC_ARG_WITH([vio-name],
[AS_HELP_STRING([--with-vio-name=<name>],
[name to identify an appropriate uio device for libshvio [default=VEU]])],
[SHVIO_NAME=$withval], [SHVIO_NAME="VEU"])
AC_DEFINE_UNQUOTED(SHVIO_UIO_NAME, "$SHVIO_NAME",
[Specify name to identify an appropriate UIO device for libshvio])
fi
fi
AM_CONDITIONAL(HAVE_SHVIO, [test "x$HAVE_SHVIO" = "xyes"])
AC_CONFIG_FILES([Makefile
src/Makefile
gen/Makefile
doc/Makefile
doc/Doxyfile
tests/Makefile
include/Makefile
include/shjpeg/Makefile
include/libjpeg_wrap/Makefile
shjpeg.pc])
AC_OUTPUT