]> sigrok.org Git - sigrok-firmware-fx2lafw.git/blob - configure.ac
Use a standard autotools setup.
[sigrok-firmware-fx2lafw.git] / configure.ac
1 ##
2 ## This file is part of the fx2lafw project.
3 ##
4 ## Copyright (C) 2013 Uwe Hermann <uwe@hermann-uwe.de>
5 ##
6 ## This program is free software; you can redistribute it and/or modify
7 ## it under the terms of the GNU General Public License as published by
8 ## the Free Software Foundation; either version 2 of the License, or
9 ## (at your option) any later version.
10 ##
11 ## This program is distributed in the hope that it will be useful,
12 ## but WITHOUT ANY WARRANTY; without even the implied warranty of
13 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 ## GNU General Public License for more details.
15 ##
16 ## You should have received a copy of the GNU General Public License
17 ## along with this program; if not, write to the Free Software
18 ## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
19 ##
20
21 # We require at least autoconf 2.63 (AC_INIT format changed there).
22 AC_PREREQ([2.63])
23
24 AC_INIT([sigrok-firmware-fx2lafw], [0.1.0],
25         [sigrok-devel@lists.sourceforge.net],
26         [sigrok-firmware-fx2lafw], [http://www.sigrok.org])
27 AC_CONFIG_HEADER([config.h])
28 AC_CONFIG_MACRO_DIR([autostuff])
29 AC_CONFIG_AUX_DIR([autostuff])
30
31 # We require at least automake 1.11 (needed for 'silent rules').
32 AM_INIT_AUTOMAKE([1.11 -Wall -Werror check-news])
33 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
34
35 AC_PROG_INSTALL
36 AC_PROG_LN_S
37
38 AC_CHECK_PROGS([SDCC], [sdcc])
39 AC_CHECK_PROGS([SDCCLIB], [sdcclib])
40 AC_CHECK_PROGS([OBJCOPY], [objcopy])
41 AC_CHECK_PROGS([MAKEBIN], [makebin])
42
43 AM_CONDITIONAL([FOUND_OBJCOPY], [test "x$OBJCOPY" != "x"])
44 AM_CONDITIONAL([FOUND_MAKEBIN], [test "x$MAKEBIN" != "x"])
45 AM_COND_IF([FOUND_OBJCOPY], [AC_SUBST(FOUND_OBJCOPY, "yes")])
46 AM_COND_IF([FOUND_MAKEBIN], [AC_SUBST(FOUND_MAKEBIN, "yes")])
47
48 # The sdcc 8051 assembler binary has/had different names:
49 # Newer sdcc, Debian / Ubuntu: sdas8051
50 # Newer sdcc, Fedora: sdcc-sdas8051
51 # Older sdcc: asx8051
52 AC_CHECK_PROGS([SDAS8051], [sdas8051 sdcc-sdas8051 asx8051])
53
54 AC_SUBST(SDCC_FLAGS, "--code-size 0x3c00 --xram-size 0x0200 --xram-loc 0x3c00 -Wl\"-b DSCR_AREA=0x3e00\" -Wl\"-b INT2JT=0x3f00\"")
55 AC_SUBST(FIRMWARE_DIR, "$datadir/sigrok-firmware")
56 AC_SUBST(MAKEFLAGS, '--no-print-directory')
57
58 AC_CONFIG_FILES([Makefile
59                  include/Makefile
60                  fx2lib/Makefile
61                  fx2lib/include/Makefile
62                  fx2lib/lib/Makefile
63                  fx2lib/lib/interrupts/Makefile
64                  hw/Makefile
65                  hw/braintechnology-usb-lps/Makefile
66                  hw/cwav-usbeeax/Makefile
67                  hw/cwav-usbeedx/Makefile
68                  hw/cwav-usbeesx/Makefile
69                  hw/cypress-fx2/Makefile
70                  hw/saleae-logic/Makefile
71                 ])
72
73 AC_OUTPUT
74