-
Notifications
You must be signed in to change notification settings - Fork 2
/
configure.ac
169 lines (143 loc) · 5.58 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
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
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
#
# configure.ac - Copyright (c) 2001-2024 - Olivier Poncet
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>
#
# ----------------------------------------------------------------------------
# Package informations
# ----------------------------------------------------------------------------
m4_define([pkg_name], [xcpc])
m4_define([pkg_major_version], [0])
m4_define([pkg_minor_version], [0])
m4_define([pkg_micro_version], [0])
m4_define([pkg_interface_age], [0])
m4_define([pkg_binary_age], [m4_eval(100 * pkg_minor_version + pkg_micro_version)])
m4_define([pkg_version], [pkg_major_version.pkg_minor_version.pkg_micro_version])
m4_define([pkg_bugreport], [ponceto@free.fr])
# ----------------------------------------------------------------------------
# Libtool black magic
# ----------------------------------------------------------------------------
m4_define([pkg_lt_release], [pkg_major_version.pkg_minor_version])
m4_define([pkg_lt_current], [m4_eval(100 * pkg_minor_version + pkg_micro_version - pkg_interface_age)])
m4_define([pkg_lt_revision], [m4_eval(pkg_interface_age)])
m4_define([pkg_lt_age], [m4_eval(pkg_binary_age - pkg_interface_age)])
# ----------------------------------------------------------------------------
# Autoconf/Automake/Libtool
# ----------------------------------------------------------------------------
AC_PREREQ([2.69])
AC_INIT([pkg_name], [pkg_version], [pkg_bugreport])
AM_INIT_AUTOMAKE
LT_INIT
# ----------------------------------------------------------------------------
# Adjust CPPFLAGS if needed
# ----------------------------------------------------------------------------
case "${host_os}" in
linux*)
AX_APPEND_FLAG([-D_DEFAULT_SOURCE], [CPPFLAGS])
;;
esac
# ----------------------------------------------------------------------------
# Programs
# ----------------------------------------------------------------------------
AC_PROG_CC
AC_PROG_CXX
AC_PROG_LEX([noyywrap])
AC_PROG_YACC
# ----------------------------------------------------------------------------
# Checks
# ----------------------------------------------------------------------------
AX_CHECK_C99
AX_CHECK_CXX14
AX_CHECK_BYTE_ORDER
# ----------------------------------------------------------------------------
# Dependencies
# ----------------------------------------------------------------------------
AX_CHECK_HEADERS
AX_CHECK_FUNCTIONS
AX_CHECK_ZLIB
AX_CHECK_BZLIB
AX_CHECK_X11
AX_CHECK_XSHM
AX_CHECK_INTRINSIC
AX_CHECK_ATHENA
AX_CHECK_MOTIF2
AX_CHECK_GTK3
AX_CHECK_GTK4
AX_CHECK_GUI_TOOLKIT
AX_CHECK_PORTAUDIO
AX_CHECK_LINUX_JOYSTICK_API
# ----------------------------------------------------------------------------
# Defines
# ----------------------------------------------------------------------------
AC_DEFINE(PACKAGE_MAJOR_VERSION, [pkg_major_version], [Define to the major version of this package.])
AC_DEFINE(PACKAGE_MINOR_VERSION, [pkg_minor_version], [Define to the minor version of this package.])
AC_DEFINE(PACKAGE_MICRO_VERSION, [pkg_micro_version], [Define to the micro version of this package.])
AC_DEFINE(PACKAGE_INTERFACE_AGE, [pkg_interface_age], [Define to the interface age of this package.])
AX_DEFINES
# ----------------------------------------------------------------------------
# Libtool versionning
# ----------------------------------------------------------------------------
AC_SUBST(LT_RELEASE, [pkg_lt_release])
AC_SUBST(LT_CURRENT, [pkg_lt_current])
AC_SUBST(LT_REVISION, [pkg_lt_revision])
AC_SUBST(LT_AGE, [pkg_lt_age])
AC_SUBST(LT_VERSION_INFO, [pkg_lt_current:pkg_lt_revision:pkg_lt_age])
# ----------------------------------------------------------------------------
# Output
# ----------------------------------------------------------------------------
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_FILES([
Makefile
bin/Makefile
etc/Makefile
doc/Makefile
lib/Makefile
lib/libdsk/Makefile
lib/lib765/Makefile
lib/xcpc/Makefile
lib/Xem/Makefile
lib/gtk3/Makefile
lib/gtk4/Makefile
src/Makefile
share/Makefile
share/applications/Makefile
share/applications/xcpc.desktop
share/pixmaps/Makefile
share/xcpc/Makefile
share/xcpc/bitmaps/Makefile
share/xcpc/pixmaps/Makefile
share/xcpc/roms/Makefile
share/xcpc/disks/Makefile
share/xcpc/snapshots/Makefile
])
AC_OUTPUT
# ----------------------------------------------------------------------------
# Notice
# ----------------------------------------------------------------------------
AC_MSG_NOTICE([configured to build Xcpc:
X11 .................... ${have_x}
X11 XShm ............... ${have_xshm}
Intrinsic .............. ${have_intrinsic}
Athena ................. ${have_athena}
Motif2 ................. ${have_motif2}
Gtk3 ................... ${have_gtk3}
Gtk4 (not supported) ... ${have_gtk4}
PortAudio .............. ${have_portaudio}
Linux Joystick API ..... ${have_linux_joystick_api}
X11 toolkit ............ ${with_x11_toolkit}
Have fun with Xcpc ;-)
])
# ----------------------------------------------------------------------------
# End-Of-File
# ----------------------------------------------------------------------------