ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/fcrackzip/configure.in
Revision: 1.2
Committed: Sun Jun 20 13:13:45 2010 UTC (13 years, 10 months ago) by root
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +1 -1 lines
Log Message:
*** empty log message ***

File Contents

# Content
1 AC_INIT
2 AC_CONFIG_SRCDIR([main.c])
3 AM_INIT_AUTOMAKE(fcrackzip,1.0)
4
5 AC_CONFIG_HEADERS([config.h])
6
7 AC_PROG_CC
8 AC_HEADER_STDC
9
10 AC_CHECK_SIZEOF(short, 2)
11 AC_CHECK_SIZEOF(int, 4)
12 AC_CHECK_SIZEOF(long, 4)
13
14 AC_C_CONST
15 AC_C_INLINE
16
17 AC_DEFINE([USE_UNIX_REDIRECTION], 1, [Define if you can use unix-style redirection.])
18
19 AC_CHECK_PROGS(PERL,perl5 perl)
20 AM_CONDITIONAL(HAVE_PERL,test -n "$PERL")
21
22 if test "$GCC" = yes; then
23 AC_DEFINE([USE_GCC_ASM], 1, [Define if you can use gcc inline assembly.])
24 CFLAGS="$CFLAGS -funroll-all-loops -O6"
25 AC_MSG_CHECKING(for pgcc/egcs)
26 case `$CC -v 2>&1` in
27 *pgcc-* )
28 AC_MSG_RESULT(pgcc)
29 ;;
30 *egcs-* )
31 AC_MSG_RESULT(egcs)
32 ;;
33 esac
34 AC_MSG_CHECKING(for x86 asm)
35 case `uname -m` in
36 i386 | i486 | i586 | ix86 | i86 )
37 AC_DEFINE([COMPILE_CPU], 5, [Define this to the default x86 target cpu (5 pentium, 6 ppro).])
38 AC_MSG_RESULT(pentium)
39 ;;
40 i686 )
41 AC_DEFINE([COMPILE_CPU], 6, [Define this to the default x86 target cpu (5 pentium, 6 ppro).])
42 AC_MSG_RESULT(pentiumpro)
43 ;;
44 *)
45 AC_MSG_RESULT(not x86)
46 esac
47 else
48 AC_MSG_RESULT(no gcc)
49 fi
50
51 AC_SUBST(PERL)
52 AC_CHECK_HEADERS(stdbool.h getopt.h unistd.h sys/time.h)
53 AC_CHECK_FUNCS(gettimeofday)
54 AC_CHECK_FUNCS(getopt_long,,[
55 AC_LIBOBJ(getopt)
56 AC_LIBOBJ(getopt1)
57 ])
58
59 AH_BOTTOM([
60 typedef unsigned char u8;
61
62 #if SIZEOF_SHORT == 2
63 typedef unsigned short u16;
64 #elif SIZEOF_INT == 2
65 typedef unsigned int u16;
66 #else
67 #warn unable to find type with 2 bytes size
68 #endif
69
70 #if SIZEOF_INT == 4
71 typedef unsigned int u32;
72 #elif SIZEOF_LONG == 4
73 typedef unsigned long u32;
74 #else
75 #warn unable to find type with 4 bytes size
76 #endif
77
78 #if defined(__GNUC__) && defined(__i386__)
79 #define REGPARAM __attribute__((regparm(1)))
80 #else
81 #define REGPARAM
82 #endif
83 ])
84
85 AC_CONFIG_FILES([Makefile])
86 AC_OUTPUT