-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure.in
75 lines (61 loc) · 1.76 KB
/
configure.in
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
dnl configure.in, based on configure.scan from 'autoscan'
dnl dugsong@monkey.org and provos@citi.umich.edu
AC_INIT(outguess.c)
AC_CONFIG_HEADER(config.h)
dnl Checks for programs.
AC_PROG_CC
dnl Check for some compiler options
if test -n "$GCC"; then
AC_MSG_CHECKING([if the compiler understands -pipe -Wall -funroll-all-loops])
OLDCC="$CC"
CC="$CC -pipe -Wall -funroll-all-loops"
AC_TRY_COMPILE(,,
AC_MSG_RESULT(yes),
CC="$OLDCC"
AC_MSG_RESULT(no))
fi
AC_PROG_INSTALL
AC_PROG_MAKE_SET
dnl Checks for libraries.
dnl Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS(fcntl.h unistd.h md5.h err.h)
dnl Checks for typedefs, structures, and compiler characteristics.
AC_TYPE_SIZE_T
AC_CHECK_TYPE(u_int64_t, unsigned long long)
AC_CHECK_TYPE(u_int32_t, unsigned int)
AC_CHECK_TYPE(u_int16_t, unsigned short)
AC_CHECK_TYPE(u_int8_t, unsigned char)
dnl Checks for library functions.
AC_FUNC_MMAP
AC_CHECK_FUNCS(strrchr memcpy)
AC_CHECK_FUNC(strcasecmp,
AC_DEFINE(HAVE_STRCASECMP),
AC_MSG_RESULT(File extensions will be case sensitive!)
)
AC_CHECK_FUNC(snprintf,
AC_DEFINE(HAVE_SNPRINTF),
AC_MSG_RESULT(will use sprintf instead, you have a bad system)
)
AC_SUBST(LIBMISSING)
AC_SUBST(MISSINGOBJ)
dnl Check if we need to compile md5
needmd5=no
needincmiss=no
AC_CHECK_FUNCS(MD5Update, , [needmd5=yes; needincmiss=yes])
if test $needmd5 = yes; then
LIBMISSING="$LIBMISSING md5.o"
MISSINGOBJ="$MISSINGOBJ missing/md5.c"
fi
dnl Check if there is err()
neederr=no
AC_CHECK_FUNCS(warnx, , [neederr=yes; needincmiss=yes])
if test $neederr = yes; then
LIBMISSING="$LIBMISSING err.o"
MISSINGOBJ="$MISSINGOBJ missing/err.c"
fi
if test $needincmiss = yes; then
CFLAGS="$CFLAGS -Imissing"
fi
AC_CONFIG_SUBDIRS(jpeg-6b-steg)
AC_OUTPUT(Makefile)