File: configure.in

package info (click to toggle)
dcgui 0.53-3
  • links: PTS
  • area: main
  • in suites: woody
  • size: 1,968 kB
  • ctags: 819
  • sloc: ansic: 14,045; sh: 2,839; makefile: 323; sed: 93
file content (156 lines) | stat: -rw-r--r-- 5,229 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
154
155
156
dnl Process this file with autoconf to produce a configure script.

AC_INIT(configure.in)
AM_INIT_AUTOMAKE(dc_gui, 0.53)
AM_CONFIG_HEADER(config.h)

dnl Pick up the Gnome macros.
AM_ACLOCAL_INCLUDE(macros)

GNOME_INIT
AC_ISC_POSIX
AC_PROG_CC
AM_PROG_CC_STDC
AC_HEADER_STDC

GNOME_COMPILE_WARNINGS
GNOME_X_CHECKS

dnl Add the languages which your application supports here.
ALL_LINGUAS="nl"
AM_GNU_GETTEXT

dnl Set PACKAGE_LOCALE_DIR in config.h.
if test "x${prefix}" = "xNONE"; then
  AC_DEFINE_UNQUOTED(PACKAGE_LOCALE_DIR, "${ac_default_prefix}/${DATADIRNAME}/locale")
else
  AC_DEFINE_UNQUOTED(PACKAGE_LOCALE_DIR, "${prefix}/${DATADIRNAME}/locale")
fi

dnl check for dctc
AC_CHECK_PROG(HAVE_DCTC,dctc,yes,no)
if test "x$HAVE_DCTC" = "xno"; then
    AC_MSG_ERROR(Cannot find dctc: Is dctc in path?)
fi

dctc_mini_maj_version=0
dctc_mini_min_version=79

AC_MSG_CHECKING(DCTC version)
tmp_dctc_version=`dctc 2>&1 | grep "^INFO" | sed "s/^.*v//" | sed "s/|//"`
dctc_major=`echo $tmp_dctc_version | cut -d . -f 1`
dctc_minor=`echo $tmp_dctc_version | cut -d . -f 2`
dctc_micro=`echo $tmp_dctc_version | cut -d . -f 3`
dctc_version="$dctc_major.$dctc_minor.$dctc_micro"
AC_MSG_RESULT($dctc_version)

if test $dctc_major -lt $dctc_mini_maj_version; then
	AC_MSG_ERROR(DCTC min version is $dctc_mini_maj_version.$dctc_mini_min_version.x)
fi

if test $dctc_major -eq $dctc_mini_maj_version; then
	if test $dctc_minor -lt $dctc_mini_min_version; then
		AC_MSG_ERROR(DCTC min version is $dctc_mini_maj_version.$dctc_mini_min_version.x)
	fi
fi

dnl check for hublist
AC_CHECK_PROG(HAVE_HUBLIST,hublist,yes,no)
if test "x$HAVE_HUBLIST" = "xno"; then
    AC_MSG_ERROR(Cannot find hublist: Is hublist in path?)
fi

dnl alter the location of Berkeley DB directories (lib/ and include/)
db_dir="";
AC_ARG_WITH(db,[  --with-db=DIR            Specify the directory where Berkeley DB is stored (the directory containing lib/ and include/], [db_dir=$withval])
if test "x$db_dir" != "x"; then
        LIBS="$LIBS -L$db_dir/lib"
        CPPFLAGS="$CPPFLAGS -I$db_dir/include"
fi

dnl Check if BerkeleyDB include is available
AC_CHECK_HEADERS(db.h, ,AC_MSG_ERROR(BerkeleyDB include required.))

dnl choose between auto-detected Berkeley DB using db.h content and manually try to link db
AC_ARG_ENABLE(manual-db-detect,[  --enable-manual-db-detect  Disable automatic Berkeley DB version detection using db.h], [manu_db="yes"], [manu_db="no"])

if test "x$manu_db" = "xyes"; then
   dnl choose which berkeleyDB library to use (4.0, 3.3, 3.2 or 3.1)
   AC_CHECK_LIB(db-4.0,db_env_create,HAVE_DB40=yes)
   if test "x$HAVE_DB40" = "xyes"; then
      AC_SUBST(berkeleydb_libs)
      berkeleydb_libs="-ldb-4.0"
   else
      AC_CHECK_LIB(db-3.3,db_env_create,HAVE_DB33=yes)
      if test "x$HAVE_DB33" = "xyes"; then
         AC_SUBST(berkeleydb_libs)
         berkeleydb_libs="-ldb-3.3"
      else
         AC_CHECK_LIB(db-3.2,db_env_create,HAVE_DB32=yes)
         if test "x$HAVE_DB32" = "xyes"; then
            AC_SUBST(berkeleydb_libs)
            berkeleydb_libs="-ldb-3.2"
         else
            AC_CHECK_LIB(db-3.1,db_env_create,HAVE_DB31=yes)
            if test "x$HAVE_DB31" = "xyes"; then
               AC_SUBST(berkeleydb_libs)
               berkeleydb_libs="-ldb-3.1"
            else
               AC_CHECK_LIB(db-3,db_env_create,HAVE_DB3=yes)
               if test "x$HAVE_DB3" = "xyes"; then
                  AC_SUBST(berkeleydb_libs)
                  berkeleydb_libs="-ldb-3"
                  AC_MSG_WARN(***************************************************************);
                  AC_MSG_WARN(***************************************************************);
                  AC_MSG_WARN(You use a BerkeleyDB that has not been tested with this program);
                  AC_MSG_WARN(result can be unexpected);
                  AC_MSG_WARN(***************************************************************);
                  AC_MSG_WARN(***************************************************************);
               else
                  AC_MSG_ERROR(no supported BerkeleyDB found (4.0,3.1, 3.2, 3.3))
               fi
            fi
         fi
      fi
   fi
else
   dnl try to guess Berkeley DB version using DB_VERSION_MAJOR and DB_VERSION_MINOR from db.h
   AC_MSG_CHECKING(Berkeley Database library version)

   if test "x$db_dir" != "x"; then
      db_include="$db_dir/include/db.h"
   else
      db_include="/usr/include/db.h"
   fi

   db_major=`grep DB_VERSION_MAJOR $db_include | awk '{print $3;}'`
   db_minor=`grep DB_VERSION_MINOR $db_include | awk '{print $3;}'`
   db_version="$db_major.$db_minor"

   AC_MSG_RESULT($db_version)

   if test $db_major -ne 3 -a $db_major -ne 4; then
      AC_MSG_ERROR(no supported BerkeleyDB found (4.x or 3.x). Your version is $db_version)
   fi

   AC_CHECK_LIB(db-$db_version,db_env_create,HAVE_DB=yes)
   if test "x$HAVE_DB" = "xyes"; then
      AC_SUBST(berkeleydb_libs)
      berkeleydb_libs="-ldb-$db_version"
   else
      AC_MSG_ERROR(db.h reports Berkeley DB version is $db_version but no db-$db_version library exists)
   fi
fi


AC_OUTPUT([
Makefile
macros/Makefile
src/Makefile
intl/Makefile
po/Makefile.in
doc/Makefile
doc/C/Makefile
doc/es/Makefile
])