Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: f8a2728872
Fetching contributors…

Cannot retrieve contributors at this time

file 63 lines (49 sloc) 1.572 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
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.

AC_PREREQ([2.68])

AC_INIT([simplepgp], [1.0RC2], [trevor@trevorbentley.com])
AC_COPYRIGHT(Trevor Bentley 2011)

AC_CONFIG_SRCDIR([src/packet.c])
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_FILES([Makefile simplepgp.pc])

AM_INIT_AUTOMAKE([subdir-objects foreign])
AC_PROG_LIBTOOL

AC_CONFIG_MACRO_DIR([m4])

# Checks for programs.
AC_PROG_CC

AC_ARG_WITH(zlib,
  [ --with-zlib=DIR use libz in DIR],[
    if test -d "$withval"; then
      CPPFLAGS="${CPPFLAGS} -I$withval/include"
      LDFLAGS="${LDFLAGS} -L$withval/lib"
    fi
  ])

AC_CHECK_HEADER(zlib.h,
      AC_CHECK_LIB(z, inflateInit2_,
       ZLIBS="-lz",
       CPPFLAGS=${_cppflags} LDFLAGS=${_ldflags}),
       CPPFLAGS=${_cppflags} LDFLAGS=${_ldflags})

# Checks for libraries.
AC_CHECK_LIB([gcrypt],[gcry_md_open],[],[
echo "libgcrypt is required for this program"
exit -1])
AC_CHECK_LIB([gpg-error],[gpg_err_init],[],[
echo "gpg-error is required for this program"
exit -1])
AC_CHECK_LIB([z],[inflate],[],[
echo "zlib is required for this program"
exit -1])


# Checks for header files.
AC_CHECK_HEADERS([locale.h stddef.h stdint.h stdlib.h string.h sys/socket.h sys/time.h wchar.h])

# Checks for typedefs, structures, and compiler characteristics.
AC_TYPE_PID_T
AC_TYPE_SIZE_T
AC_TYPE_SSIZE_T
AC_TYPE_UINT16_T
AC_TYPE_UINT32_T
AC_TYPE_UINT8_T

# Checks for library functions.
AC_FUNC_MALLOC
AC_FUNC_REALLOC
AC_CHECK_FUNCS([memmove memset setlocale])

AC_OUTPUT
Something went wrong with that request. Please try again.