aboutsummaryrefslogtreecommitdiffstats
path: root/configure.ac
blob: 203f7ce8ef60f99872894258825ccaeb270202d5 (plain) (blame)
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
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
dnl Process this file with autoconf to produce a configure script.

# get rid of that stupid cache mechanism
rm -f config.cache

AC_INIT(configure.ac)
AM_INIT_AUTOMAKE(ephoto, 5.15.0)
AM_CONFIG_HEADER(src/bin/config.h)

AC_ISC_POSIX
AC_PROG_CC
AC_HEADER_STDC
AM_ENABLE_SHARED
AM_PROG_LIBTOOL

AM_WITH_DMALLOC

dnl Set PACKAGE_LOCALE_DIR in config.h.
if test "x$LIBINTL" = "x"; then
  LIBINTL="$INTLLIBS"
fi
if test "x${prefix}" = "xNONE"; then
  AC_DEFINE_UNQUOTED(PACKAGE_LOCALE_DIR, "${ac_default_prefix}/share/locale", [Locale-specific data directory])
else
  AC_DEFINE_UNQUOTED(PACKAGE_LOCALE_DIR, "${prefix}/share/locale", [Locale-specific data directory])
fi

dnl Set PACKAGE_DATA_DIR in config.h.
if test "x${prefix}" = "xNONE"; then
  AC_DEFINE_UNQUOTED(PACKAGE_DATA_DIR, "${ac_default_prefix}/share/${PACKAGE}", [Shared Data Directory])
else
  AC_DEFINE_UNQUOTED(PACKAGE_DATA_DIR, "${prefix}/share/${PACKAGE}", [Shared Data Directory])
fi

dnl Set PACKAGE_BIN_DIR in config.h.
if test "x${datadir}" = 'x${prefix}/bin'; then
  if test "x${prefix}" = "xNONE"; then
    AC_DEFINE_UNQUOTED(PACKAGE_BIN_DIR, "${ac_default_prefix}/bin", [Installation directory for user executables])
  else
    AC_DEFINE_UNQUOTED(PACKAGE_BIN_DIR, "${prefix}/bin", [Installation directory for user executables])
  fi
else
  AC_DEFINE_UNQUOTED(PACKAGE_BIN_DIR, "${bindir}", [Installation directory for user executables])
fi

dnl Set PACKAGE_EXEC_DIR in config.h.
if test "x${prefix}" = "xNONE"; then
  AC_DEFINE_UNQUOTED(PACKAGE_EXEC_DIR, "${ac_default_prefix}/bin", [Installed directory for executables])
else
  AC_DEFINE_UNQUOTED(PACKAGE_EXEC_DIR, "${prefix}/bin", [Installed directory for executables])
fi

dnl Set PACKAGE_LIB_DIR in config.h.
if test "x${datadir}" = 'x${prefix}/lib'; then
  if test "x${prefix}" = "xNONE"; then
    AC_DEFINE_UNQUOTED(PACKAGE_LIB_DIR, "${ac_default_prefix}/lib", [Installation directory for libraries])
  else
    AC_DEFINE_UNQUOTED(PACKAGE_LIB_DIR, "${prefix}/lib", [Installation directory for libraries])
  fi
else
  AC_DEFINE_UNQUOTED(PACKAGE_LIB_DIR, "${libdir}", [Installation directory for libraries])
fi

dnl Set PACKAGE_SOURCE_DIR in config.h.
packagesrcdir=`cd $srcdir && pwd`
AC_DEFINE_UNQUOTED(PACKAGE_SOURCE_DIR, "${packagesrcdir}", [Source code directory])

PKG_CHECK_MODULES([EVAS], evas,
   [
      have_evas="Yes"
   ],
   [
      have_evas="No"
      echo "Evas was not found by pkg-config!";
      AC_MSG_ERROR([Ephoto needs evas to compile.])
   ]
)

PKG_CHECK_MODULES([ECORE_FILE], ecore-file,
   [
      have_ecoref="Yes"
   ],
   [
      have_ecoref="No"
      echo "Ecore_File was not found by pkg-config!";
      AC_MSG_ERROR([Ephoto needs ecore_file to compile.])
   ]
)

PKG_CHECK_MODULES([ECORE_EVAS], ecore-evas,
   [
      have_ecoree="Yes"
   ],
   [
      have_ecoree="No"
      echo "Ecore_Evas was not found by pkg-config!";
      AC_MSG_ERROR([Ephoto needs ecore_evas to compile.])
   ]
)

PKG_CHECK_MODULES([EDJE], edje,
   [
      have_edje="Yes"
   ],
   [
      have_edje="No"
      echo "Edje was not found by pkg-config!";
      AC_MSG_ERROR([Ephoto needs edje to compile.])
   ]
)

PKG_CHECK_MODULES([EFREET_MIME], efreet-mime,
   [
      have_efreet_mime="Yes"
   ],
   [
      have_efreet_mime="No"
      echo "Efreet_Mime was not found by pkg-config!";
      AC_MSG_ERROR([Ephoto needs efreet_mime to compile.])
   ]
)

PKG_CHECK_MODULES([EINA], eina-0,
   [
      have_eina="Yes"
   ],
   [
      have_eina="No"
      echo "Eina was not found by pkg-config!";
      AC_MSG_ERROR([Ephoto needs eina to compile.])
   ]
)

PKG_CHECK_MODULES([ETHUMB], ethumb_client,
   [
      have_ethumb="Yes"
   ],
   [
      have_ethumb="No"
      echo "Ethumb was not found by pkg-config!";
      AC_MSG_ERROR([Ephoto needs ethumb to compile.])
   ]
)

PKG_CHECK_MODULES([ELEMENTARY], elementary,
   [
      have_elementary="Yes"
   ],
   [
      have_elementary="No"
      echo "Elementary was not found by pkg-config!";
      AC_MSG_ERROR([Ephoto needs elementary to compile.])
   ]
)

AC_OUTPUT([
Makefile
ephoto.spec
data/Makefile
data/images/Makefile
data/themes/Makefile
data/themes/default/Makefile
data/themes/default/images/Makefile
src/Makefile
src/bin/Makefile
])

echo
echo
echo
echo "------------------------------------------------------------------------"
echo "$PACKAGE $VERSION"
echo "------------------------------------------------------------------------"
echo
echo "    ________   ________  ___  ___  ________  ________  ________"
echo "   /  _____/  /  __   / /  / /  / /  __   / /__  ___/ /  __   /"
echo "  /  /____   /  /_/  / /  /_/  / /  / /  /    / /    /  / /  / "
echo " /  _____/  /  _____/ /  __   / /  / /  /    / /    /  / /  /  "
echo "/  /_____  /  /      /  / /  / /  /_/  /    / /    /  /_/  /   "
echo "________/ /__/      /__/ /__/ /_______/    /_/    /_______/    "
echo
echo
echo "------------------------------------------------------------------------"
echo "$PACKAGE $VERSION"
echo "------------------------------------------------------------------------"
echo
echo "Configuration Options Summary:"
echo
echo "  Evas ............: $have_evas"
echo "  Ecore_File.......: $have_ecoref"
echo "  Ecore_Evas.......: $have_ecoree"
echo "  Edje ............: $have_edje"
echo "  Efreet_Mime .....: $have_efreet_mime"
echo "  Eina.............: $have_eina"
echo "  Ethumb...........: $have_ethumb"
echo "  Elementary.......: $have_elementary"
echo "  Libexif .........: $have_exif"
echo
echo "Installation Path.........: $prefix"
echo
echo "Compilation...............: make"
echo "Installation..............: make install"
echo