| 1 |
###################################################################### |
|---|
| 2 |
##### Setup stuff #################################################### |
|---|
| 3 |
###################################################################### |
|---|
| 4 |
AC_PREREQ(2.53) |
|---|
| 5 |
|
|---|
| 6 |
AC_INIT(pygtkimageview, 1.1.0, [http://trac.bjourne.webfactional.com]) |
|---|
| 7 |
|
|---|
| 8 |
# foreign makes it so I don't need stupid NEWS, INSTALL, etc files. |
|---|
| 9 |
AM_INIT_AUTOMAKE([foreign]) |
|---|
| 10 |
|
|---|
| 11 |
###################################################################### |
|---|
| 12 |
##### Check for different programs ################################### |
|---|
| 13 |
###################################################################### |
|---|
| 14 |
AC_DISABLE_STATIC |
|---|
| 15 |
AC_PROG_LIBTOOL |
|---|
| 16 |
|
|---|
| 17 |
PKG_CHECK_MODULES(PYGTK, pygtk-2.0 >= 2.8.0) |
|---|
| 18 |
AC_SUBST(PYGTK_CFLAGS) |
|---|
| 19 |
AC_SUBST(PYGTK_LIBS) |
|---|
| 20 |
|
|---|
| 21 |
PKG_CHECK_MODULES(GTKIMAGEVIEW, gtkimageview >= 1.5.0) |
|---|
| 22 |
AC_SUBST(GTKIMAGEVIEW_CFLAGS) |
|---|
| 23 |
AC_SUBST(GTKIMAGEVIEW_LIBS) |
|---|
| 24 |
|
|---|
| 25 |
# Check for Python |
|---|
| 26 |
AM_PATH_PYTHON(2.2) |
|---|
| 27 |
AM_CHECK_PYTHON_HEADERS(,[AC_MSG_ERROR(could not find Python headers or library)]) |
|---|
| 28 |
|
|---|
| 29 |
AC_PATH_PROG(PYGOBJECT_CODEGEN, pygobject-codegen-2.0, no) |
|---|
| 30 |
if test "x$PYGOBJECT_CODEGEN" = xno; then |
|---|
| 31 |
dnl This is for compat with older releases when codegen was shipped |
|---|
| 32 |
dnl in pygtk. It should be removed in future releases. |
|---|
| 33 |
AC_PATH_PROG(PYGOBJECT_CODEGEN, pygtk-codegen-2.0, no) |
|---|
| 34 |
if test "x$PYGOBJECT_CODEGEN" = xno; then |
|---|
| 35 |
AC_MSG_ERROR(could not find pygobject-codegen-2.0 script) |
|---|
| 36 |
fi |
|---|
| 37 |
fi |
|---|
| 38 |
|
|---|
| 39 |
AC_PATH_PROG(GLIB_MKENUMS, glib-mkenums, no) |
|---|
| 40 |
if test "x$GLIB_MKENUMS" = xno; then |
|---|
| 41 |
AC_MSG_ERROR(could not find glib-mkenums program) |
|---|
| 42 |
fi |
|---|
| 43 |
|
|---|
| 44 |
AC_MSG_CHECKING(for pygtk defs) |
|---|
| 45 |
PYGTK_DEFSDIR=`$PKG_CONFIG --variable=defsdir pygtk-2.0` |
|---|
| 46 |
AC_SUBST(PYGTK_DEFSDIR) |
|---|
| 47 |
AC_MSG_RESULT($PYGTK_DEFSDIR) |
|---|
| 48 |
|
|---|
| 49 |
###################################################################### |
|---|
| 50 |
##### Twiddle CFLAGS ################################################# |
|---|
| 51 |
###################################################################### |
|---|
| 52 |
CFLAGS="${CFLAGS} -Wall -std=c99 -Wno-missing-prototypes" |
|---|
| 53 |
|
|---|
| 54 |
###################################################################### |
|---|
| 55 |
##### Output files ################################################### |
|---|
| 56 |
###################################################################### |
|---|
| 57 |
AC_CONFIG_FILES([ |
|---|
| 58 |
pygtkimageview.pc |
|---|
| 59 |
Makefile |
|---|
| 60 |
docs/Makefile |
|---|
| 61 |
src/Makefile |
|---|
| 62 |
tests/Makefile |
|---|
| 63 |
]) |
|---|
| 64 |
|
|---|
| 65 |
AC_OUTPUT |
|---|
| 66 |
|
|---|
| 67 |
echo " |
|---|
| 68 |
|
|---|
| 69 |
Configuration: |
|---|
| 70 |
|
|---|
| 71 |
== Global settings == |
|---|
| 72 |
Compiler: ${CC} |
|---|
| 73 |
CFLAGS: ${CFLAGS} |
|---|
| 74 |
|
|---|
| 75 |
== PyGTK settings == |
|---|
| 76 |
PYGTK_CFLAGS: ${PYGTK_CFLAGS} |
|---|
| 77 |
PYGTK_DEFSDIR: ${PYGTK_DEFSDIR} |
|---|
| 78 |
PYGOBJECT_CODEGEN: ${PYGOBJECT_CODEGEN} |
|---|
| 79 |
|
|---|
| 80 |
== Python settings == |
|---|
| 81 |
pythondir: ${pythondir} |
|---|
| 82 |
pkgpythondir: ${pkgpythondir} |
|---|
| 83 |
|
|---|
| 84 |
== glib settings == |
|---|
| 85 |
GLIB_MKENUMS: ${GLIB_MKENUMS} |
|---|
| 86 |
|
|---|
| 87 |
== GtkImageView settings == |
|---|
| 88 |
GTKIMAGEVIEW_CFLAGS ${GTKIMAGEVIEW_CFLAGS} |
|---|
| 89 |
" |
|---|