summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorJinkun Jang <jinkun.jang@samsung.com>2013-03-12 16:48:44 (GMT)
committerJinkun Jang <jinkun.jang@samsung.com>2013-03-12 16:48:44 (GMT)
commit8844d894be764f9924fea5a9415f9203b97c02a3 (patch)
tree0fac7e9a9cc7c490cafb95f53c4ae863402833c8 /configure.ac
parenta1587a945a0ed4e72ad4fffd3de37ed6e6ccc2d6 (diff)
downloadlibslp-location-8844d894be764f9924fea5a9415f9203b97c02a3.zip
libslp-location-8844d894be764f9924fea5a9415f9203b97c02a3.tar.gz
libslp-location-8844d894be764f9924fea5a9415f9203b97c02a3.tar.bz2
Tizen 2.1 base
Diffstat (limited to 'configure.ac')
-rwxr-xr-xconfigure.ac89
1 files changed, 89 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
new file mode 100755
index 0000000..06e7dfd
--- /dev/null
+++ b/configure.ac
@@ -0,0 +1,89 @@
+# Initialize
+AC_PREREQ(2.61)
+AC_INIT(Location, 0.1, [sena06.kim@samsung.com])
+AC_CONFIG_AUX_DIR([build-aux])
+AC_CONFIG_MACRO_DIR([m4])
+AC_CONFIG_HEADER([config.h])
+AC_CONFIG_SRCDIR([location])
+AM_INIT_AUTOMAKE([1.10.2 foreign -Wall -Werror])
+
+# Check programs for making executable
+AC_PROG_CC
+AM_PROG_CC_C_O
+AC_PROG_INSTALL
+
+# Check programs for making libraries.
+AM_PROG_LIBTOOL
+AC_PATH_PROG(GLIB_GENMARSHAL, glib-genmarshal)
+
+# Add default build options to CFLAGS, LDFLAGS
+if test "x$GCC" = "xyes"; then
+ CFLAGS="$CFLAGS -Wall" # -Werror
+ LDFLAGS="$LDFLAGS -Wl,-z,defs -Wl,--as-needed -Wl,--hash-style=both"
+fi
+
+# Add -g option to CFLAGS
+AC_ARG_ENABLE([debug],
+ [AC_HELP_STRING([--enable-debug],[turn on debugging [default=no]])],
+ [case "${enableval}" in
+ yes) enable_dbg=yes ;;
+ no) enable_dbg=no ;;
+ *) AC_MSG_ERROR([Bad value ${enableval} for --enable-debug]) ;;
+ esac],[enable_dbg=no])
+if ([test "x$enable_dbg" = xyes]); then
+ CFLAGS="$CFLAGS -g"
+fi
+
+# Check GCC EFL visibility
+AC_MSG_CHECKING(for ELF visibility)
+AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM([[
+ __attribute__((visibility("default")))
+ int var=10;
+ ]])],
+ [has_visibility=yes
+ AC_DEFINE([EXPORT_API], [__attribute__((visibility("default")))], [Symbol visibility prefix])
+ CFLAGS="$CFLAGS -fvisibility=hidden"],
+ [has_visibility=no
+ AC_DEFINE([EXPORT_API], [], [Symbol visibility prefix]) ]
+)
+AC_MSG_RESULT($has_visibility)
+
+# Check dependencies
+PKG_CHECK_MODULES(LOCATION, [glib-2.0 gobject-2.0 dbus-glib-1 gmodule-2.0 vconf vconf-internal-keys location-appman])
+AC_SUBST(LOCATION_LIBS)
+AC_SUBST(LOCATION_CFLAGS)
+
+#PKG_CHECK_MODULES(TEST, [glib-2.0 gconf-2.0 json-glib-1.0])
+#AC_SUBST(TEST_LIBS)
+#AC_SUBST(TEST_CFLAGS)
+
+# Check dlog libraries
+AC_ARG_ENABLE([dlog],
+ [AC_HELP_STRING([--enable-dlog],[show dlog message [default=no]])],
+ [case "${enableval}" in
+ yes) enable_dlog=yes ;;
+ no) enable_dlog=no ;;
+ *) AC_MSG_ERROR([Bad value ${enableval} for --enable-dlog]) ;;
+ esac],[enable_dlog=no])
+if ([test "x$enable_dlog" = xyes]); then
+ PKG_CHECK_MODULES(DLOG, [dlog], have_dlog="yes", have_dlog="no")
+ AC_SUBST(DLOG_LIBS)
+ AC_SUBST(DLOG_CFLAGS)
+ if test "x$have_dlog" = "xyes"; then
+ LOCATION_CFLAGS="$LOCATION_CFLAGS -DLOCATION_DLOG_DEBUG $DLOG_CFLAGS"
+ LOCATION_LIBS="$LOCATION_LIBS $DLOG_LIBS"
+ fi
+fi
+
+# Generate files
+AC_CONFIG_FILES([
+location.pc
+Makefile
+location/Makefile
+location/manager/Makefile
+location/map-service/Makefile
+location/module/Makefile
+])
+
+AC_OUTPUT