File: configure.ac

package info (click to toggle)
eiciel 0.9.2-3
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 2,572 kB
  • ctags: 399
  • sloc: sh: 9,299; cpp: 2,939; makefile: 141; ansic: 25; sed: 16
file content (153 lines) | stat: -rw-r--r-- 3,863 bytes parent folder | download
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
dnl Establim el nom del paquet, la versi i l'email de contacte
AC_INIT(eiciel, 0.9.2, rofi@ya.com)

dnl On estem ?
AC_CANONICAL_BUILD
AC_CANONICAL_HOST
AC_CANONICAL_TARGET

dnl Establim com a prerequisit Autoconf 2.59
AC_PREREQ(2.57)

dnl Inicialitzem Automake
AM_INIT_AUTOMAKE([dist-bzip2])

dnl Volem suport de GETTEXT
AM_GNU_GETTEXT([external])
AM_GNU_GETTEXT_VERSION([0.11])

dnl Nomes serveix per veure si hi ha el codi
AC_CONFIG_SRCDIR(src/eiciel_standalone.cpp)

dnl Establim el config header
AC_CONFIG_HEADER(config.hpp)

dnl Volem que les proves es facin amb C++
AC_LANG(C++)

dnl Comprovem si hi ha el programa install
AC_PROG_INSTALL

dnl Comprovem si hi ha un preprocessador de C/C++
AC_PROG_CPP

dnl Comprovem si hi ha un compilador de C++
AC_PROG_CXX

dnl Hem de crear una llibreria dinamica
AC_PROG_LIBTOOL

dnl Comprovem si hi ha la llibreria gtkmm-2.0
PKG_CHECK_MODULES(GTKMM, gtkmm-2.4 >= 2.4.0 libgnome-2.0 >= 2.10.0 gnome-vfs-2.0 >= 2.10.0 libnautilus-extension >= 2.10.0)

AC_MSG_CHECKING([for nautilus extensions directory])

AC_ARG_WITH(nautilus-extensions-dir, 
AC_HELP_STRING([--with-nautilus-extensions-dir=DIR], [Directory where nautilus extensions have to be installed (usually /usr/lib/nautilus/extensions-1.0)])
, 
[
if test x$withval = xyes -o x$withval = xno;
then
   AC_MSG_ERROR([If you specify --with-nautilus-extensions-dir you must set the directory. E.g.: --with-nautilus-extensions-dir=/usr/lib/nautilus/extensions-1.0])
else 
 AC_SUBST(NAUTILUS_EXTENSIONS_DIR, [$withval])
 AC_MSG_RESULT([$withval])
fi
]
,
[dnl La resta de distribucions de GNU/Linux
  if test -d `pkg-config --variable=prefix libnautilus-extension`/lib/nautilus/extensions-1.0 ;
  then
     AC_SUBST(NAUTILUS_EXTENSIONS_DIR, [`pkg-config --variable=prefix libnautilus-extension`/lib/nautilus/extensions-1.0])
	 AC_MSG_RESULT(${NAUTILUS_EXTENSIONS_DIR})
  else
   	AC_MSG_ERROR([I need pkg-config in order to determine where to install nautilus extensions. You may want to set --with-nautilus-extensions-dir=DIR])
  fi
]
)

enable_eua=no
AC_MSG_CHECKING([for extended user attributes support])
AC_ARG_ENABLE(user-attributes,
AC_HELP_STRING([--enable-user-attributes], [Enables support for extended user attributes. This is GNU/Linux specific.]),
[
if test x$enableval = xyes -o x$enableval = x;
then
   AC_MSG_RESULT([yes])
   enable_eua=yes
else
  if test x$enableval = xno;
  then
    enable_eua=no
    AC_MSG_RESULT([no])
  else
    AC_MSG_ERROR([This option can only be given 'yes' or 'no' values])
  fi
fi
]
,
[
 case $target_os in
     linux*)
	   enable_eua=yes
       AC_MSG_RESULT([yes, since we are in GNU/Linux])
	   ;;
	 *)
	   enable_eua=no
	   AC_MSG_RESULT([no, this does not seem to be GNU/Linux])
	 ;;
 esac
]
)

if test x$enable_eua = xyes;
then
    AC_CHECK_HEADERS([attr/xattr.h], [], AC_MSG_ERROR([This header is mandatory for extended user attributes support]), [])
    AC_DEFINE([ENABLE_USER_XATTR], [1], [Enables user extended attributes support])
fi
AM_CONDITIONAL(ENABLE_USER_XATTR, test x$enable_eua = xyes)

dnl Comprovem els headers
acl_headers=0

AC_CHECK_HEADERS([sys/acl.h],
[
acl_headers=1
], [], [])

AC_CHECK_HEADERS([acl/libacl.h],
[
acl_headers=1
], [], [])

if test x$acl_headers = x0;
then
  AC_MSG_ERROR([No suitable headers for ACL support have been found])
fi

dnl Per a FreeBSD
AC_CHECK_FUNC([acl_get_perm_np], 
 [AC_DEFINE([HAVE_ACL_GET_PERM_NP], [], [acl_get_perm_np is available])]
[])

AC_SUBST(llibreria_acl, [])
	
dnl Comprovem si hi ha la llibreria d'ACL
AC_CHECK_LIB(acl, acl_get_perm, 
 [
   AC_DEFINE([HAVE_ACL_GET_PERM], [], [acl_get_perm is available])
   AC_SUBST(llibreria_acl, [-lacl])
 ],)

dnl Volem que ens generi el fitxers seguents
AC_OUTPUT([Makefile
		src/Makefile
		img/Makefile
		lib/Makefile
		po/Makefile.in
		man/Makefile
		doc/Makefile
		doc/C/Makefile
		doc/C/figures/Makefile
		])