1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
AC_INIT(Makefile.in)
AC_PROG_CPP
AC_PROG_CXX
AC_CHECK_EXTRA
AC_SEARCH_LIBS(dlopen, dl)
if test "$ac_cv_search_dlopen" = "-ldl"; then
LDFLAGS="$ac_cv_search_dlopen"
fi
AC_HEADER_STDC
AC_CHECK_HEADERS(unistd.h)
AC_CHECK_HEADERS(string.h)
AC_CHECK_HEADERS(pthread.h,,echo "-> Error: pthread.h could not be found. Try --with-extra-includes=<dirs>"; exit 1;)
AC_CHECK_HEADERS(mysql/mysql.h,,echo "-> Error: mysql.h could not be found. Try --with-extra-includes=<dirs>"; exit 1;)
AC_CHECK_LIB(mysqlclient,mysql_init,,"-> Error: libmysqlclient could not be found. Try --with-extra-libs=<dirs>"; exit 1;)
AC_CHECK_HEADERS(netinet/in.h,,echo "-> Error: netinet/in.h could not be found. Try --with-extra-includes=<dirs>"; exit 1;)
AC_CHECK_HEADERS(sys/time.h,,echo "-> Error: sys/time.h could not be found. Try --with-extra-includes=<dirs>"; exit 1;)
AC_CHECK_LIB(ncurses,newwin,,"-> Error: libncurses could not be found. Try --with-extra-libs=<dirs>";exit 1;)
AC_CHECK_HEADERS(ncurses.h,,echo "-> Error ncurses.h could not be found. Try --with-extra-includes=<dirs"; exit1;)
AC_C_CONST
AC_C_INLINE
AC_OUTPUT(Makefile)
echo "You are now ready to compile. Type make"
|