"Fossies" - the Fresh Open Source Software Archive

Member "global-6.6.5/configure.ac" (3 Sep 2020, 12960 Bytes) of package /linux/misc/global-6.6.5.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. See also the latest Fossies "Diffs" side-by-side code changes report for "configure.ac": 6.6.4_vs_6.6.5.

    1 dnl
    2 dnl Configuration script for GLOBAL.
    3 dnl Process this file with autoconf to produce a configure script.
    4 dnl
    5 dnl Copyright (c) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2008, 2010,
    6 dnl 2011, 2012, 2013, 2014, 2015, 2016
    7 dnl Tama Communications Corporation
    8 dnl
    9 dnl This file is part of GNU GLOBAL.
   10 dnl
   11 dnl This program is free software: you can redistribute it and/or modify
   12 dnl it under the terms of the GNU General Public License as published by
   13 dnl the Free Software Foundation, either version 3 of the License, or
   14 dnl (at your option) any later version.
   15 dnl 
   16 dnl This program is distributed in the hope that it will be useful,
   17 dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
   18 dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   19 dnl GNU General Public License for more details.
   20 dnl 
   21 dnl You should have received a copy of the GNU General Public License
   22 dnl along with this program.  If not, see <http://www.gnu.org/licenses/>.
   23 dnl
   24 AC_INIT([GNU GLOBAL],[6.6.5])
   25 AC_DEFINE(COPYRIGHT_YEAR,["1996-2019"],[Copyright Year])
   26 AC_CONFIG_SRCDIR(global/global.c)
   27 AC_CONFIG_HEADERS([config.h:config-h.in])
   28 AC_PREREQ(2.59)
   29 AM_INIT_AUTOMAKE([1.9.3 gnu subdir-objects])
   30 
   31 dnl Checks for programs.
   32 AC_PROG_CC
   33 AC_PROG_INSTALL
   34 AC_PROG_MAKE_SET
   35 AM_PATH_LISPDIR
   36 dnl
   37 dnl Currently, absolute path name of perl is required only for CGI script.
   38 dnl So, if you don't use the -f(--form) option of htags(1), it is not required.
   39 dnl
   40 AC_PATH_PROG(PERL, perl, [/usr/bin/env perl])
   41 AC_PATH_PROG(LID, lid, no)
   42 AC_CHECK_TOOL(AR, ar)
   43 dnl
   44 dnl for "plugin-factory/pygments_parser.py"
   45 dnl
   46 AM_PATH_PYTHON([2.6],,[PYTHON="/usr/bin/env python"])
   47 
   48 AC_GNU_SOURCE
   49 
   50 LT_PREREQ([2.2.6b])
   51 LT_CONFIG_LTDL_DIR([libltdl])
   52 dnl
   53 dnl Because autoreconf up to version 2.59 doesn't know LT_INIT,
   54 dnl we use the old name AC_PROG_LIBTOOL.
   55 dnl
   56 AC_LIBTOOL_DLOPEN
   57 AC_PROG_LIBTOOL
   58 LTDL_INIT([recursive])
   59 
   60 dnl Checks for libraries.
   61 
   62 dnl Checks for header files.
   63 AC_CHECK_HEADERS(limits.h string.h unistd.h stdarg.h sys/time.h fcntl.h)
   64 AC_CHECK_HEADERS(sys/resource.h)
   65 AC_HEADER_DIRENT
   66 if test ${ac_header_dirent} = no; then
   67         AC_MSG_ERROR([dirent(3) is required but not found.])
   68 fi
   69 
   70 case "$host_os" in
   71     mingw*|*djgpp*)
   72     ;;
   73     *)
   74 AC_MSG_CHECKING(whether POSIX.1-2008 realpath is equipped)
   75 AC_CACHE_VAL(ac_cv_posix1_2008_realpath,
   76 [AC_RUN_IFELSE([AC_LANG_SOURCE([[
   77 main(){ (void)realpath("/./tmp", (void *)0); return 0; }
   78 ]])],[ac_cv_posix1_2008_realpath=yes],
   79 [ac_cv_posix1_2008_realpath=no])])
   80 AC_MSG_RESULT($ac_cv_posix1_2008_realpath)
   81 if test "$ac_cv_posix1_2008_realpath" = no; then
   82         AC_MSG_ERROR([POSIX.1-2008 realpath(3) is required.])
   83 fi
   84     ;;
   85 esac
   86 AC_HEADER_STDC
   87 AC_HEADER_STAT
   88 AC_HEADER_TIME
   89 
   90 dnl Checks for typedefs, structures, and compiler characteristics.
   91 AC_C_CONST
   92 AC_TYPE_OFF_T
   93 AC_TYPE_SIZE_T
   94 AC_CHECK_MEMBERS([struct stat.st_blksize])
   95 AC_C_BIGENDIAN
   96 AC_CHECK_TYPE([int8_t],,[AC_DEFINE_UNQUOTED([int8_t], [signed char],
   97         [Define to `signed char' if <sys/types.h> does not define.])])
   98 AC_CHECK_TYPE([int16_t],,[AC_DEFINE_UNQUOTED([int16_t], [short],
   99         [Define to `short' if <sys/types.h> does not define.])])
  100 AC_CHECK_TYPE([int32_t],,[AC_DEFINE_UNQUOTED([int32_t], [int],
  101         [Define to `int' if <sys/types.h> does not define.])])
  102 AC_CHECK_TYPE([u_int8_t],,[AC_DEFINE_UNQUOTED([u_int8_t], [unsigned char],
  103         [Define to `unsigned char' if <sys/types.h> does not define.])])
  104 AC_CHECK_TYPE([u_int16_t],,[AC_DEFINE_UNQUOTED([u_int16_t], [unsigned short],
  105         [Define to `unsigned short' if <sys/types.h> does not define.])])
  106 AC_CHECK_TYPE([u_int32_t],,[AC_DEFINE_UNQUOTED([u_int32_t], [unsigned int],
  107         [Define to `unsigned int' if <sys/types.h> does not define.])])
  108 AC_CHECK_TYPE([ssize_t],,[AC_DEFINE_UNQUOTED([ssize_t], [int],
  109         [Define to `int' if <sys/types.h> does not define.])])
  110 AC_CHECK_TYPE([caddr_t],,[AC_DEFINE_UNQUOTED([caddr_t], [char *],
  111         [Define to `char *' if <sys/types.h> does not define.])])
  112 AC_CHECK_SIZEOF(int)
  113 if test ${ac_cv_sizeof_int} != 4; then
  114     AC_MSG_ERROR([Integer size isn't 32 bit.])
  115 fi
  116 AC_CHECK_SIZEOF(short)
  117 if test ${ac_cv_sizeof_short} != 2; then
  118     AC_MSG_ERROR([Short integer size isn't 16 bit.])
  119 fi
  120 AC_CHECK_SIZEOF(char)
  121 if test ${ac_cv_sizeof_char} != 1; then
  122     AC_MSG_ERROR([Char size isn't 8 bit.])
  123 fi
  124 
  125 dnl Checks for library functions.
  126 AC_FUNC_ALLOCA
  127 AC_FUNC_MMAP
  128 AC_FUNC_MEMCMP
  129 AC_TYPE_SIGNAL
  130 AC_FUNC_STRFTIME
  131 AC_CHECK_FUNCS(getcwd putenv lstat snprintf)
  132 AC_CHECK_FUNCS(index rindex bzero bcmp bcopy strchr strrchr memset memcmp memmove)
  133 AC_CHECK_FUNCS(putc_unlocked getc_unlocked)
  134 AC_CHECK_FUNCS(gettimeofday getrusage)
  135 AC_DJGPP
  136 
  137 AC_ARG_ENABLE(gtagscscope,
  138 [  --disable-gtagscscope   omit gtags-cscope],,
  139 enable_gtagscscope=yes)
  140 AM_CONDITIONAL([USE_GTAGSCSCOPE], [test "$enable_gtagscscope" != no])
  141 
  142 dnl #### begin of gtags-cscope ###
  143 AC_CHECK_CURSES
  144 AM_CONDITIONAL(HAS_CURSES, test "$has_curses" = true)
  145 if test "$has_curses" = false && test "$enable_gtagscscope" = yes; then
  146     AC_MSG_ERROR([curses library is required but not found.
  147 If you are not going to use gtags-cscope, please try ./configure --disable-gtagscscope])
  148 fi
  149 
  150 dnl Checks for libraries.
  151 dnl Replace `main' with a function in -lcurses:
  152 dnl AC_CHECK_LIB(curses, main)
  153 
  154 dnl Checks for typedefs, structures, and compiler characteristics.
  155 AC_C_CONST
  156 AC_TYPE_MODE_T
  157 AC_TYPE_PID_T
  158 AC_TYPE_SIZE_T
  159 AC_CHECK_TYPE(sighandler_t,[],[],[
  160 #ifdef HAVE_SIGNAL_H
  161 # include <signal.h>
  162 #endif])
  163 dnl This test was ripped from gnuplot's configure.in:
  164 AC_MSG_CHECKING(for sigsetjmp)
  165 AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <setjmp.h>]], [[jmp_buf env; sigsetjmp(env, 1);]])],[AC_MSG_RESULT(yes)
  166    AC_DEFINE(HAVE_SIGSETJMP,1,
  167              [ Define if we have sigsetjmp(). ])],[AC_MSG_RESULT(no)])
  168 
  169 dnl Checks for library functions.
  170 AC_CHECK_FUNCS(fixkeypad strerror)
  171 
  172 dnl case "$host_os" in
  173 dnl     linux*)
  174 dnl         AC_DEFINE(Linux, 1, [We're using some variant of Linux])
  175 dnl     ;;
  176 dnl     netbsd*|freebsd*|darwin*)
  177 dnl         AC_DEFINE(BSD, 1, [We're using a BSD-flavoured Unix])
  178 dnl     ;;
  179 dnl esac
  180 dnl #### end of gtags-cscope ###
  181 
  182 AM_CPPFLAGS='-I$(top_srcdir)/libparser $(LTDLINCL) -I$(top_srcdir)/libutil -I$(top_srcdir)/libdb -I$(top_srcdir)/libglibc -I../libutil'
  183 DBLIBRARY='../libdb/libglodb.a'
  184 
  185 dnl
  186 dnl This option is for debugging GLOBAL. Not for normal use.
  187 dnl
  188 AC_ARG_WITH(db185-compat,
  189 [  --with-db185-compat[[=DIR]] use DB1.85 compatible API included in DB2 or later ],
  190 [
  191     if test "$withval" != no; then
  192         case "$withval" in
  193         ''|yes)
  194             ;;
  195         *)
  196             if ! test -d "$withval"; then
  197                 AC_MSG_ERROR([directory $withval not found.])
  198             fi
  199             if ! test -r "$withval/include/db_185.h"; then
  200                 AC_MSG_ERROR([header $withval/include/db_185.h not found.])
  201             fi
  202             AM_CPPFLAGS="$AM_CPPFLAGS -I$withval/include"
  203             #LDFLAGS="$LDFLAGS -L$withval/lib"
  204             ;;
  205         esac
  206         DBLIBRARY="$withval/lib/libdb.a"
  207         #DBLIBRARY='-ldb'
  208         AC_DEFINE(USE_DB185_COMPAT,1,[Define if you use DB1.85 compatible API.])
  209     fi
  210 ],[ with_db185_compat=no ])
  211 AM_CONDITIONAL([USE_DB185_COMPAT], [test "$with_db185_compat" != no])
  212 
  213 LDADD='../libparser/libgloparser.a ../libutil/libgloutil.a '$DBLIBRARY' ../libglibc/libgloglibc.a'
  214 dnl
  215 dnl Use sqlite3 API.
  216 dnl
  217 AC_MSG_CHECKING(for sqlite3 support)
  218 AC_ARG_WITH(sqlite3,
  219 [  --with-sqlite3          use sqlite3 API ],
  220 [
  221     #LDFLAGS="$LDFLAGS -lsqlite3"
  222     AC_DEFINE(USE_SQLITE3,1,[Define if you use sqlite3 API.])
  223     AM_CONDITIONAL(USE_SQLITE3, true)
  224     AC_MSG_RESULT(yes)
  225 ],[
  226     AM_CONDITIONAL(USE_SQLITE3, false)
  227     AC_MSG_RESULT(no)
  228 ])
  229 
  230 dnl
  231 dnl for home-etc support
  232 dnl
  233 AC_MSG_CHECKING(for home-etc support)
  234 AC_ARG_WITH(home-etc,
  235 [  --with-home-etc[[=DIR]]   include home-etc support [[DIR=/usr/local]] ],
  236 [
  237         if test "$withval" = no; then
  238                 AC_MSG_RESULT(no)
  239         else
  240                 case "$withval" in
  241                 ''|yes) HOMEETC=/usr/local;;
  242                 *)      HOMEETC="$withval";;
  243                 esac
  244                 if ! test -d "$HOMEETC"; then
  245                         AC_MSG_ERROR([directory '$HOMEETC' not found.])
  246                 fi
  247         if ! test -f "$HOMEETC/include/home_etc.h"; then
  248                         AC_MSG_ERROR([header '$HOMEETC/include/home_etc.h' not found.])
  249                 fi
  250                 AM_CPPFLAGS="$AM_CPPFLAGS -I$HOMEETC/include"
  251                 LDFLAGS="$LDFLAGS -L$HOMEETC/lib -lhome_etc"
  252                 AC_DEFINE(HAVE_HOME_ETC_H,1,[Define if you use home-etc facility.])
  253                 AC_MSG_RESULT([yes, using $HOMEETC])
  254         fi
  255 ],[
  256         AC_MSG_RESULT(no)
  257 ])
  258 
  259 dnl
  260 dnl for pread/pwrite support
  261 dnl
  262 AC_MSG_CHECKING(for pread/pwrite support)
  263 AC_ARG_WITH(pread-pwrite,
  264 [  --with-pread-pwrite     include pread/pwrite support for BSD db library ],
  265 [
  266         if test "$withval" = no; then
  267                 AC_MSG_RESULT(no)
  268         else
  269         AC_DEFINE(HAVE_PREAD, 1, [Define to 1 if you have and use pread.])
  270         AC_DEFINE(HAVE_PWRITE, 1, [Define to 1 if you have and use pwrite.])
  271                 AC_MSG_RESULT([yes])
  272         fi
  273 ],[
  274         AC_MSG_RESULT(no)
  275 ])
  276 
  277 dnl
  278 dnl for Exuberant ctags plug-in parser.
  279 dnl
  280 AC_MSG_CHECKING(for exuberant ctags program)
  281 AC_ARG_WITH(exuberant-ctags,
  282 [  --with-exuberant-ctags=PROGRAM  specify Exuberant Ctags program ],
  283 [
  284         if test "$withval" = no; then
  285         EXUBERANT_CTAGS=
  286                 AC_MSG_RESULT(no)
  287     else
  288         EXUBERANT_CTAGS="$withval"
  289                 AC_MSG_RESULT([using $EXUBERANT_CTAGS])
  290     fi
  291 ],
  292 [
  293     withval=
  294     for d in `echo $PATH | sed -e 's/^:/.:/' -e 's/::/:.:/g' -e 's/:$/:./' -e 's/:/ /g'`
  295     do
  296         if test -x "$d/ctags" && (sh -c "'$d/ctags' --version" | grep "Exuberant Ctags") > /dev/null 2>&1; then
  297             withval="$d/ctags"
  298             break
  299         fi
  300     done
  301     if test "$withval" = ''; then
  302         EXUBERANT_CTAGS=
  303         AC_MSG_RESULT(no)
  304     else
  305         EXUBERANT_CTAGS="$withval"
  306         AC_MSG_RESULT([using $EXUBERANT_CTAGS])
  307     fi
  308 ])
  309 dnl
  310 dnl for Universal ctags plug-in parser.
  311 dnl
  312 AC_MSG_CHECKING(for universal ctags program)
  313 AC_ARG_WITH(universal-ctags,
  314 [  --with-universal-ctags=PROGRAM  specify Universal Ctags program ],
  315 [
  316         if test "$withval" = no; then
  317         UNIVERSAL_CTAGS=
  318                 AC_MSG_RESULT(no)
  319     else
  320         UNIVERSAL_CTAGS="$withval"
  321                 AC_MSG_RESULT([using $UNIVERSAL_CTAGS])
  322     fi
  323 ],
  324 [
  325     withval=
  326     for d in `echo $PATH | sed -e 's/^:/.:/' -e 's/::/:.:/g' -e 's/:$/:./' -e 's/:/ /g'`
  327     do
  328         if test -x "$d/ctags" && (sh -c "'$d/ctags' --_xformat='%R %-16N %4n %-16F %C' --extra=+r --fields=+r -x /dev/null") > /dev/null 2>&1; then
  329             withval="$d/ctags"
  330             break
  331         fi
  332     done
  333     if test "$withval" = ''; then
  334         UNIVERSAL_CTAGS=
  335         AC_MSG_RESULT(no)
  336     else
  337         UNIVERSAL_CTAGS="$withval"
  338         AC_MSG_RESULT([using $UNIVERSAL_CTAGS])
  339     fi
  340 ])
  341 AC_DEFINE_UNQUOTED(EXUBERANT_CTAGS, "$EXUBERANT_CTAGS", [Exuberant Ctags program.])
  342 AC_DEFINE_UNQUOTED(UNIVERSAL_CTAGS, "$UNIVERSAL_CTAGS", [Universal Ctags program.])
  343 AC_SUBST(EXUBERANT_CTAGS)
  344 AC_SUBST(UNIVERSAL_CTAGS)
  345 
  346 dnl
  347 dnl for POSIX sort program.
  348 dnl
  349 AC_MSG_CHECKING(for POSIX sort program)
  350 AC_ARG_WITH(posix-sort,
  351 [  --with-posix-sort=PROGRAM  specify POSIX sort program ],
  352 [
  353     POSIX_SORT="$withval"
  354         if test "$withval" = no; then
  355                 AC_MSG_RESULT(no)
  356     else
  357                 AC_MSG_RESULT([using $POSIX_SORT])
  358     fi
  359 ],
  360 [
  361     for d in `echo $PATH | sed -e 's/^:/.:/' -e 's/::/:.:/g' -e 's/:$/:./' -e 's/:/ /g'`
  362     do
  363         if test -x "$d/sort" && (sh -c "'$d/sort' -t ':' -k 1,1" < /dev/null) > /dev/null 2>&1; then
  364             withval="$d/sort"
  365             break
  366         fi
  367     done
  368     if test "$withval" = ''; then
  369         AC_MSG_RESULT(no)
  370     else
  371         POSIX_SORT="$withval"
  372         AC_MSG_RESULT([using $POSIX_SORT])
  373     fi
  374 ])
  375 AC_DEFINE_UNQUOTED(POSIX_SORT, "$POSIX_SORT", [POSIX sort program.])
  376 AC_SUBST(POSIX_SORT)
  377 
  378 AC_SUBST(AM_CPPFLAGS)
  379 AC_SUBST(LDADD)
  380 AC_SUBST(LDFLAGS)
  381 
  382 dnl
  383 dnl The definition of config variable skip and suffixes.
  384 dnl
  385 dnl DEFAULTSKIP: You need not list files whoes first character of name is '.'.
  386 dnl     Such files are skipped even in case of not being in the list.
  387 dnl
  388 DEFAULTSKIP='HTML/,HTML.pub/,tags,TAGS,ID,y.tab.c,y.tab.h,gtags.files,cscope.files,cscope.out,cscope.po.out,cscope.in.out,SCCS/,RCS/,CVS/,CVSROOT/,{arch}/,autom4te.cache/,*.orig,*.rej,*.bak,*~,#*#,*.swp,*.tmp,*_flymake.*,*_flymake,*.o,*.a,*.so,*.lo,*.zip,*.gz,*.bz2,*.xz,*.lzh,*.Z,*.tgz,*.min.js,*min.css'
  389 DEFAULTLANGMAP='c:.c.h,yacc:.y,asm:.s.S,java:.java,cpp:.c++.cc.hh.cpp.cxx.hxx.hpp.C.H,php:.php.php3.phtml'
  390 DEFAULTINCLUDEFILESUFFIXES='h,hh,hxx,hpp,H,inc.php'
  391 AC_SUBST(DEFAULTSKIP)
  392 AC_SUBST(DEFAULTLANGMAP)
  393 AC_SUBST(DEFAULTINCLUDEFILESUFFIXES)
  394 
  395 dnl
  396 dnl Quoted langmap. It is only for gtags.conf.
  397 dnl
  398 DEFAULTLANGMAP_QUOTED=`echo $DEFAULTLANGMAP | sed 's/:/\\\\:/g'`
  399 AC_SUBST(DEFAULTLANGMAP_QUOTED)
  400 
  401 AC_CONFIG_FILES([Makefile
  402     gtags.conf
  403     Doxyfile
  404     libutil/langmap.h
  405     libutil/Makefile
  406     gtags/Makefile
  407     htags/Makefile
  408     htags/icons/Makefile
  409     htags/jquery/Makefile
  410     htags/jquery/images/Makefile
  411     libdb/Makefile
  412     global/Makefile
  413     gozilla/Makefile
  414     gtags-cscope/Makefile
  415     globash/Makefile
  416     htags-refkit/Makefile
  417     htags-server/Makefile
  418     libglibc/Makefile
  419     doc/Makefile
  420     script/Makefile
  421     libparser/Makefile
  422     plugin-factory/Makefile
  423     plugin-factory/pygments_parser.py
  424     libltdl/Makefile
  425 ])
  426 AC_OUTPUT