"Fossies" - the Fresh Open Source Software Archive

Member "bonnie++-2.00a/configure.in" (22 Sep 2020, 3010 Bytes) of package /linux/privat/bonnie++-2.00a.tgz:


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.

    1 dnl Process this file with autoconf to produce a configure script.
    2 AC_INIT(bonnie++.cpp)
    3 AC_CONFIG_HEADER(conf.h)
    4 AC_SUBST(version)
    5 version="2.00a"
    6 AC_SUBST(csv_version)
    7 csv_version="1.98"
    8 
    9 AC_ARG_ENABLE(stripping,
   10       [  --disable-stripping  disables stripping of installed binaries],
   11       STRIPPING=$strippingval, STRIPPING=no)
   12 AC_SUBST(stripping)
   13 if [[ ! "$STRIPPING" = "no" ]]; then
   14   stripping=""
   15 else
   16   stripping="-s"
   17 fi
   18 echo $DEB_BUILD_OPTIONS | grep -q nostrip
   19 if [[ "$?" = "0" ]]; then
   20   stripping=""
   21 fi
   22 
   23 AC_SUBST(debug)
   24 AC_ARG_ENABLE(debug,
   25       [  --enable-debug  enables debug code generation for binaries],
   26       debug=-g, debug="")
   27 echo $DEB_BUILD_OPTIONS | grep -q debug
   28 if [[ "$?" = "0" ]]; then
   29   debug=-g
   30 fi
   31 
   32 dnl Checks for programs.
   33 AC_LANG_CPLUSPLUS
   34 AC_PROG_CC
   35 AC_PROG_CXX
   36 AC_PROG_CXXCPP
   37 AC_PROG_INSTALL
   38 
   39 dnl Checks for typedefs, structures, and compiler characteristics.
   40 AC_C_CONST
   41 AC_TYPE_SIZE_T
   42 
   43 AC_SUBST(semun)
   44 AC_TRY_COMPILE(#include <sys/types.h>
   45 #include <sys/ipc.h>
   46 #include <sys/sem.h>
   47     , union semun sem; , semun="yes")
   48 if [[ -n "$semun" ]]; then
   49    semun="#define SEMUN_IN_SEM_H"
   50 fi
   51 
   52 AC_SUBST(bool)
   53 AC_TRY_COMPILE([], [bool var;] , , bool="typedef bool char;")
   54 AC_SUBST(true_false)
   55 AC_TRY_COMPILE(, [char c = true; char d = false;
   56 ] , true_false="0", true_false="1")
   57 AC_SUBST(snprintf)
   58 AC_TRY_LINK([#include <stdio.h>], char buf[[10]]; snprintf(buf, sizeof(buf), "abc");,,snprintf="no");
   59 if [[ -n "$snprintf" ]]; then
   60    snprintf="#define NO_SNPRINTF"
   61 fi
   62 
   63 AC_CHECK_HEADERS(algorithm algo.h algo)
   64 
   65 AC_SUBST(linux_pthread)
   66 AC_TRY_COMPILE([#define _GNU_SOURCE
   67 #include <pthread.h>
   68 ] , [pthread_mutexattr_t attr;
   69     pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE_NP);]
   70   , linux_pthread="yes")
   71 if [[ -n "$linux_pthread" ]]; then
   72    linux_pthread="#define LINUX_PTHREAD"
   73 fi
   74  
   75 LDFLAGS=-lpthread
   76 AC_SUBST(thread_ldflags)
   77 AC_TRY_LINK([#include <pthread.h>
   78 void * thread_func(void * param) { return NULL; }
   79 ] , [pthread_t thread_info;
   80      pthread_attr_t attr;
   81      pthread_create(&thread_info, &attr, &thread_func, NULL);]
   82   , thread_ldflags="-lpthread"
   83   , thread_ldflags="-pthread")
   84 
   85 AC_SUBST(large_file)
   86 AC_TRY_RUN([#ifndef _LARGEFILE64_SOURCE
   87 #define _LARGEFILE64_SOURCE
   88 #endif
   89 #include <stdio.h>
   90 #include <sys/types.h>
   91 #include <sys/stat.h>
   92 #include <fcntl.h>
   93 #include <unistd.h>
   94 #include <stdlib.h>
   95 
   96 int main () {
   97   int fd;
   98   off64_t i = off64_t(1) << 32 + 1;
   99   const char * const name = "test.2g";
  100 
  101   fd = open64(name, O_CREAT|O_RDWR|O_EXCL|O_LARGEFILE,
  102               S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP);
  103   if (fd == -1) {
  104     perror("open64");
  105     exit(1);
  106   }
  107   unlink(name);
  108 
  109   int r = lseek64(fd, i, SEEK_SET);
  110   if (r == -1) {
  111     perror("lseek");
  112     exit(1);
  113   }
  114   r = write(fd, &r, 1);
  115   if (r == -1) {
  116     perror("write");
  117     exit(1);
  118   }
  119   close(fd);
  120   return 0;
  121 }], large_file="yes")
  122 if [[ -n "$large_file" ]]; then
  123    large_file="#define _LARGEFILE64_SOURCE"
  124 fi
  125 
  126 AC_OUTPUT(Makefile bonnie.h port.h bonnie++.spec bon_csv2txt bon_csv2html.1 sun/pkginfo)