File: configure.ac

package info (click to toggle)
gnustep-dl2 0.12.0%2Bgit20250112-2
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 7,092 kB
  • sloc: objc: 68,223; makefile: 60; sh: 48
file content (117 lines) | stat: -rw-r--r-- 3,957 bytes parent folder | download
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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
# configure.in for GDL2 library
# Process this file with autoconf to produce a configure script.
#
#   Copyright (C) 2002,2004,2005 Free Software Foundation, Inc.
#
#   Written by: Mirko Viviani <mirko.viviani@gmail.com>
#
#   This file is part of the GDL2 library.
#
#   This library is free software; you can redistribute it and/or
#   modify it under the terms of the GNU Library General Public
#   License as published by the Free Software Foundation; either
#   version 3 of the License, or (at your option) any later version.
#   
#   This library is distributed in the hope that it will be useful,
#   but WITHOUT ANY WARRANTY; without even the implied warranty of
#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
#   Library General Public License for more details.
#
#   You should have received a copy of the GNU Library General Public
#   License along with this library; 
#   If not, write to the Free Software Foundation, Inc.,
#   51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA

builtin(include, config/postgres.m4)dnl
builtin(include, config/sqlite3.m4)dnl
AC_INIT

# If GNUSTEP_MAKEFILES is undefined, try to use gnustep-config to determine it.
if test -z "$GNUSTEP_MAKEFILES"; then
  GNUSTEP_MAKEFILES=`gnustep-config --variable=GNUSTEP_MAKEFILES 2>&5`
fi

if test -z "$GNUSTEP_MAKEFILES"; then
  AC_MSG_ERROR([You must set GNUSTEP_MAKEFILES or run the GNUstep initialization script first!])
fi

AC_CONFIG_HEADER(config.h)


#--------------------------------------------------------------------
# Check for Postgres database
#--------------------------------------------------------------------

AM_PATH_PGSQL(enable_pgsql=yes, enable_pgsql=no)
if test $enable_pgsql = yes; then
  EOADAPTORS="$EOADAPTORS PostgreSQLAdaptor"
  AC_CONFIG_FILES([EOAdaptors/PostgreSQLAdaptor/GNUmakefile EOAdaptors/PostgreSQLAdaptor/config.mak])

  HAVE_PGSQL=1
#  AC_DEFINE(HAVE_LIBXML,1,
#           [Define if libxml available])
else
  HAVE_PGSQL=0
fi

#--------------------------------------------------------------------
# Check for SQLite3 database 
#--------------------------------------------------------------------
AM_PATH_SQLITE3(enable_sqlite3=yes, enable_sqlite3=no)
if test $enable_sqlite3 = yes; then
  EOADAPTORS="$EOADAPTORS SQLiteAdaptor"
  AC_CONFIG_FILES([EOAdaptors/SQLiteAdaptor/GNUmakefile])
  HAVE_SQLITE3=1
else
  HAVE_SQLITE3=0
fi


AC_SUBST(EOADAPTORS)

# FIXME: Once we have a generic reliable way to test-link GNUstep projects
#        this should be replaced with that technique.
GUI_SUBPROJECTS=""
AC_ARG_ENABLE(gui-projects,
	[  --disable-gui-projects to disable building GUI projects], ,
	enable_gui_projects=yes)
if test "$enable_gui_projects" = "yes"; then
  GUI_SUBPROJECTS="$GUI_SUBPROJECTS EOInterface Apps/EOModeler Apps/EOModelEditor"
fi

AC_ARG_ENABLE(gorm-palette,
	[  --disable-gorm-palette to disable building gorm palette], ,
	enable_gorm_palette=${enable_gui_projects})
if test "$enable_gorm_palette" = "yes"; then
  GUI_SUBPROJECTS="$GUI_SUBPROJECTS GDL2Palette"
fi
AC_SUBST(GUI_SUBPROJECTS)

EXAMPLE_SUBPROJECTS=""
AC_ARG_ENABLE(examples,
	[  --enable-examples to enable building examples from top level], ,
	enable_examples=no)
if test "$enable_examples" = "yes"; then
  EXAMPLE_SUBPROJECTS=" Examples"
fi
AC_SUBST(EXAMPLE_SUBPROJECTS)

#--------------------------------------------------------------------
# Record the version
#--------------------------------------------------------------------
AC_MSG_CHECKING(for the version of GDL2 we are compiling)
if test -f "Version"; then
  . ./Version
fi
AC_MSG_RESULT($VERSION)
AC_SUBST(VERSION)
AC_SUBST(MAJOR_VERSION)
AC_SUBST(MINOR_VERSION)
AC_SUBST(SUBMINOR_VERSION)
AC_SUBST(GCC_VERSION)

#--------------------------------------------------------------------
# Write the Makefiles
#--------------------------------------------------------------------
AC_CONFIG_FILES([gdl2.make GNUmakefile EOAdaptors/GNUmakefile])
AC_OUTPUT