File: configure.in

package info (click to toggle)
ntfs 971218-4
  • links: PTS
  • area: main
  • in suites: hamm, slink
  • size: 692 kB
  • ctags: 670
  • sloc: ansic: 7,774; sh: 1,509; makefile: 232
file content (121 lines) | stat: -rw-r--r-- 3,650 bytes parent folder | download
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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
dnl Emacs, this is -*- m4 -*-
dnl Lines starting with 'dnl' are comments
dnl Use 'autoscan' to help you to write this file
dnl Process this file with 'autoconf' to produce a 'configure' script, and with
dnl 'autoheader' to produce a 'config.h.in' input file

dnl Put the following line _before_ any check
dnl Among other things, it verifies that you are executing 'configure' in the
dnl right directory
AC_INIT(ntfs.lpm)

dnl Put the following line right after AC_INIT()
dnl Use a configuration header file. This will modify the DEFS ouput variable
AC_CONFIG_HEADER(config.h)

dnl Directory for required scripts
AC_CONFIG_AUX_DIR(scripts)

dnl Checks for programs
dnl  Set the 'SET_MAKE' output variable
AC_PROG_MAKE_SET
AC_PROG_CC
dnl  Requires 'config.sub' and 'config.guess' scripts
AC_CHECK_TOOL(LD,ld,echo Unable to find ld)
dnl  Requires the 'install-sh' script
AC_PROG_INSTALL
AC_CHECK_PROGS(TAR,tar,echo Unable to find tar)
AC_CHECK_PROGS(MOUNT,mount,echo Unable to find mount)
AC_CHECK_PROGS(UMOUNT,umount,echo Unable to find umount)
AC_CHECK_PROGS(ETAGS,etags,echo Unable to find etags)
AC_PATH_PROG(INSMOD,insmod,echo Unable to find insmod,$PATH:/sbin)
AC_PATH_PROG(RMMOD,rmmod,echo Unable to find rmmod,$PATH:/sbin)
AC_PATH_PROG(DEPMOD,depmod,echo Unable to find depmod,$PATH:/sbin)

dnl Checks for libraries

dnl Checks for library functions.
dnl  vfprintf()
AC_FUNC_VPRINTF
AC_CHECK_FUNCS(strdup strerror strtol)

dnl Checks for header files.
dnl  ANSI C compliant header files
AC_HEADER_STDC
AC_CHECK_HEADERS(fcntl.h unistd.h)

dnl Checks for typedefs, structures, and compiler characteristics.
dnl  Support for some C keywords
AC_C_CONST
AC_C_INLINE
dnl  If a type is not defined, it defaults to a large enough type
AC_TYPE_UID_T
AC_TYPE_MODE_T
AC_TYPE_OFF_T
AC_TYPE_SIZE_T

dnl Substitution of particular variables, that should not contain literal
dnl newlines
dnl  Check getopt.h
AC_CHECK_HEADERS(getopt.h)

dnl  NTFS device
AC_ARG_ENABLE(device,
  --enable-device=DEV    Default NTFS volume,
  [
   AC_DEFINE_UNQUOTED(NTFS_VOLUME,"$enableval")
   ntfs_volume=$enableval
  ]
)
AC_SUBST(ntfs_volume)

dnl  Debug mode for the Linux kernel module
AC_ARG_ENABLE(debug,
  --enable-debug         Enable debugging,
  debug=y
)
AC_SUBST(debug)

dnl  Mount point for the NTFS partition
AC_ARG_ENABLE(mount-to,
  --enable-mount-to=DIR  Mount point for 'mount' target,
  mount_point=$enableval
)
AC_SUBST(mount_point)

dnl Experimental write support
AC_ARG_ENABLE(rw,
  --enable-rw            Enable experimental read/write support,
  AC_DEFINE(CONFIG_NTFS_RW)
)

dnl  Build $target_* variables
AC_CANONICAL_SYSTEM

dnl  Determine the GCC CFLAGS
gcccflags="-pipe -fno-strength-reduce"
case "$target_cpu" in
  i386) gcccflags="$gcccflags -m386";;
  i486) gcccflags="$gcccflags -m486";;
  i586 | i696) gcccflags="$gcccflags -m486 -malign-loops=2 -malign-jumps=2 -malign-functions=2";;
esac

dnl  Perform some adjustement regarding the OS used
case "$target_os" in
  linux*)
    AC_SUBST(gcccflags)
dnl Get the version of installed kernel sources
    kversion=`sed -n -e "s/VERSION = \(.*\)/\1/p" /usr/src/linux/Makefile`.`sed -n -e "s/PATCHLEVEL = \(.*\)/\1/p" /usr/src/linux/Makefile`.`sed -n -e "s/SUBLEVEL = \(.*\)/\1/p" /usr/src/linux/Makefile`
    AC_SUBST(kversion)
    case $kversion in
      2.0*) specific_dir=linux20;;
      2.1*) specific_dir=linux21;;
    esac
    ;;
  freebsd* | netbsd*) specific_dir=44bsd;;
esac
AC_SUBST(specific_dir)

dnl Put the following line _after_ all checks
dnl Performs variable substitutions : foobar.in -> foobar
AC_OUTPUT(Makefile linux20/GNUmakefile linux21/GNUmakefile 44bsd/Makefile user/Makefile)