~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to configure.ac

  • Committer: Monty Taylor
  • Date: 2008-07-10 15:46:15 UTC
  • mto: (77.6.1 glibclient-merge)
  • mto: This revision was merged to the branch mainline in revision 128.
  • Revision ID: monty@inaugust.com-20080710154615-16bj5wfs7trr5o05
Fail also if we can't find libevent or pthread.h.

Show diffs side-by-side

added added

removed removed

Lines of Context:
278
278
fi
279
279
AC_SUBST(LD_VERSION_SCRIPT)
280
280
 
 
281
#--------------------------------------------------------------------
 
282
# Check for libevent
 
283
#--------------------------------------------------------------------
 
284
 
 
285
AC_CHECK_HEADERS(event.h)
 
286
if test "x$ac_cv_header_event_h" != "xyes"
 
287
then
 
288
  AC_MSG_ERROR([Couldn't find event.h. Try installing libevent development packages])
 
289
fi
 
290
AC_CHECK_LIB(event, event_loop, [], [AC_MSG_ERROR(could not find libevent)])
 
291
 
 
292
#--------------------------------------------------------------------
 
293
# Check for libpthread
 
294
#--------------------------------------------------------------------
 
295
 
 
296
AC_CHECK_HEADERS(pthread.h)
 
297
if test "x$ac_cv_header_pthread_h" != "xyes"
 
298
then
 
299
  AC_MSG_ERROR([Couldn't find pthread.h.])
 
300
fi
 
301
AC_CHECK_LIB(pthread, pthread_create, [], [AC_MSG_ERROR(could not find libpthread)])
 
302
 
 
303
#--------------------------------------------------------------------
 
304
# Check for libz
 
305
#--------------------------------------------------------------------
 
306
 
 
307
AC_CHECK_HEADERS(zlib.h)
 
308
if test "x$ac_cv_header_zlib_h" != "xyes"
 
309
then
 
310
  AC_MSG_ERROR([Couldn't find zlib.h. Try installing zlib development packages])
 
311
fi
 
312
AC_CHECK_LIB(z, crc32, [], [AC_MSG_ERROR(could not find libz)])
 
313
 
 
314
 
 
315
AC_CHECK_HEADERS([readline/readline.h])
 
316
if test "x$ac_cv_header_readline_readline_h" != "xyes"
 
317
then
 
318
  AC_MSG_ERROR([Couldn't find readline/readline.h. Try installing readline development packages.])
 
319
fi
 
320
 
 
321
#--------------------------------------------------------------------
 
322
# Check for libpcre
 
323
#--------------------------------------------------------------------
 
324
 
 
325
AC_LANG_PUSH([C++])
 
326
AC_PATH_PROG(PKG_CONFIG, pkg-config, AC_MSG_ERROR([pkg-config wasn't found.]))
 
327
PKG_CHECK_MODULES(PCRE, [libpcrecpp >= 3], [found_pcre="yes"],[
 
328
  AC_CHECK_LIB(pcrecpp, [DoMatch], [found_pcre="no"])
 
329
  AC_CHECK_HEADERS(pcrecpp.h)
 
330
  if test "x$ac_cv_header_prcecpp_h" = "xno" 
 
331
  then
 
332
    found_pcre="no"
 
333
  fi
 
334
  ])
 
335
if test "x$found_pcre" != "xyes"
 
336
then
 
337
    AC_MSG_ERROR([Couldn't find pcrecpp.h. Try installing the development package associated with libpcre on your system.])
 
338
fi
 
339
AC_LANG_POP([])
 
340
AC_SUBST(PCRE_LIBS)
 
341
AC_SUBST(PCRE_CFLAGS)
 
342
 
281
343
 
282
344
# Avoid bug in fcntl on some versions of linux
283
345
AC_MSG_CHECKING([if we should use 'skip-external-locking' as default for $target_os])
566
628
AC_CHECK_HEADERS(execinfo.h)
567
629
 
568
630
AC_CHECK_HEADERS([xfs/xfs.h])
569
 
#--------------------------------------------------------------------
570
 
# Check for libevent
571
 
#--------------------------------------------------------------------
572
 
 
573
 
AC_CHECK_LIB(event, event_loop, [], [AC_MSG_ERROR(could not find libevent)])
574
 
 
575
 
#--------------------------------------------------------------------
576
 
# Check for libpthread
577
 
#--------------------------------------------------------------------
578
 
 
579
 
AC_CHECK_LIB(pthread, pthread_create, [], [AC_MSG_ERROR(could not find libpthread)])
580
 
 
581
 
#--------------------------------------------------------------------
582
 
# Check for libz
583
 
#--------------------------------------------------------------------
584
 
 
585
 
AC_CHECK_HEADERS(zlib.h)
586
 
if test "x$ac_cv_header_zlib_h" != "xyes"
587
 
then
588
 
  AC_MSG_ERROR([Couldn't find zlib.h. Try installing zlib development packages])
589
 
fi
590
 
AC_CHECK_LIB(z, crc32, [], [AC_MSG_ERROR(could not find libz)])
591
 
 
592
 
 
593
 
AC_CHECK_HEADERS([readline/readline.h])
594
 
if test "x$ac_cv_header_readline_readline_h" != "xyes"
595
 
then
596
 
  AC_MSG_ERROR([Couldn't find readline/readline.h. Try installing readline development packages.])
597
 
fi
598
 
 
599
 
#--------------------------------------------------------------------
600
 
# Check for libpcre
601
 
#--------------------------------------------------------------------
602
 
 
603
 
AC_LANG_PUSH([C++])
604
 
AC_PATH_PROG(PKG_CONFIG, pkg-config, AC_MSG_ERROR([pkg-config wasn't found.]))
605
 
PKG_CHECK_MODULES(PCRE, [libpcrecpp >= 3], [found_pcre="yes"],[
606
 
  AC_CHECK_LIB(pcrecpp, [DoMatch], [found_pcre="no"])
607
 
  AC_CHECK_HEADERS(pcrecpp.h)
608
 
  if test "x$ac_cv_header_prcecpp_h" = "xno" 
609
 
  then
610
 
    found_pcre="no"
611
 
  fi
612
 
  ])
613
 
if test "x$found_pcre" != "xyes"
614
 
then
615
 
    AC_MSG_ERROR([Couldn't find pcrecpp.h. Try installing the development package associated with libpcre on your system.])
616
 
fi
617
 
AC_LANG_POP([])
618
 
AC_SUBST(PCRE_LIBS)
619
 
AC_SUBST(PCRE_CFLAGS)
620
 
 
621
631
 
622
632
#--------------------------------------------------------------------
623
633
# Check for system libraries. Adds the library to $LIBS