File: configure.ac

package info (click to toggle)
python-visual 1%3A5.12-1.6
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd, stretch
  • size: 7,708 kB
  • ctags: 7,635
  • sloc: cpp: 15,593; sh: 9,615; ansic: 6,631; python: 4,737; makefile: 384
file content (90 lines) | stat: -rw-r--r-- 3,161 bytes parent folder | download | duplicates (3)
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90

# Process this file with Autoconf to produce a configure script

AC_INIT( [Visual Python], [5.12_release], [visualpython-users@lists.sourceforge.net])
AM_INIT_AUTOMAKE( visual, 5.12_release)

AC_CONFIG_SRCDIR(src/core/arrow.cpp)

# Compiling C and C++ code

AC_PROG_CC
AM_PROG_CC_C_O
AC_PROG_CPP
AC_PROG_CXX
AC_PROG_MAKE_SET
AC_CANONICAL_BUILD
AC_CANONICAL_HOST
AC_DISABLE_STATIC
AC_PROG_LIBTOOL

AM_MAINTAINER_MODE

# Determine if we are on MS Windows or Apple OSX.
# These and other VISUAL routines are found in acinclude.m4.
VISUAL_CHECK_PLATFORM()

# Determine the location of Python and its directories
AM_PATH_PYTHON(2.2)

# Verify that Numeric prerequisites are available.
VISUAL_NUMERICLIBS()

AM_CHECK_PYTHON_HEADERS([], [
	AC_MSG_ERROR([A suitable python interpreter was found, but you do not have the header files required for building C/C++ extensions to python, or another problem was encoutered when compiling a program that uses Python.h.])])

PKG_PROG_PKG_CONFIG()
if test $platform_win32 = yes; then
	# Some Windows-specific macros.  The first two are used exclusively by the
	# .iss.in script
	# The current working directory, as a backslashified Win32 style path.
	AC_SUBST([WIN32_CWD], [`pwd -W | sed -e "s/\\//\\\\\/g"`])
	# The top-level source directory.
	AC_SUBST([WIN32_SRCDIR], [`cd $srcdir ; pwd -W | sed -e "s/\\//\\\\\/g"`])
	# The major.minor version of Python, with the "." stripped out.
	AC_SUBST([WIN32_PYTHON_VERSION], [`echo $PYTHON_VERSION | sed -e "s/\.//"`])
fi

# Check whether key libraries are available and give feedback.
PKG_CHECK_MODULES( GTKGLEXTMM, gtkglextmm-1.2 >= 1.2, ,
		[AC_MSG_ERROR([gtkglextmm 1.2 is required])])
PKG_CHECK_MODULES( GLIBMM, glibmm-2.4, ,
		[AC_MSG_ERROR([glibmm-2.4 is required])])
PKG_CHECK_MODULES( PANGOMM, pangomm-1.4, ,
		[AC_MSG_ERROR([pangomm-1.4 is required])])
PKG_CHECK_MODULES( LIBGLADEMM, libglademm-2.4, ,
		[AC_MSG_ERROR([libglademm-2.4 is required])])
PKG_CHECK_MODULES( PANGOFT2, pangoft2, ,
		[AC_MSG_ERROR([pangoft2 is required])])
PKG_CHECK_MODULES( FREETYPE2, freetype2, ,
		[AC_MSG_ERROR([freetype2 is required])])

# Having checked various libraries individually, now repeat the check for the
# whole set of them, and this information will be used for compilation and linking.
PKG_CHECK_MODULES( GTK, [gtkglextmm-1.2 >= 1.2 pangoft2 glibmm-2.4 pangomm-1.4 libglademm-2.4 freetype2], ,
		[AC_MSG_ERROR([gtkglextmm 1.2, pangoft2, glibmm-2.4, and pangomm-1.4 libglademm-2.4 are required on Unix-like systems])])
AC_SUBST([GTK_LIBS])
AC_SUBST([GTK_CFLAGS])
	
PKG_CHECK_MODULES( GTHREAD, gthread-2.0 >= 2.0, ,
		[AC_MSG_ERROR(GThread 2.0+ is required on Unix-like systems)])
AC_SUBST([GTHREAD_CFLAGS])
AC_SUBST([GTHREAD_LIBS])

# Enable documentation and visualdocdir if desired
VISUAL_DOCS()
# Enable demos and visualdemodir if desired
VISUAL_EXAMPLES()

if test "x$PYTHONPATH" = "x" ; then
	python_path="\$PYTHONPATH"
else
	python_path="$PYTHONPATH:\$PYTHONPATH"
fi
AC_SUBST([PYTHONPATH], "$python_path")

AC_CONFIG_FILES( Makefile src/Makefile site-packages/visual/Makefile 
	docs/Makefile examples/Makefile bin/vpython)
AM_CONFIG_HEADER( include/config.h)

AC_OUTPUT()