-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfigure.ac
128 lines (105 loc) · 2.98 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
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
#
# 2004 (c) Alejandro Claro
#
AC_PREREQ([2.72])
AC_INIT([GTorrentViewer],[3.0],[ap0lly0n@users.sourceforge.net])
AM_INIT_AUTOMAKE
AC_CONFIG_SRCDIR([src/utilities.c])
AM_CONFIG_HEADER(config.h)
PACKAGE=$PACKAGE_NAME
VERSION=$PACKAGE_VERSION
# Checks for programs.
AC_PROG_CC
# define desktop and pixmap system directories in the configure script
AC_ARG_WITH([pixmapsdir],
AS_HELP_STRING([--with-pixmapsdir=DIR],[system's pixmaps files [[DATADIR/pixmaps]]]),
[
case "$withval" in
n|no|y|ye|yes)
PIXMAPDIR=$datadir/pixmaps
;;
*)
PIXMAPDIR=$withval
;;
esac
], PIXMAPDIR=$datadir/pixmaps)
AC_SUBST(PIXMAPDIR)
AC_ARG_WITH([desktopdir],
AS_HELP_STRING([--with-desktopdir=DIR],[.desktop files [[DATADIR/applications]]]),
[
case "$withval" in
n|no|y|ye|yes)
DESKTOPDIR=$datadir/applications
;;
*)
DESKTOPDIR=$withval
;;
esac
], DESKTOPDIR=$datadir/applications)
AC_SUBST(DESKTOPDIR)
#
# Checks for libraries.
#
# check for libcurl.
AC_ARG_WITH([curl-config],
AS_HELP_STRING([--with-curl-config=PATH],[path to curl-config (e.g. /opt/bin)]),
[
case "$withval" in
n|no)
AC_MSG_NOTICE([$PACKAGE_NAME needs libcurl. It can't be disable.])
;;
y|ye|yes)
;;
*)
curl_dir=$withval
;;
esac
])
AC_PATH_PROG([CURL_CONFIG], [curl-config], [no],
[$curl_dir /bin /usr/bin /usr/local/bin $PATH $prefix/bin])
if test "$CURL_CONFIG" != "no" ; then
CURL_LIBS="`$CURL_CONFIG --libs`"
CURL_CFLAGS="`$CURL_CONFIG --cflags`"
else
echo "*** Can't find curl-config. Make sure you have libcurl installed."
echo "*** If you do, try using --with-libcurl=PREFIX."
exit 1
fi
AC_SUBST(CURL_LIBS)
AC_SUBST(CURL_CFLAGS)
# check for Glib and GTK+
AM_PATH_GTK_3_0(3.0.0,,AC_MSG_ERROR($(PACKAGE_NAME) $(PACKAGE_VERSION) needs GTK+ 3.0), gthread)
#PKG_CHECK_MODULES([GTK], [gtk+-3.0 >= 3.0])
#check for glibs gettext
IT_PROG_INTLTOOL([0.23])
ALL_LINGUAS=""
AM_GLIB_GNU_GETTEXT
GETTEXT_PACKAGE=$PACKAGE
AC_SUBST(GETTEXT_PACKAGE)
AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE], ["${GETTEXT_PACKAGE}"], [gettext domain])
# Checks for header files.
m4_warn([obsolete],
[The preprocessor macro 'STDC_HEADERS' is obsolete.
Except in unusual embedded environments, you can safely include all
C89 headers unconditionally.])dnl
# Autoupdate added the next two lines to ensure that your configure
# script's behavior did not change. They are probably safe to remove.
AC_CHECK_INCLUDES_DEFAULT
AC_PROG_EGREP
# Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
# check for large file support
AC_TYPE_OFF_T
AC_SYS_LARGEFILE
AC_FUNC_FSEEKO
# Checks for library functions.
AC_FUNC_MALLOC
AC_FUNC_MEMCMP
AC_FUNC_STRFTIME
AC_CHECK_FUNCS([memchr memmove memset modf])
# ceil() requires libm
AC_CHECK_LIB([m], [ceil])
AC_CONFIG_FILES([Makefile src/Makefile pixmaps/Makefile data/Makefile po/Makefile.in])
AC_OUTPUT