]> sigrok.org Git - sigrok-firmware-fx2lafw.git/blame - configure.ac
GPL headers: Use correct project name.
[sigrok-firmware-fx2lafw.git] / configure.ac
CommitLineData
36074319 1##
a986cfff 2## This file is part of the sigrok-firmware-fx2lafw project.
36074319
UH
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).
22AC_PREREQ([2.63])
23
b77e3182 24AC_INIT([sigrok-firmware-fx2lafw], [0.1.1],
36074319
UH
25 [sigrok-devel@lists.sourceforge.net],
26 [sigrok-firmware-fx2lafw], [http://www.sigrok.org])
27AC_CONFIG_HEADER([config.h])
28AC_CONFIG_MACRO_DIR([autostuff])
29AC_CONFIG_AUX_DIR([autostuff])
30
31# We require at least automake 1.11 (needed for 'silent rules').
32AM_INIT_AUTOMAKE([1.11 -Wall -Werror check-news])
33m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
34
35AC_PROG_INSTALL
36AC_PROG_LN_S
37
3a7ae082
UH
38# On Fedora, all sdcc tools have an 'sdcc-' prefix in the filename.
39AC_CHECK_PROGS([SDCC], [sdcc sdcc-sdcc])
471fe661
UH
40if test "x$SDCC" == "x"; then
41 AC_MSG_ERROR([cannot find sdcc.])
42fi
860cfff0 43AC_CHECK_PROGS([SDCCLIB], [sdcclib sdcc-sdcclib])
471fe661
UH
44if test "x$SDCCLIB" == "x"; then
45 AC_MSG_ERROR([cannot find sdcclib.])
46fi
36074319 47AC_CHECK_PROGS([OBJCOPY], [objcopy])
3a7ae082 48AC_CHECK_PROGS([MAKEBIN], [makebin sdcc-makebin])
471fe661
UH
49if test "x$OBJCOPY" == "x" && test "x$MAKEBIN" == "x"; then
50 AC_MSG_ERROR([cannot find objcopy or makebin.])
51fi
36074319
UH
52
53AM_CONDITIONAL([FOUND_OBJCOPY], [test "x$OBJCOPY" != "x"])
54AM_CONDITIONAL([FOUND_MAKEBIN], [test "x$MAKEBIN" != "x"])
55AM_COND_IF([FOUND_OBJCOPY], [AC_SUBST(FOUND_OBJCOPY, "yes")])
56AM_COND_IF([FOUND_MAKEBIN], [AC_SUBST(FOUND_MAKEBIN, "yes")])
57
58# The sdcc 8051 assembler binary has/had different names:
59# Newer sdcc, Debian / Ubuntu: sdas8051
60# Newer sdcc, Fedora: sdcc-sdas8051
61# Older sdcc: asx8051
62AC_CHECK_PROGS([SDAS8051], [sdas8051 sdcc-sdas8051 asx8051])
471fe661
UH
63if test "x$SDAS8051" == "x"; then
64 AC_MSG_ERROR([cannot find sdas8051.])
65fi
36074319 66
9e7a268d 67AC_SUBST(SDCC_FLAGS, "--code-size 0x1c00 --xram-size 0x0200 --xram-loc 0x1c00 -Wl\"-b DSCR_AREA=0x1e00\" -Wl\"-b INT2JT=0x1f00\"")
36074319
UH
68AC_SUBST(FIRMWARE_DIR, "$datadir/sigrok-firmware")
69AC_SUBST(MAKEFLAGS, '--no-print-directory')
70
71AC_CONFIG_FILES([Makefile
72 include/Makefile
73 fx2lib/Makefile
74 fx2lib/include/Makefile
75 fx2lib/lib/Makefile
76 fx2lib/lib/interrupts/Makefile
77 hw/Makefile
78 hw/braintechnology-usb-lps/Makefile
79 hw/cwav-usbeeax/Makefile
80 hw/cwav-usbeedx/Makefile
81 hw/cwav-usbeesx/Makefile
82 hw/cypress-fx2/Makefile
83 hw/saleae-logic/Makefile
84 ])
85
86AC_OUTPUT
87