-
Notifications
You must be signed in to change notification settings - Fork 62
/
configure.ac
82 lines (60 loc) · 2.14 KB
/
configure.ac
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
# SPDX-License-Identifier: GPL-2.0-only
# Copyright (c) 2022 Greg Kroah-Hartman <[email protected]>
dnl Process this file with autoconf to produce a configure script.
# Prologue.
AC_PREREQ([2.69])
AC_INIT([USBView],[3.1],[Greg Kroah-Hartman <[email protected]>],[usbview],[http://www.kroah.com/linux-usb/])
AC_CONFIG_SRCDIR([usbtree.c])
AC_CONFIG_HEADERS([config.h])
AM_INIT_AUTOMAKE([foreign subdir-objects -Wall])
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
# Process options.
AC_MSG_CHECKING([whether to try to install icons])
AC_ARG_ENABLE(icons,
[AS_HELP_STRING([--enable-icons],[try to install icons (default=yes)])],
[icons=$enableval],
[icons=yes])
AC_MSG_RESULT([$icons])
AC_MSG_CHECKING([whether to try to install desktop file])
AC_ARG_ENABLE(desktop,
[AS_HELP_STRING([--enable-desktop],[try to install desktop file (default=yes)])],
[desktop=$enableval],
[desktop=yes])
AC_MSG_RESULT([$desktop])
# Checks for programs.
AC_PROG_CC
AC_CHECK_PROG([have_convert],[convert],[yes],[no])
# Set automake conditionals.
AC_SUBST(CONVERT,[convert])
AM_CONDITIONAL(HAVE_CONVERT, [test "$have_convert" = "yes"])
AS_IF([test "$have_convert" = "no"],
[AC_MSG_WARN([no bitmap conversion utility, disabling icon installation])
icons=no])
AM_CONDITIONAL(DESKTOP,[test x${desktop} = xyes])
AM_CONDITIONAL(ICONS,[test x${icons} = xyes])
# Checks for libraries.
AC_SEARCH_LIBS([strerror],[cposix])
PKG_CHECK_MODULES([GTK], [gtk+-3.0 >= 3.0])
AC_SUBST([GTK_FLAGS])
AC_SUBST([GTK_LIBS])
# Checks for header files.
AC_CHECK_HEADERS([ctype.h errno.h stdio.h],,
AC_MSG_ERROR(required system header file unavailable))
# Checks for typedefs, structures, and compiler characteristics.
# Checks for library functions.
AC_CHECK_FUNCS([memset strstr strtol],,
AC_MSG_ERROR(required library function unavailable))
# Epilogue.
AC_CONFIG_FILES([Makefile])
AC_OUTPUT
AC_MSG_RESULT([
usbview $VERSION
===========
prefix: ${prefix}
datarootdir: ${datarootdir}
datadir: ${datadir}
mandir: ${mandir}
compiler: ${CC}
cflags: ${CFLAGS}
ldflags: ${LDFLAGS}
])