File: configure.ac

package info (click to toggle)
cjose 0.6.1%2Bdfsg1-1%2Bdeb11u1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 2,456 kB
  • sloc: ansic: 8,734; sh: 4,181; makefile: 95
file content (86 lines) | stat: -rw-r--r-- 2,103 bytes parent folder | download | duplicates (2)
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
#
#
#

### Prerequisites
AC_INIT([cjose], [0.6.1])
AM_INIT_AUTOMAKE([foreign])
LT_PREREQ([2.2])
LT_INIT([dlopen])
AC_CONFIG_MACRO_DIR([m4])

### Basic program checks
AC_PROG_CC

### Check for Doxygen
DX_FEATURE_pdf([OFF])
DX_FEATURE_ps([OFF])
DX_INIT_DOXYGEN([CJOSE], [Doxyfile], [doc])

### Check for CHECK
PKG_CHECK_MODULES([CHECK],
        [check >= 0.9.4],
        [have_check="yes"],
        [   AC_MSG_WARN([Check not found; cannot run unit tests!]);
            [have_check="no"]
        ])
AM_CONDITIONAL(HAVE_CHECK, test x"$have_check" = "xyes")

#### Find OpenSSL
AC_MSG_CHECKING([for --with-openssl])
AC_ARG_WITH(
    [openssl],
    [AS_HELP_STRING([--with-openssl],[Location where OpenSSL can be found])],
    [ LDFLAGS="$LDFLAGS -L$with_openssl/lib";
      CFLAGS="$CFLAGS -I$with_openssl/include/";
      CPPFLAGS="$CPPFLAGS -I$with_openssl/include/";
      AC_MSG_RESULT([$with_openssl])
    ],
    [ AC_MSG_RESULT([no])]
)

AC_CHECK_LIB([crypto],
    [CRYPTO_new_ex_data],
    [],
    [AC_MSG_ERROR([OpenSSL is missing; it is required for this software])]
)

##### Check for Fundamental EC #####
AC_CHECK_HEADERS([openssl/fec.h])

#### Find Jansson
AC_MSG_CHECKING([for --with-jansson])
AC_ARG_WITH(
    [jansson],
    [AS_HELP_STRING([--with-jansson], [Location where Jansson can be found])],
    [ LDFLAGS="$LDFLAGS -L$with_jansson/lib";
      CFLAGS="$CFLAGS -I$with_jansson/include/";
      CPPFLAGS="$CPPFLAGS -I$with_jansson/include/";
      AC_MSG_RESULT([$with_jansson])
    ],
    [ AC_MSG_RESULT([no])]
)

AC_CHECK_LIB([jansson],
    [json_object],
    [],
    [AC_MSG_ERROR([Jansson is missing; it is required for this software])]
)

AM_EXTRA_RECURSIVE_TARGETS([package])
AC_CONFIG_FILES([Makefile
                 include/Makefile include/cjose/version.h
                 src/Makefile
                 test/Makefile
                 doc/Makefile doc/Doxyfile
                 cjose.pc])

AC_OUTPUT

echo "
  ($PACKAGE_NAME) version $PACKAGE_VERSION
  Prefix.........: $prefix
  Using OpenSSL..: $with_openssl
  Using Jansson..: $with_jansson
  Unit tests.....: $have_check
"