| 1 |
# Process this file with autoconf to produce a configure script. |
|---|
| 2 |
AC_INIT([AdvanceCOMP],[1.9]) |
|---|
| 3 |
AC_CONFIG_SRCDIR([rezip.cc]) |
|---|
| 4 |
AM_INIT_AUTOMAKE([foreign no-dependencies]) |
|---|
| 5 |
AC_CONFIG_HEADERS([config.h]) |
|---|
| 6 |
AC_CANONICAL_HOST |
|---|
| 7 |
|
|---|
| 8 |
# Checks for programs. |
|---|
| 9 |
AC_PROG_CXX |
|---|
| 10 |
AC_PROG_CC |
|---|
| 11 |
AC_PROG_INSTALL |
|---|
| 12 |
AC_PROG_AWK |
|---|
| 13 |
AC_CHECK_PROGS(TAR, tar) |
|---|
| 14 |
AC_CHECK_PROGS(GZIP, gzip) |
|---|
| 15 |
AC_CHECK_PROGS(GROFF, groff) |
|---|
| 16 |
AC_CHECK_PROGS(COL, col) |
|---|
| 17 |
|
|---|
| 18 |
# Checks for libraries. |
|---|
| 19 |
AC_CHECK_LIB([z], [adler32]) |
|---|
| 20 |
|
|---|
| 21 |
# Checks for header files. |
|---|
| 22 |
AC_HEADER_STDC |
|---|
| 23 |
AC_CHECK_HEADERS([unistd.h utime.h sys/utime.h stdarg.h varargs.h getopt.h]) |
|---|
| 24 |
|
|---|
| 25 |
# Checks for typedefs, structures, and compiler characteristics. |
|---|
| 26 |
AC_C_CONST |
|---|
| 27 |
AC_C_INLINE |
|---|
| 28 |
|
|---|
| 29 |
# Checks for library functions. |
|---|
| 30 |
AC_CHECK_FUNCS([getopt getopt_long snprintf vsnprintf]) |
|---|
| 31 |
|
|---|
| 32 |
AC_DEFINE(USE_7Z,1,[Use the 7z library]) |
|---|
| 33 |
AC_DEFINE(USE_LZMA,1,[Use the lzma compression]) |
|---|
| 34 |
|
|---|
| 35 |
AC_ARG_ENABLE( |
|---|
| 36 |
bzip2, |
|---|
| 37 |
[ --enable-bzip2 Use the bzip2 compression], |
|---|
| 38 |
AC_DEFINE(USE_BZIP2,1,[Use the bzip2 compression]) |
|---|
| 39 |
AC_CHECK_LIB([bz2],[BZ2_bzBuffToBuffCompress]) |
|---|
| 40 |
) |
|---|
| 41 |
|
|---|
| 42 |
# Configure the library |
|---|
| 43 |
CFLAGS="$CFLAGS -DUSE_ERROR_SILENT -DUSE_COMPRESS" |
|---|
| 44 |
CXXFLAGS="$CXXFLAGS -DUSE_ERROR_SILENT -DUSE_COMPRESS" |
|---|
| 45 |
|
|---|
| 46 |
AC_CONFIG_FILES([Makefile]) |
|---|
| 47 |
AC_OUTPUT |
|---|
| 48 |
|
|---|