163 |
AC_MSG_RESULT(no) |
AC_MSG_RESULT(no) |
164 |
]) |
]) |
165 |
|
|
166 |
|
dnl |
167 |
|
dnl for external POSIX sort command support |
168 |
|
dnl |
169 |
|
dnl By default, GLOBAL uses built-in 'gnusort' command, which is GNU sort |
170 |
|
dnl itself. If you have GNU sort or another POSIX compatible sort command |
171 |
|
dnl in your system, you can use it without installing 'gnusort'. |
172 |
|
dnl |
173 |
|
dnl configure # use built-in 'gnusort' |
174 |
|
dnl configure --with-sort-command # use system sort command |
175 |
|
dnl configure --with-sort-command=sort # use system sort command |
176 |
|
dnl configure --with-sort-command=/usr/bin/sort # use specified sort command |
177 |
|
dnl |
178 |
|
POSIX_SORT=gnusort |
179 |
|
AC_MSG_CHECKING(for external sort command support) |
180 |
|
AC_ARG_WITH(sort-command, |
181 |
|
[ --with-sort-command[[=COM]] use external sort command [[sort]] ], |
182 |
|
[ |
183 |
|
if test "$withval" = 'no'; then |
184 |
|
AC_MSG_RESULT(no) |
185 |
|
else |
186 |
|
case $withval in |
187 |
|
''|yes) POSIX_SORT=sort;; |
188 |
|
*) POSIX_SORT=$withval;; |
189 |
|
esac |
190 |
|
if echo $POSIX_SORT | grep '^/' >/dev/null && test ! -f $POSIX_SORT; then |
191 |
|
AC_MSG_ERROR([command '$POSIX_SORT' not found.]) |
192 |
|
fi |
193 |
|
export POSIX_SORT |
194 |
|
if ! (sh -c "$POSIX_SORT -t ':' -k 1,1" < /dev/null > /dev/null 2>&1); then |
195 |
|
AC_MSG_ERROR([command '$POSIX_SORT' is not POSIX compatible.]) |
196 |
|
fi |
197 |
|
AC_MSG_RESULT([using $POSIX_SORT]) |
198 |
|
fi |
199 |
|
],[ |
200 |
|
AC_MSG_RESULT(no) |
201 |
|
]) |
202 |
|
AC_DEFINE_UNQUOTED(POSIX_SORT,"$POSIX_SORT",[POSIX sort command.]) |
203 |
|
AM_CONDITIONAL([USE_BUILTIN_SORT], [test "$POSIX_SORT" = gnusort]) |
204 |
|
AC_SUBST(POSIX_SORT) |
205 |
|
|
206 |
AC_SUBST(INCLUDES) |
AC_SUBST(INCLUDES) |
207 |
AC_SUBST(LDADD) |
AC_SUBST(LDADD) |
208 |
AC_SUBST(LDFLAGS) |
AC_SUBST(LDFLAGS) |
223 |
|
|
224 |
AC_OUTPUT([Makefile |
AC_OUTPUT([Makefile |
225 |
gtags.conf |
gtags.conf |
226 |
|
globash.rc |
227 |
libutil/langmap.h |
libutil/langmap.h |
228 |
htags/global.cgi.tmpl |
htags/global.cgi.tmpl |
229 |
libutil/Makefile |
libutil/Makefile |