File: configure.in

package info (click to toggle)
rdfind 1.3.4-2
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 516 kB
  • ctags: 227
  • sloc: cpp: 1,671; sh: 1,080; makefile: 10
file content (69 lines) | stat: -rw-r--r-- 2,055 bytes parent folder | download | duplicates (2)
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
dnl configure.in for rdfind.

VERSION="1.3.4"
AC_INIT(rdfind.cc,1.3.4)
AM_CONFIG_HEADER(config.h)       

AM_INIT_AUTOMAKE(rdfind,1.3.4)


dnl find and test the C compiler
AC_PROG_CC
AC_PROG_CXX
AC_LANG_CPLUSPLUS
        
AC_PROG_MAKE_SET
               
AC_HEADER_STDC

dnl see if we should run a debug build with lots of output
showdebugmessages=no
AC_ARG_ENABLE(debug,
 	AC_HELP_STRING(
 	    [--enable-debug],
 	    [enable debug printouts in program (default=no)]
 	),
   	showdebugmessages="$enableval"
)
AC_MSG_RESULT($showdebugmessages)
if test x"$showdebugmessages" = x"yes"; then
	AC_DEFINE([RDFIND_DEBUG],[1],[Enable debug printouts in program])
dnl	CXXFLAGS="$CXXFLAGS -g -Wall -Werror"
fi	


dnl test for nettle
AC_CHECK_HEADER(nettle/sha.h,,[AC_MSG_ERROR([
 nettle header files missing. Please install nettle
 first. If you have already done so and get this error message 
 anyway, it may be installed somewhere else, maybe because you 
 don't have root access. Pass CPPFLAGS=-I/your/path/to/nettle to configure
 and try again. The path should be so that #include nettle/headerfile.h works.
])]) 
AC_CHECK_LIB(nettle,main,,[AC_MSG_ERROR([
 Could not link to libnettle. Please install nettle
 first. If you have already done so; please run ldconfig
 as root or check whether the path libnettle was installed
 to is in your LD_LIBRARY_PATH. If you have nettle 
 somewhere else, maybe because you don't have root 
 access, pass LDFLAGS=-L/your/path/to/nettle to configure
 and try again.
])])

dnl test for some specific functions
AC_CHECK_FUNC(stat,,AC_MSG_ERROR(oops! no stat ?!?))
AC_CHECK_FUNC(nanosleep,,AC_MSG_WARN(cant do nanosleep ?))

AC_CHECK_LIB(stdc++, main,,AC_MSG_ERROR(rdfind requires libstdc++))          

AC_CHECK_HEADERS(string,,AC_MSG_WARN(STL classes missing ?))
AC_CHECK_HEADERS(vector,,AC_MSG_WARN(STL classes missing ?))
AC_CHECK_HEADERS(time.h,,AC_MSG_WARN(nanosleep header time.h missing?))

dnl check for 64 bit support
AC_SYS_LARGEFILE

AC_SUBST(VERSION)

dnl read Makefile.in and write Makefile
AC_OUTPUT(Makefile)