85f9c7390c7abe67c3490a435030f89261d2eb35
[techtalk-pse.git] / configure.ac
1 # Tech Talk PSE
2 # Copyright (C) 2010 Red Hat Inc.
3 #
4 # This program is free software; you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
6 # the Free Software Foundation; either version 2 of the License, or
7 # (at your option) any later version.
8 #
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12 # GNU General Public License for more details.
13 #
14 # You should have received a copy of the GNU General Public License
15 # along with this program; if not, write to the Free Software
16 # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
17
18 AC_INIT([techtalk-pse],[1.0.1])
19 AM_INIT_AUTOMAKE([foreign])
20
21 dnl Check for pod2man and pod2text.
22 AC_CHECK_PROG([POD2MAN],[pod2man],[pod2man],[no])
23 test "x$POD2MAN" = "xno" &&
24      AC_MSG_ERROR([pod2man must be installed])
25 AC_CHECK_PROG([POD2TEXT],[pod2text],[pod2text],[no])
26 test "x$POD2TEXT" = "xno" &&
27      AC_MSG_ERROR([pod2text must be installed])
28
29 dnl Check for required Perl modules.
30 missing_perl_modules=no
31 for pm in Pod::Usage Getopt::Long Glib Gtk2 Gtk2::MozEmbed; do
32     AC_MSG_CHECKING([for $pm])
33     if ! perl -M$pm -e1 >/dev/null 2>&1; then
34         AC_MSG_RESULT([no])
35         missing_perl_modules=yes
36     else
37         AC_MSG_RESULT([yes])
38     fi
39 done
40 if test "x$missing_perl_modules" = "xyes"; then
41     AC_MSG_FAILURE([some Perl modules required to run the program are missing])
42 fi
43
44 AC_CONFIG_FILES([techtalk-pse:techtalk-pse.pl],
45                 [chmod 0555 techtalk-pse])
46 AC_CONFIG_FILES([Makefile])
47 AC_OUTPUT