configure.in
1.17 KB
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
AC_INIT([openhantek-extractfw], [0.7.0], [oliver.haag@gmail.com])
AC_CONFIG_SRCDIR([extractfw.c])
# Generates a config.h
#AC_CONFIG_HEADERS([config.h])
# Silent make output if available
m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
AM_INIT_AUTOMAKE
# Checks for programs.
AC_PROG_CC
# Checks for libraries.
AC_CHECK_LIB([bfd], [main], [], AC_MSG_ERROR([The bfd library is missing]))
# Checks for header files.
AC_CHECK_HEADERS([malloc.h string.h])
# Checks for typedefs, structures, and compiler characteristics.
# Checks for library functions.
AC_FUNC_MALLOC
# Add --with-firmware-dir= option
# FIXME According to Autoconf manual, we shouldn't do substitution that way but I'm not able to expand ${prefix} even using Makefile...
# SEE http://www.gnu.org/software/hello/manual/autoconf/External-Software.html
AC_ARG_WITH( [firmware-dir],
[AC_HELP_STRING([--with-firmware-dir=DIR], [directory to install hantek firmwares [/usr/local/share]])],
[with_firmware_dir=$(echo "$withval" | sed -e 's!/$!!')],
[with_firmware_dir="/usr/local/share"],
)
hantekfirmwaredir="$with_firmware_dir/hantek"
AC_SUBST(hantekfirmwaredir)
AC_CONFIG_FILES(
[Makefile]
[90-hantek.rules]
)
AC_OUTPUT