Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Oct 20th, 2010  |  syntax: None  |  size: 5.03 KB  |  views: 111  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. AC_PREREQ([2.59])
  2. AC_INIT([UpTools],[8.5.3],[bugs-uptools@palermo.edu],[UpTools])
  3. AM_INIT_AUTOMAKE([foreign -Wall -Werror])
  4. LT_PREREQ([2.2])
  5. LT_INIT([dlopen])
  6. AC_CONFIG_MACRO_DIR([m4])
  7. AC_CONFIG_SRCDIR([UpConf.cc])
  8. AC_CONFIG_HEADERS([config.h])
  9. AC_PREFIX_DEFAULT(/usr)
  10. AC_PROG_CXX
  11. CXXFLAGS="-O3 -ansi ${TUNE}  -Wall -Wno-deprecated  -D_FORTIFY_SOURCE=0"
  12. CPPFLAGS="${CPPFLAGS} -I/usr/include/postgresql"
  13.  
  14. AC_SEARCH_LIBS([pthread_create],[pthread])
  15. AC_SEARCH_LIBS([ns_get16],[resolv])
  16.  
  17.  
  18. AC_ARG_WITH([ssl],
  19.            [AS_HELP_STRING([--with-ssl],
  20.               [enable support for ssl @<:@default=check@:>@])],
  21.            [],
  22.             [with_ssl=check])
  23.          
  24. AS_IF([test "x$with_ssl" != xno],
  25.             [AC_SEARCH_LIBS([SSL_library_init], [ssl],
  26.                #AC_DEFINE([HAVE_LIBMYSQL], [1],
  27.                 #         [Define if you have libmysqlclient]),
  28.                 [have_ssl=yes],
  29.                 [ if test "x$with_ssl" != xcheck ;then
  30.               AC_MSG_FAILURE(
  31.                  [ssl support was asked, but ssl was not found])
  32.                 fi]
  33.               )])
  34.  
  35.  
  36.  
  37. AC_ARG_WITH([mysql],
  38.            [AS_HELP_STRING([--with-mysql],
  39.               [enable support for mysql @<:@default=check@:>@])],
  40.            [],
  41.             [with_mysql=check])
  42.          
  43.           AS_IF([test "x$with_mysql" != xno],
  44.             [AC_SEARCH_LIBS([mysql_close], [mysqlclient],
  45.                #AC_DEFINE([HAVE_LIBMYSQL], [1],
  46.                 #         [Define if you have libmysqlclient]),
  47.                 [have_mysql=yes],
  48.                 [ if test "x$with_mysql" != xcheck ;then
  49.               AC_MSG_FAILURE(
  50.                  [mysql support was asked, but mysqlclient was not found])
  51.                 fi]
  52.               )])
  53.  
  54.  
  55.  
  56.  
  57. AC_ARG_WITH([postgresql],
  58.             [AS_HELP_STRING([--with-postgresql],
  59.               [enable support for postgresqk @<:@default=check@:>@])],
  60.             [],
  61.             [with_postgresql=check])
  62.          
  63. AS_IF([test "x$with_postgresql" != xno],
  64.         [AC_SEARCH_LIBS([PQfinish], [pq],
  65.         #       AC_DEFINE([HAVE_LIBPQ], [1],
  66.         #               [Define if you have libpq]),
  67.         [have_pq=yes],
  68.                         [ if test "x$with_postgresql" != xcheck ;then
  69.                         AC_MSG_FAILURE([postgresql test failed (--without-postgresql to disable)])
  70.                 fi
  71.                 ]
  72.               )])
  73.  
  74.  
  75.  
  76. AC_HEADER_RESOLV
  77.  
  78.  
  79. if test "x${have_ssl}" = xyes
  80.         then AC_CHECK_HEADERS([openssl/ssl.h yassl/ssl.h], [break])
  81.         if test x"$ac_cv_header_openssl_ssl_h" != xyes -a x"$ac_cv_header_yassl_ssl_h" != xyes
  82.                 then AC_MSG_FAILURE([ssl headers not found or not usable])
  83.                 else ssl=true
  84.         fi
  85.         else ssl=false
  86. fi
  87.  
  88. if test "x${have_mysql}" = xyes
  89.         then AC_CHECK_HEADERS([mysql/mysql.h mysql.h], [break])
  90.         if test x"$ac_cv_header_mysql_mysql_h" != xyes -a x"$ac_cv_header_mysql_h" != xyes
  91.                 then AC_MSG_FAILURE([MySQL headers not found or not usable])
  92.                 else mysql=true
  93.         fi
  94.         else mysql=false
  95. fi
  96.  
  97.  
  98. if test x"${have_pq}" = xyes
  99.         then AC_CHECK_HEADERS([postgresql/libpq-fe.h libpq-fe.h], [break])
  100.         if test x"$ac_cv_header_postgresql_libpq_fe_h" != xyes -a x"$ac_cv_header_libpq_fe_h" != xyes
  101.                 then AC_MSG_FAILURE([PostgreSQL headers not found or not usable])
  102.                 else postgresql=true
  103.         fi
  104.         else postgresql=false
  105. fi
  106.  
  107.  
  108.  
  109. AM_CONDITIONAL([ssl], [test x$ssl = xtrue])
  110. AM_CONDITIONAL([mysql], [test x$mysql = xtrue])
  111. AM_CONDITIONAL([postgresql], [test x$postgresql = xtrue])
  112.  
  113.  
  114. if test x"$ssl" = xfalse
  115. then
  116.         ss="No. You may enable with --enable-ssl"
  117. else
  118.         ss="Yes"
  119. fi
  120.  
  121. if test x"$mysql" = xfalse
  122. then
  123.         ms="No. You may enable with --with-mysql"
  124. else
  125.         ms="Yes"
  126. fi
  127.  
  128.  
  129. if test x"$postgresql" = xfalse
  130. then
  131.         pq="No. You may enable with --with-postgresql"
  132. else
  133.         pq="Yes"
  134. fi
  135.  
  136.  
  137.  
  138.  
  139. AC_CHECK_HEADERS([arpa/inet.h fcntl.h netdb.h netinet/in.h stdlib.h string.h strings.h sys/ioctl.h sys/socket.h sys/time.h syslog.h unistd.h])
  140.  
  141.  
  142. AC_HEADER_STDBOOL
  143.  
  144. AC_C_INLINE
  145. AC_TYPE_SIZE_T
  146.  
  147. AC_FUNC_MKTIME
  148. AC_CHECK_FUNCS([gethostbyname localtime_r memmove memset regcomp select socket strcasecmp strerror strncasecmp])
  149. AC_CONFIG_FILES([Makefile])
  150. AC_OUTPUT
  151. echo \
  152. "-------------------------------------------------
  153.  
  154. Congratulations! You have created a Makefile for: ${PACKAGE_NAME}  ${PACKAGE_VERSION}
  155.  
  156. Prefix is '${prefix}'.
  157. Compiler is '${CXX}
  158. CXXFLAGS are '${CXXFLAGS}'
  159. LDFLAGS are '${LDFLAGS}'
  160. CPPFLAGS are '${CPPFLAGS}'
  161. LIBS are '${LIBS}'
  162. srcdir is '${srcdir}'
  163. ssl support: '${ss}'
  164. mysql support: '${ms}'
  165. MYSQL_LDFLAGS: '${MYSQL_LDFLAGS}
  166. postgresql support: '${pq}'
  167. UpTools will be Built on: '${build}'
  168. UpTools will Built for: '${host}'
  169. Now type 'make'  in order to compile
  170. If you want to test your compiling type 'make check'
  171. After compiling, you can install with 'make install'
  172. At the end, you can check your installation with 'make installcheck'