aboutsummaryrefslogtreecommitdiff
path: root/configure.in
blob: 71048a0d0d04ba628a9d7a4873a3214d8ecd31f7 (plain) (blame)
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
#                                               -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.

AC_PREREQ([2.63])
AC_INIT([duser], [1.0.0], [jhunk@stsci.edu], [duser], [https://github.com/jhunkeler/duser.git])
AC_CANONICAL_TARGET

AM_INIT_AUTOMAKE(1.11.1)

AC_CONFIG_FILES([Makefile compat/Makefile src/Makefile])
AC_CONFIG_HEADERS([include/config.h])
AC_CONFIG_SRCDIR([src/duser.c])
CFLAGS=""

# Checks for programs.
AC_PROG_CC
AM_PROG_CC_C_O
AC_PROG_INSTALL
AC_PROG_MAKE_SET
AC_PROG_RANLIB

# Initializing libtool.
AC_DISABLE_SHARED
AC_PROG_LIBTOOL
AC_SUBST(LIBTOOL_DEPS)
LIBTOOL="$LIBTOOL --silent"

# Checks for libraries.

# Checks for header files.
AC_CHECK_HEADERS_ONCE([fcntl.h limits.h stdlib.h string.h unistd.h])

# Checks for typedefs, structures, and compiler characteristics.
AC_TYPE_SIZE_T

# Checks for library functions.
AC_FUNC_MALLOC
AC_CHECK_FUNCS([memset strcasecmp strdup strerror strncasecmp strstr])

AC_ARG_ENABLE([compat],
[  --enable-compat    Enables built-in glibc string functions],
	[case "${enableval}" in 
		yes) compat=true ;;
		no)  compat=false ;;
        *) AC_MSG_ERROR([bad value ${enableval} for --enable-compat]) ;;
    esac],[compat=false])
	AM_CONDITIONAL([HAVE_COMPAT], [test x$compat = xtrue])



# Figure out where everything goes in the filesystem
AC_ARG_WITH(config-path,
	AC_HELP_STRING([--with-config-path=<pathname>],
		[specify the path for duser config files (default: /usr/local/etc/duser)]),
	[CFGPATH="$withval"], [CFGPATH="/usr/local/etc/duser/duser.conf"])
AC_SUBST(CONFIGDIR)

AC_DEFINE_UNQUOTED([CFG_PATH], "$CFGPATH", [duser configuration path])

AC_OUTPUT