-
Notifications
You must be signed in to change notification settings - Fork 207
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
JBR-4578 Add Java ATK Wrapper #475
base: jbr21
Are you sure you want to change the base?
Changes from 9 commits
3fc3625
98bf033
039a17c
e529045
58d9f0d
b0f19d9
19e5fb3
f0a4bb6
0b79fe5
6ae0668
0abe88b
632683a
04b8638
9616ac9
810a8d5
9d5d6be
065a6c9
cb6a99e
d15082a
e4a767f
22f2e76
a1d0601
f97c33d
47171c4
3a9756d
607f976
0f15aca
0cd4556
5ff70a6
55629ed
7942a7e
7626019
3febf16
6829fe8
f83061c
744be62
91c9880
0fd66b9
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -0,0 +1,70 @@ | ||||||
################################################################################ | ||||||
# Setup at-spi2-atk | ||||||
################################################################################ | ||||||
AC_DEFUN_ONCE([LIB_SETUP_AT_SPI2_ATK], | ||||||
[ | ||||||
AC_ARG_WITH(at-spi2-atk, [AS_HELP_STRING([--with-at-spi2-atk], | ||||||
[specify prefix directory for the at-spi2-atk package | ||||||
(expecting the headers under PATH/include); required for atk-wrapper to work])]) | ||||||
AC_ARG_WITH(at-spi2-atk-include, [AS_HELP_STRING([--with-at-spi2-atk-include], | ||||||
[specify directory for the at-spi2-atk include files])]) | ||||||
AC_ARG_WITH(at-spi2-atk-version, [AS_HELP_STRING([--with-at-spi2-atk-version], | ||||||
[specify version for the at-spi2-atk package])]) | ||||||
|
||||||
if test "x$NEEDS_LIB_AT_SPI2_ATK" = xfalse || test "x${with_at_spi2_atk}" = xno || \ | ||||||
test "x${with_at_spi2_atk_include}" = xno; then | ||||||
if (test "x${with_at_spi2_atk}" != x && test "x${with_at_spi2_atk}" != xno) || \ | ||||||
(test "x${with_at_spi2_atk_include}" != x && test "x${with_at_spi2_atk_include}" != xno); then | ||||||
AC_MSG_WARN([[at-spi2-atk not used, so --with-at-spi2-atk[-*] is ignored]]) | ||||||
fi | ||||||
else | ||||||
AT_SPI2_ATK_FOUND=no | ||||||
if test "x${with_at_spi2_atk}" != x && test "x${with_at_spi2_atk}" != xyes; then | ||||||
AC_MSG_CHECKING([for at-spi2-atk header and library]) | ||||||
if test "x${with_at_spi2_atk_version}" != x && "x${with_at_spi2_atk_version}" != xyes; then | ||||||
AT_SPI2_ATK_VERSION="${with_at_spi2_atk_version}" | ||||||
else | ||||||
AC_MSG_ERROR([Define at-spi2-atk package version using --with-at-spi2-atk-version if you use --with-at-spi2-atk option.]) | ||||||
fi | ||||||
if test -s "${with_at_spi2_atk}/include/at-spi2-atk/2.0/atk-bridge.h"; then | ||||||
AT_SPI2_ATK_CFLAGS="-I${with_at_spi2_atk}/include/at-spi2-atk/2.0" | ||||||
AT_SPI2_ATK_LIBS="-L${with_at_spi2_atk}/lib -latk-bridge-2.0" | ||||||
AT_SPI2_ATK_FOUND=yes | ||||||
AC_MSG_RESULT([$AT_SPI2_ATK_FOUND]) | ||||||
else | ||||||
AC_MSG_ERROR([Can't find '/include/at-spi2-atk/2.0/atk-bridge.h' under ${with_at_spi2_atk} given with the --with-at-spi2-atk option.]) | ||||||
fi | ||||||
fi | ||||||
if test "x${with_at_spi2_atk_include}" != x; then | ||||||
AC_MSG_CHECKING([for at-spi2-atk headers]) | ||||||
if test "x${with_at_spi2_atk_version}" != x && "x${with_at_spi2_atk_version}" != xyes; then | ||||||
AT_SPI2_ATK_VERSION="${with_at_spi2_atk_version}" | ||||||
else | ||||||
AC_MSG_ERROR([Define at-spi2-atk package version using --with-at-spi2-atk-version if you use --with-at-spi2-atk-include option.]) | ||||||
fi | ||||||
if test -s "${with_at_spi2_atk_include}/at-spi2-atk/2.0/atk-bridge.h"; then | ||||||
AT_SPI2_ATK_CFLAGS="-I${with_at_spi2_atk_include}/at-spi2-atk/2.0" | ||||||
AT_SPI2_ATK_FOUND=yes | ||||||
AC_MSG_RESULT([$AT_SPI2_ATK_FOUND]) | ||||||
else | ||||||
AC_MSG_ERROR([Can't find 'include/at-spi2-atk-2.0/atk-bridge.h' under ${with_at_spi2_atk_include} given with the --with-at-spi2-atk-include option.]) | ||||||
fi | ||||||
fi | ||||||
if test "x$AT_SPI2_ATK_FOUND" = xno; then | ||||||
# Are the at-spi2-atk headers installed in the default /usr/include location? | ||||||
PKG_CHECK_MODULES([AT_SPI2_ATK], [atk-bridge-2.0], | ||||||
[AT_SPI2_ATK_FOUND=yes; AT_SPI2_ATK_VERSION=$(pkg-config --modversion atk-bridge-2.0)], | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done at 47171c4 |
||||||
[AT_SPI2_ATK_FOUND=no; break] | ||||||
) | ||||||
fi | ||||||
if test "x$AT_SPI2_ATK_FOUND" = xno; then | ||||||
HELP_MSG_MISSING_DEPENDENCY([at-spi2-atk]) | ||||||
AC_MSG_ERROR([Could not find at-spi2-atk! $HELP_MSG ]) | ||||||
else | ||||||
ATK_WRAPPER_CFLAGS="$ATK_WRAPPER_CFLAGS $AT_SPI2_ATK_CFLAGS -DATSPI_MAJOR_VERSION=$(echo $AT_SPI2_ATK_VERSION | cut -d. -f1) -DATSPI_MINOR_VERSION=$(echo $AT_SPI2_ATK_VERSION | cut -d. -f2) -DATSPI_MICRO_VERSION=$(echo $AT_SPI2_ATK_VERSION | cut -d. -f3)" | ||||||
ATK_WRAPPER_LIBS="$ATK_WRAPPER_LIBS $AT_SPI2_ATK_LIBS" | ||||||
AC_SUBST(ATK_WRAPPER_CFLAGS) | ||||||
AC_SUBST(ATK_WRAPPER_LIBS) | ||||||
fi | ||||||
fi | ||||||
]) |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
################################################################################ | ||
# Setup atk | ||
################################################################################ | ||
AC_DEFUN_ONCE([LIB_SETUP_ATK], | ||
[ | ||
AC_ARG_WITH(atk, [AS_HELP_STRING([--with-atk], | ||
[specify prefix directory for the atk package | ||
(expecting the headers under PATH/include); required for atk-wrapper to work])]) | ||
AC_ARG_WITH(atk-include, [AS_HELP_STRING([--with-atk-include], | ||
[specify directory for the atk include files])]) | ||
if test "x$NEEDS_LIB_ATK" = xfalse || test "x${with_atk}" = xno || \ | ||
test "x${with_atk_include}" = xno; then | ||
if (test "x${with_atk}" != x && test "x${with_atk}" != xno) || \ | ||
(test "x${with_atk_include}" != x && test "x${with_atk_include}" != xno); then | ||
AC_MSG_WARN([[atk not used, so --with-atk[-*] is ignored]]) | ||
fi | ||
else | ||
ATK_FOUND=no | ||
if test "x${with_atk}" != x && test "x${with_atk}" != xyes; then | ||
AC_MSG_CHECKING([for atk header and library]) | ||
if test -s "${with_atk}/include/atk-1.0/atk/atk.h"; then | ||
ATK_CFLAGS="-I${with_atk}/include/atk-1.0" | ||
ATK_LIBS="-L${with_atk}/lib -latk-1.0" | ||
ATK_FOUND=yes | ||
AC_MSG_RESULT([$ATK_FOUND]) | ||
else | ||
AC_MSG_ERROR([Can't find '/include/atk-1.0/atk/atk.h' under ${with_atk} given with the --with-atk option.]) | ||
fi | ||
fi | ||
if test "x${with_atk_include}" != x; then | ||
AC_MSG_CHECKING([for atk headers]) | ||
if test -s "${with_atk_include}/atk-1.0/atk/atk.h"; then | ||
ATK_CFLAGS="-I${with_atk_include}/atk-1.0" | ||
ATK_FOUND=yes | ||
AC_MSG_RESULT([$ATK_FOUND]) | ||
else | ||
AC_MSG_ERROR([Can't find 'include/atk-1.0/atk/atk.h' under ${with_atk_include} given with the --with-atk-include option.]) | ||
fi | ||
fi | ||
if test "x$ATK_FOUND" = xno; then | ||
# Are the atk headers installed in the default /usr/include location? | ||
PKG_CHECK_MODULES([ATK], [atk], [ATK_FOUND=yes;], [ATK_FOUND=no; break]) | ||
fi | ||
if test "x$ATK_FOUND" = xno; then | ||
HELP_MSG_MISSING_DEPENDENCY([atk]) | ||
AC_MSG_ERROR([Could not find atk! $HELP_MSG ]) | ||
else | ||
ATK_WRAPPER_CFLAGS="$ATK_WRAPPER_CFLAGS $ATK_CFLAGS" | ||
ATK_WRAPPER_LIBS="$ATK_WRAPPER_LIBS $ATK_LIBS" | ||
AC_SUBST(ATK_WRAPPER_CFLAGS) | ||
AC_SUBST(ATK_WRAPPER_LIBS) | ||
fi | ||
fi | ||
]) |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
################################################################################ | ||
# Setup glib | ||
################################################################################ | ||
AC_DEFUN_ONCE([LIB_SETUP_GLIB], | ||
[ | ||
AC_ARG_WITH(glib, [AS_HELP_STRING([--with-glib], | ||
[specify prefix directory for the glib package | ||
(expecting the headers under PATH/include); required for atk-wrapper to work])]) | ||
AC_ARG_WITH(glib-include, [AS_HELP_STRING([--with-glib-include], | ||
[specify directory for the glib include files])]) | ||
AC_ARG_WITH(glibconfig, [AS_HELP_STRING([--with-glibconfig], | ||
[specify prefix directory for the glibconfig package | ||
(expecting the headers under PATH/include); required for atk-wrapper to work])]) | ||
AC_ARG_WITH(glibconfig-include, [AS_HELP_STRING([--with-glibconfig-include], | ||
[specify directory for the glibconfig include files])]) | ||
|
||
if test "x$NEEDS_LIB_GLIB" = xfalse || test "x${with_glib}" = xno || \ | ||
test "x${with_glib_include}" = xno || \ | ||
test "x${with_glibconfig}" = xno || test "x${with_glibconfig_include}" = xno; then | ||
if (test "x${with_glib}" != x && test "x${with_glib}" != xno) || \ | ||
(test "x${with_glib_include}" != x && test "x${with_glib_include}" != xno) || \ | ||
(test "x${with_glibconfig}" != x && test "x${with_glibconfig}" != xno) || \ | ||
(test "x${with_glibconfig_include}" != x && test "x${with_glibconfig_include}" != xno); then | ||
AC_MSG_WARN([[glib not used, so --with-glib[-*] and --with-glibconfig[-*] are ignored]]) | ||
fi | ||
else | ||
GLIB_FOUND=no | ||
GLIBCONFIG_FOUND=no | ||
GLIBCONFIG_CFLAGS= | ||
if test "x${with_glib}" != x && test "x${with_glib}" != xyes; then | ||
AC_MSG_CHECKING([for glib header and library]) | ||
if test -s "${with_glib}/include/glib-2.0/glib.h"; then | ||
GLIB_CFLAGS="-I${with_glib}/include/glib-2.0" | ||
GLIB_LIBS="-L${with_glib}/lib -lglib-2.0" | ||
GLIB_FOUND=yes | ||
AC_MSG_RESULT([$GLIB_FOUND]) | ||
else | ||
AC_MSG_ERROR([Can't find '/include/glib-2.0/glib.h' under ${with_glib} given with the --with-glib option.]) | ||
fi | ||
fi | ||
if test "x${with_glib_include}" != x; then | ||
AC_MSG_CHECKING([for glib headers]) | ||
if test -s "${with_glib_include}/glib-2.0/glib.h"; then | ||
GLIB_CFLAGS="-I${with_glib_include}" | ||
GLIB_FOUND=yes | ||
AC_MSG_RESULT([$GLIB_FOUND]) | ||
else | ||
AC_MSG_ERROR([Can't find '/include/glib-2.0/glib.h' under ${with_glib_include} given with the --with-glib-include option.]) | ||
fi | ||
fi | ||
if test "x${with_glibconfig}" != x && test "x${with_glibconfig}" != xyes; then | ||
AC_MSG_CHECKING([for glibconfig header]) | ||
if test -s "${with_glibconfig}/include/glibconfig.h"; then | ||
GLIBCONFIG_CFLAGS="-I${with_glibconfig}/include" | ||
GLIBCONFIG_FOUND=yes | ||
AC_MSG_RESULT([$GLIBCONFIG_FOUND]) | ||
else | ||
AC_MSG_ERROR([Can't find '/include/glibconfig.h' under ${with_glibconfig} given with the --with-glibconfig option.]) | ||
fi | ||
fi | ||
if test "x${with_glibconfig_include}" != x; then | ||
AC_MSG_CHECKING([for glibconfig headers]) | ||
if test -s "${with_glibconfig_include}/glibconfig.h"; then | ||
GLIBCONFIG_CFLAGS="-I${with_glibconfig_include}" | ||
GLIBCONFIG_FOUND=yes | ||
AC_MSG_RESULT([$GLIBCONFIG_FOUND]) | ||
else | ||
AC_MSG_ERROR([Can't find '/include/glibconfig.h' under ${with_glibconfig_include} given with the --with-glibconfig-include option.]) | ||
fi | ||
fi | ||
if test "x$GLIB_FOUND" = xno || test "x$GLIBCONFIG_FOUND" = xno; then | ||
# Are the glib headers installed in the default /usr/include location? | ||
PKG_CHECK_MODULES([GLIB], [glib-2.0], [GLIB_FOUND=yes; GLIBCONFIG_FOUND=yes], [GLIB_FOUND=no; GLIBCONFIG_FOUND=no; break]) | ||
fi | ||
# AC_MSG_ERROR([$GLIB_CFLAGS $GLIB_LIBS]) | ||
if test "x$GLIB_FOUND" = xno || test "x$GLIBCONFIG_FOUND" = xno; then | ||
HELP_MSG_MISSING_DEPENDENCY([glib]) | ||
AC_MSG_ERROR([Could not find glib! $HELP_MSG]) | ||
else | ||
ATK_WRAPPER_CFLAGS="$ATK_WRAPPER_CFLAGS $GLIB_CFLAGS $GLIBCONFIG_CFLAGS" | ||
ATK_WRAPPER_LIBS="$ATK_WRAPPER_LIBS $GLIB_LIBS" | ||
AC_SUBST(ATK_WRAPPER_CFLAGS) | ||
AC_SUBST(ATK_WRAPPER_LIBS) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. IMHO the proper responsibility area of each From this point of view, your initial approach, where you combined all the flags together in Libs.gmk, was great. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I returned it back. But what did you mean in this comment? #475 (comment) When the custom paths flags (e.g. --with-atk-include) are used, the corresponding _CFLAGS and _LIBS flags should propagate the same dependency flags as PKG_CHECK_MODULES does for consistency. In this particular case we can just append $GLIB_CFLAGS to ATK_CFLAGS (and $GLIB_LIBS to ATK_LIBS if PKG_CHECK_MODULES does it, I haven't checked). Before doing so we may also check if GLIB_FOUND is true. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done at 607f976 |
||
fi | ||
fi | ||
]) |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
################################################################################ | ||
# Setup gobject | ||
################################################################################ | ||
AC_DEFUN_ONCE([LIB_SETUP_GOBJECT], | ||
[ | ||
AC_ARG_WITH(gobject, [AS_HELP_STRING([--with-gobject], | ||
[specify prefix directory for the gobject package | ||
(expecting the headers under PATH/include); required for atk-wrapper to work])]) | ||
AC_ARG_WITH(gobject-include, [AS_HELP_STRING([--with-gobject-include], | ||
[specify directory for the gobject include files])]) | ||
|
||
if test "x$NEEDS_LIB_GOBJECT" = xfalse || test "x${with_gobject}" = xno || \ | ||
test "x${with_gobject_include}" = xno; then | ||
if (test "x${with_gobject}" != x && test "x${with_gobject}" != xno) || \ | ||
(test "x${with_gobject_include}" != x && test "x${with_gobject_include}" != xno); then | ||
AC_MSG_WARN([[gobject not used, so --with-gobject[-*] is ignored]]) | ||
fi | ||
else | ||
GOBJECT_FOUND=no | ||
|
||
if test "x${with_gobject}" != x && test "x${with_gobject}" != xyes; then | ||
AC_MSG_CHECKING([for gobject header and library]) | ||
if test -s "${with_gobject}/include/glib-2.0/gobject/gobject.h"; then | ||
GOBJECT_CFLAGS="-I${with_gobject}/include/glib-2.0/gobject" | ||
GOBJECT_LIBS="-L${with_gobject}/lib -lgobject-2.0" | ||
GOBJECT_FOUND=yes | ||
AC_MSG_RESULT([$GOBJECT_FOUND]) | ||
else | ||
AC_MSG_ERROR([Can't find '/include/glib-2.0/gobject/gobject.h' under ${with_gobject} given with the --with-gobject option.]) | ||
fi | ||
fi | ||
if test "x${with_gobject_include}" != x; then | ||
AC_MSG_CHECKING([for gobject headers]) | ||
if test -s "${with_gobject_include}/glib-2.0/gobject/gobject.h"; then | ||
GOBJECT_CFLAGS="-I${with_gobject_include}/glib-2.0/gobject" | ||
GOBJECT_FOUND=yes | ||
AC_MSG_RESULT([$GOBJECT_FOUND]) | ||
else | ||
AC_MSG_ERROR([Can't find '/include/glib-2.0/gobject/gobject.h' under ${with_gobject_include} given with the --with-gobject-include option.]) | ||
fi | ||
fi | ||
if test "x$GOBJECT_FOUND" = xno; then | ||
# Are the gobject headers installed in the default /usr/include location? | ||
PKG_CHECK_MODULES([GOBJECT], [gobject-2.0], | ||
[ GOBJECT_FOUND=yes;], | ||
[ GOBJECT_FOUND=no; break ] | ||
) | ||
fi | ||
if test "x$GOBJECT_FOUND" = xno; then | ||
HELP_MSG_MISSING_DEPENDENCY([gobject]) | ||
AC_MSG_ERROR([Could not find gobject! $HELP_MSG ]) | ||
else | ||
ATK_WRAPPER_CFLAGS="$ATK_WRAPPER_CFLAGS $GOBJECT_CFLAGS" | ||
ATK_WRAPPER_LIBS="$ATK_WRAPPER_LIBS $GOBJECT_LIBS" | ||
AC_SUBST(ATK_WRAPPER_CFLAGS) | ||
AC_SUBST(ATK_WRAPPER_LIBS) | ||
fi | ||
fi | ||
]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done at 3a9756d