| 1 |
# -*- Autoconf -*- |
|---|
| 2 |
# Process this file with autoconf to produce a configure script. |
|---|
| 3 |
|
|---|
| 4 |
# we need at least version 2.59 of autoconf |
|---|
| 5 |
AC_PREREQ(2.59) |
|---|
| 6 |
|
|---|
| 7 |
# name and version for package |
|---|
| 8 |
AC_INIT(configure.ac) |
|---|
| 9 |
AM_INIT_AUTOMAKE(nekopluck, 0.0.1) |
|---|
| 10 |
|
|---|
| 11 |
# make sure we're looking in the right place, for --srcdir |
|---|
| 12 |
AC_CONFIG_SRCDIR([config.h.in]) |
|---|
| 13 |
|
|---|
| 14 |
# config defines go into this file |
|---|
| 15 |
AC_CONFIG_HEADER([config.h]) |
|---|
| 16 |
|
|---|
| 17 |
# Checks for programs. |
|---|
| 18 |
AC_PROG_CXX |
|---|
| 19 |
AC_PROG_CC |
|---|
| 20 |
AC_PROG_CPP |
|---|
| 21 |
AC_PROG_INSTALL |
|---|
| 22 |
AC_PROG_LN_S |
|---|
| 23 |
AC_PROG_MAKE_SET |
|---|
| 24 |
AC_PROG_AWK |
|---|
| 25 |
AC_PROG_LIBTOOL |
|---|
| 26 |
|
|---|
| 27 |
# Checks for libraries. |
|---|
| 28 |
pkg_modules="gtk+-2.0 >= 2.0.0" |
|---|
| 29 |
PKG_CHECK_MODULES(PACKAGE, [$pkg_modules]) |
|---|
| 30 |
AC_SUBST(PACKAGE_CFLAGS) |
|---|
| 31 |
AC_SUBST(PACKAGE_LIBS) |
|---|
| 32 |
|
|---|
| 33 |
AC_ARG_WITH(gtk2, AC_HELP_STRING([--with-gtk2], [use GTK+ 2.0 default=yes]), |
|---|
| 34 |
[ if test $withval = "yes"; then try_gtk2=yes ; |
|---|
| 35 |
else try_gtk2=no ; fi ], try_gtk2=yes) |
|---|
| 36 |
with_gtk=no |
|---|
| 37 |
if test "x${try_gtk2}" = 'xyes'; then |
|---|
| 38 |
AM_PATH_GTK_2_0(2.0.0, with_gtk='yes (version 2.0)', with_gtk=no) |
|---|
| 39 |
fi |
|---|
| 40 |
if test "x${with_gtk}" = 'xno'; then |
|---|
| 41 |
AC_MSG_WARN("for some reason autoconf needs this") |
|---|
| 42 |
# AM_PATH_GTK(1.2.0, with_gtk='yes (version 1.2)', AC_MSG_WARN([GUI will not be built because no version of GTK+ was found])) |
|---|
| 43 |
fi |
|---|
| 44 |
AM_CONDITIONAL(BUILD_GUI, test "x${with_gtk}" != 'xno') |
|---|
| 45 |
echo "GTK support: $with_gtk" |
|---|
| 46 |
|
|---|
| 47 |
|
|---|
| 48 |
# FIXME: Replace `main' with a function in `-llo': |
|---|
| 49 |
AC_CHECK_LIB([lo], [main]) |
|---|
| 50 |
# FIXME: Replace `main' with a function in `-lm': |
|---|
| 51 |
AC_CHECK_LIB([m], [main]) |
|---|
| 52 |
# FIXME: Replace `main' with a function in `-lpthread': |
|---|
| 53 |
AC_CHECK_LIB([pthread], [main]) |
|---|
| 54 |
|
|---|
| 55 |
# Checks for header files. |
|---|
| 56 |
AC_HEADER_STDC |
|---|
| 57 |
AC_CHECK_HEADERS([stdlib.h string.h unistd.h]) |
|---|
| 58 |
|
|---|
| 59 |
# Checks for typedefs, structures, and compiler characteristics. |
|---|
| 60 |
AC_C_CONST |
|---|
| 61 |
AC_C_INLINE |
|---|
| 62 |
AC_TYPE_SIZE_T |
|---|
| 63 |
|
|---|
| 64 |
# Checks for library functions. |
|---|
| 65 |
AC_FUNC_MALLOC |
|---|
| 66 |
AC_CHECK_FUNCS([memset pow strdup strstr]) |
|---|
| 67 |
|
|---|
| 68 |
AC_CONFIG_FILES([Makefile |
|---|
| 69 |
gui/Makefile |
|---|
| 70 |
src/Makefile]) |
|---|
| 71 |
AC_OUTPUT |
|---|