File: configure.ac

package info (click to toggle)
xosd 2.2.14-2.1
  • links: PTS
  • area: main
  • in suites: bullseye, buster, jessie, jessie-kfreebsd, sid, stretch
  • size: 2,320 kB
  • ctags: 409
  • sloc: sh: 10,748; ansic: 3,875; makefile: 77
file content (184 lines) | stat: -rw-r--r-- 6,050 bytes parent folder | download | duplicates (2)
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
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
dnl
dnl Configure.ac for xosd
dnl

dnl Process this file with autoconf to produce a configure script.
AC_INIT(xosd, 2.2.14)
AC_CONFIG_SRCDIR(src/testprog.c)
AM_INIT_AUTOMAKE([no-define])

dnl
dnl Require autoconf version 2.57
dnl
AC_PREREQ(2.57)

dnl The libtool version numbers (LT_*); Don't even think about faking this!
dnl
dnl immediately before every release do:
dnl ===================================
dnl if (the interface is totally unchanged from previous release)
dnl    LT_REVISION ++;
dnl else { /* interfaces have been added, removed or changed */
dnl    LT_REVISION = 0;
dnl    LT_CURRENT ++;
dnl    if (any interfaces have been _added_ since last release)
dnl       AGE ++;
dnl    if (any interfaces have been _removed_ or _incompatibly changed_)
dnl       AGE = 0;
dnl }
LT_CURRENT=4
LT_AGE=2
LT_REVISION=14

AC_SUBST(LT_CURRENT)
AC_SUBST(LT_AGE)
AC_SUBST(LT_REVISION)

AM_MAINTAINER_MODE

dnl Checks for programs.
AC_PROG_CC
AC_PROG_INSTALL
AC_PROG_LN_S
AM_PROG_LIBTOOL
AC_PATH_XTRA([X11],[X11/Xlib.h],[XrmInitialize()])
# We need two libtools, one that builds both shared and static, and
# one that builds only static.  This is because the resulting libtool
# does not allow us to choose which to build at runtime.
sed -e 's/^build_old_libs=yes/build_old_libs=no/' libtool > libtool-disable-static
chmod +x libtool-disable-static

LIBS="$LIBS $X_LIBS $X_EXTRA_LIBS"
CFLAGS="$CFLAGS $X_CFLAGS -Wall"
M4DATADIR="$datadir/aclocal"
AC_SUBST(M4DATADIR)

dnl Checks for libraries.
AM_PATH_GTK(1.2.2,,
	    AC_MSG_WARN([*** GTK+ >= 1.2.2 not found ***]))
AC_CHECK_LIB(X11, XInitThreads,,
	     AC_MSG_ERROR([*** X11 not threadsafe ***]))
AC_CHECK_LIB(Xext, XShapeQueryExtension,,
	     AC_MSG_ERROR([*** X11 Shape extension not found ***]))
AC_CHECK_LIB(pthread, pthread_create,,
	     AC_MSG_ERROR([*** POSIX thread support not found ***]))

dnl Check for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS(unistd.h)
AC_CHECK_HEADER(pthread.h,,
		AC_MSG_ERROR([*** POSIX thread support not installed ***]))

dnl Checks for typedefs, structures, and compiler characteristics.

dnl Checks for library functions.
AC_FUNC_VPRINTF

# nicked from the irmix project...
AC_ARG_ENABLE([xinerama],
              AC_HELP_STRING([--disable-xinerama],
			     [disable use of Xinerama extension]),
              [disable_xinerama="yes"],
	      [disable_xinerama="no"])

AS_IF([test "x$disable_xinerama" = "xno"], [
        AC_CHECK_LIB(Xinerama_pic,
                     XineramaQueryExtension,
                     [X_LIBS="$X_LIBS -lXinerama_pic"
                      AC_DEFINE(HAVE_XINERAMA,1,[Define this if you have libXinerama installed])
                      ac_have_xinerama="yes"],
                      AC_CHECK_LIB(Xinerama,
                                   XineramaQueryExtension,
                                   [X_LIBS="$X_LIBS -lXinerama"
                                    AC_DEFINE(HAVE_XINERAMA,1,[Define this if you have libXinerama
installed])
                                    ac_have_xinerama="yes"],,
                                    [$X_LIBS -lXext $X_EXTRA_LIBS]),
                     [$X_LIBS -lXext $X_EXTRA_LIBS])
])

dnl Check for xmms
dnl disabled in Debian because XMMS is not available and we need to
dnl regenerate configure
dnl AM_PATH_XMMS(1.2.7,,
dnl	     AC_MSG_WARN("xmms plugins can not be built"))
dnl Override where to place libxmms_xosd.so
AC_ARG_WITH([plugindir],
            AC_HELP_STRING([--with-plugindir=DIR],
			   [Set the xmms plugin directory]),
            [XMMS_PLUGIN_DIR="$withval"],
            [XMMS_PLUGIN_DIR="$XMMS_GENERAL_PLUGIN_DIR"])
AC_SUBST(XMMS_PLUGIN_DIR)

dnl Check for gdk-pixbuf
AM_PATH_GDK_PIXBUF(0.22.0,,
		   AC_MSG_WARN("new xmms plugin can not be built"))
dnl Override where to place pixmaps for libxmms_xosd.so
AC_ARG_WITH([pixmapdir],
	    AC_HELP_STRING([--with-pixmapdir=DIR],
			   [Set the directory for xmms plugin pixmaps]),
            [XMMS_PIXMAPDIR="$withval"],
            [XMMS_PIXMAPDIR="${datadir}/xosd"])
AC_SUBST(XMMS_PIXMAPDIR)

dnl NEW plugin
AC_ARG_ENABLE([new-plugin],
	      AC_HELP_STRING([--disable-new-plugin],
			     [Disable new xmms plugin (enabled by default)]),
              [enable_new_plugin="$enableval"],
	      [enable_new_plugin="yes"])
AC_MSG_CHECKING([whether new xmms plugin was requested])
AC_MSG_RESULT($enable_new_plugin)
AM_CONDITIONAL([BUILD_NEW_PLUGIN],
	       [test x"$enable_new_plugin" = "xyes" -a x"$no_xmms" != "xyes" -a x"$no_gdk_pixbuf" != "xyes"])

PKG_PROG_PKG_CONFIG

dnl Check for Beep Media player
AC_ARG_ENABLE([beep_media_player_plugin],
		AC_HELP_STRING([--enable-beep_media_player_plugin],
			     [Enable beep media plugin (enabled by default)]),
              []
              [beep_media_player_plugin=check])
AS_CASE(["$beep_media_player_plugin"],
	[yes], [PKG_CHECK_MODULES([BMP], [bmp], [HAVE_BMP=1])],
	[no], [],
	[PKG_CHECK_MODULES([BMP], [bmp], [HAVE_BMP=1], [HAVE_BMP=0])])
AM_CONDITIONAL([BUILD_BEEP_MEDIA_PLUGIN], [test "$beep_media_player_plugin" != no -a "$HAVE_BMP" -eq 1])
AS_IF([test "$beep_media_player_plugin" != no -a "$HAVE_BMP" -eq 1], [BMP_GENERAL_PLUGIN_DIR=$(pkg-config --variable general_plugin_dir bmp)])
AC_SUBST(BMP_GENERAL_PLUGIN_DIR)


dnl OLD plugin
AC_ARG_ENABLE([old-plugin],
	      AC_HELP_STRING([--enable-old-plugin],
			     [Enable old xmms plugin (disabled by default)]),
              [enable_old_plugin="$enableval"],
              [enable_old_plugin="no"])
AC_MSG_CHECKING([whether old xmms plugin was requested])
AC_MSG_RESULT($enable_old_plugin)
AM_CONDITIONAL([BUILD_OLD_PLUGIN],
	       [test x"$enable_old_plugin" = "xyes" -a x"$no_xmms" != "xyes"])


dnl Define XOSD_VERSION
AC_DEFINE_UNQUOTED(XOSD_VERSION, "${VERSION}")

EXTRA_DIST=xosd.spec

dnl Produce Output files
AC_CONFIG_FILES([
Makefile
src/Makefile
src/libxosd/Makefile
src/xmms_plugin/Makefile
src/bmp_plugin/Makefile
macros/Makefile
man/Makefile
pixmaps/Makefile
script/Makefile
script/xosd-config
xosd.spec
])
AC_CONFIG_COMMANDS([default],[[chmod +x script/xosd-config]],[[]])
AC_OUTPUT