Files
nwipe/configure.ac

60 lines
1.6 KiB
Plaintext
Raw Normal View History

2013-09-06 23:38:39 +01:00
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_PREREQ([2.64])
2014-05-15 09:25:26 +01:00
AC_INIT(nwipe, 0.16, andy@andybev.com)
AM_INIT_AUTOMAKE(nwipe, 0.16)
2013-09-06 23:38:39 +01:00
AC_OUTPUT(Makefile src/Makefile man/Makefile)
AC_CONFIG_SRCDIR([src/nwipe.c])
AC_CONFIG_HEADERS([config.h])
# Checks for programs.
AC_PROG_CC
PKG_PROG_PKG_CONFIG
# Checks for libraries.
PKG_CHECK_MODULES(
[PANEL],
[panel],
[
CFLAGS="${CFLAGS} ${PANEL_CFLAGS}"
LIBS="${LIBS} ${PANEL_LIBS}"
],
[AC_CHECK_LIB([panel], [main], ,[AC_MSG_ERROR([ncurses panel library not found])])]
)
PKG_CHECK_MODULES(
[NCURSES],
[ncurses],
[
CFLAGS="${CFLAGS} ${NCURSES_CFLAGS}"
LIBS="${LIBS} ${NCURSES_LIBS}"
],
[AC_CHECK_LIB([ncurses], [delscreen], [
LIBS="-lncurses $LIBS"
AC_CHECK_HEADERS(ncurses.h,, [
AC_CHECK_HEADERS(ncurses/ncurses.h, [
AC_DEFINE([NCURSES_IN_SUBDIR], [ncurses/], [Look for ncurses headers in subdir])
], [AC_MSG_ERROR([ncurses headers not found])])
])
], [AC_MSG_ERROR([ncurses development library not found])]
)]
)
AC_CHECK_LIB([parted], [ped_device_probe_all], ,[AC_MSG_ERROR([parted development library not found])])
AC_CHECK_LIB([pthread], [main], ,[AC_MSG_ERROR([pthread development library not found])])
# Checks for header files.
AC_CHECK_HEADERS([fcntl.h inttypes.h netinet/in.h stddef.h stdint.h stdlib.h string.h sys/file.h sys/ioctl.h unistd.h])
# Checks for typedefs, structures, and compiler characteristics.
AC_TYPE_SIZE_T
AC_CHECK_MEMBERS([struct stat.st_blksize])
# Checks for library functions.
AC_FUNC_MALLOC
AC_CHECK_FUNCS([fdatasync memset regcomp strdup strerror])
AC_OUTPUT