2 # Process this file with autoconf to produce a configure script.
3 # Copyright (c) 2007-2016 John Hurst. All rights reserved.
5 # Redistribution and use in source and binary forms, with or without
6 # modification, are permitted provided that the following conditions
8 # 1. Redistributions of source code must retain the above copyright
9 # notice, this list of conditions and the following disclaimer.
10 # 2. Redistributions in binary form must reproduce the above copyright
11 # notice, this list of conditions and the following disclaimer in the
12 # documentation and/or other materials provided with the distribution.
13 # 3. The name of the author may not be used to endorse or promote products
14 # derived from this software without specific prior written permission.
16 # THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
17 # IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
18 # OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
19 # IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
20 # INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
21 # NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
22 # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
23 # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
25 # THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 # If you change this, you should update the libtool version number specified
29 # in src/Makefile.am. Read <http://www.gnu.org/software/libtool/manual.html#Versioning>
30 # for suggestions on doing so.
32 # The version number consists of three segments: major, API minor, and
33 # implementation minor. Whenever a change is made to AS_DCP.h, the API minor
34 # version will increment. Changes made to the internal implementation will
35 # result in the incrementing of the implementation minor version.
37 # For example, if asdcplib version 1.0.0 were modified to accomodate changes
38 # in file format, and if no changes were made to AS_DCP.h, the new version would be
39 # 1.0.1. If changes were also required in AS_DCP.h, the new version would be 1.1.1.
40 AC_INIT([asdcplib], [2.12.2], [asdcplib@cinecert.com])
42 AC_CONFIG_AUX_DIR([build-aux])
43 AC_CONFIG_SRCDIR([src/KM_error.h])
44 #AC_CONFIG_HEADER([src/config.h])
45 AM_INIT_AUTOMAKE([1.9 foreign])
47 AC_CONFIG_MACRO_DIR([m4])
49 # Checks for programs.
53 openbsd*) openbsd_host=true ;;
54 *) openbsd_host=false ;;
56 AM_CONDITIONAL([OPENBSD_HOST], [test x$openbsd_host = xtrue])
64 if test "$ac_cv_sys_largefile_CC" != no; then
65 CXX=$CXX$ac_cv_sys_largefile_CC
68 AX_LIB_OPENSSL([0.9.7])
72 AC_ARG_ENABLE([freedist],
73 [ --enable-freedist ensure source distribution is of BSD-licensed code],
74 [case "${enableval}" in
76 AC_MSG_WARN([BSD licensed ASDCPlib creation ENABLED.]) ;;
78 *) AC_MSG_ERROR([bad value ${enableval} for --enable-freedist]) ;;
79 esac],[freedist=false])
80 AM_CONDITIONAL([FREEDIST], [test x$freedist = xtrue])
81 AC_ARG_ENABLE([dev-headers],
82 [ --enable-dev-headers install development headers],
83 [case "${enableval}" in
84 yes) dev_headers=true ;;
85 no) dev_headers=false ;;
86 *) AC_MSG_ERROR([bad value ${enableval} for --enable-dev-headers]) ;;
87 esac],[dev_headers=false])
88 AM_CONDITIONAL([DEV_HEADERS], [test x$dev_headers = xtrue])
89 AC_ARG_ENABLE([random-case-UUID],
90 [ --enable-random-case-UUID encode randomly-cased UUID values when the environment variable KM_USE_RANDOM_UUID is set],
91 [case "${enableval}" in
92 yes) random_case_UUID=true ;;
93 no) random_case_UUID=false ;;
94 *) AC_MSG_ERROR([bad value ${enableval} for --enable-random-case-UUID]) ;;
95 esac],[random_case_UUID=false])
96 AM_CONDITIONAL([ENABLE_RANDOM_UUID], [test x$random_case_UUID = xtrue])
97 AC_ARG_ENABLE([as-02],
98 [ --enable-as-02 enable support for SMPTE ST 2067-5 MXF files, A.K.A. AS-02],
99 [case "${enableval}" in
100 yes) as_02_use=true ;;
101 no) as_02_use=false ;;
102 *) AC_MSG_ERROR([bad value ${enableval} for --enable-as-02]) ;;
103 esac],[as_02_use=false])
104 AM_CONDITIONAL([USE_AS_02], [test x$as_02_use = xtrue])
105 AC_ARG_ENABLE([asdcp-jxs],
106 [ --enable-asdcp-jxs enable support wrapping JPEG XS files],
107 [case "${enableval}" in
108 yes) asdcp_jxs_use=true ;;
109 no) asdcp_jxs_use=false ;;
110 *) AC_MSG_ERROR([bad value ${enableval} for --enable-asdcp-jxs]) ;;
111 esac],[asdcp_jxs_use=false])
112 AM_CONDITIONAL([USE_ASDCP_JXS], [test x$asdcp_jxs_use = xtrue])
113 AC_ARG_ENABLE([phdr],
114 [ --enable-phdr enable support for Prototype for High Dyamic Range in AS-02],
115 [case "${enableval}" in
116 yes) AS_IF([test x$as_02_use = xtrue], phdr_use=true, AC_MSG_ERROR([--enable-phdr cannot be used without --enable-as-02])) ;;
117 no) phdr_use=false ;;
118 *) AC_MSG_ERROR([bad value ${enableval} for --enable-phdr]) ;;
119 esac],[phdr_use=false])
120 AM_CONDITIONAL([USE_PHDR], [test x$phdr_use = xtrue])
122 # Checks for libraries.
123 AC_CHECK_LIB([pthread], [pthread_create])
125 # Checks for header files.
128 #AC_CHECK_HEADERS([arpa/inet.h fcntl.h limits.h netinet/in.h stdlib.h string.h sys/socket.h unistd.h wchar.h])
130 # Checks for typedefs, structures, and compiler characteristics.
137 # Checks for library functions.
138 #AC_FUNC_CLOSEDIR_VOID
142 #AC_CHECK_FUNCS([getcwd memset regcomp strchr strerror strrchr strstr strtol])
144 AC_CONFIG_FILES([Makefile
147 win32/Makefile.mak:win32/Makefile32.wmk])