Skip to content
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

Fix support for cross-compilation: mysql_config and dtrace #384

Closed
rdmark opened this issue Aug 19, 2023 · 1 comment
Closed

Fix support for cross-compilation: mysql_config and dtrace #384

rdmark opened this issue Aug 19, 2023 · 1 comment

Comments

@rdmark
Copy link
Member

rdmark commented Aug 19, 2023

Description: Fix support cross-compilation
 netatalk fails to cross build from source,
 because it...
  a) fails detecting mysql libraries using mysql_config.
     During cross compilation,
     mysql_config does not work.
  b) runs the build architecture compiler via dtrace.
 .
 This patch makes netatalk consult pkg-config before mysql_config
 and supports exporting the compiler as CC environment variable.
Author: Helmut Grohne <helmut@subdivi.de>
Forwarded: no
Bug-Debian: https://bugs.debian.org/912091
Bug-Debian: https://bugs.debian.org/977570
Last-Update: 2020-12-16
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- a/macros/cnid-backend.m4
+++ b/macros/cnid-backend.m4
@@ -120,7 +120,9 @@
     )

     if test -z "$MYSQL_CONFIG" -a -z "$MYSQL_CFLAGS" -a -z "$MYSQL_LIBS" ; then
-        AC_PATH_PROG(MYSQL_CONFIG, mysql_config)
+       PKG_CHECK_MODULES([MYSQL],[mysqlclient],[],[
+          AC_PATH_PROG(MYSQL_CONFIG, mysql_config)
+        ])
     fi

     if test -x "$MYSQL_CONFIG" ; then
--- a/etc/afpd/Makefile.am
+++ b/etc/afpd/Makefile.am
@@ -90,7 +90,7 @@
 DTRACE_OBJ = afpd-afp_dsi.o afpd-fork.o afpd-appl.o afpd-catsearch.o afpd-directory.o afpd-enumerate.o afpd-file.o afpd-filedir.o
 afp_dtrace.o: $(top_srcdir)/include/atalk/afp_dtrace.d $(DTRACE_OBJ)
        if test -f afp_dtrace.o ; then rm -f afp_dtrace.o ; fi
-       $(LIBTOOL) --mode=execute dtrace -G -s $(top_srcdir)/include/atalk/afp_dtrace.d -o afp_dtrace.o $(DTRACE_OBJ)
+       CC=$(CC) $(LIBTOOL) --mode=execute dtrace -G -s $(top_srcdir)/include/atalk/afp_dtrace.d -o afp_dtrace.o $(DTRACE_OBJ)
 afpd_LDADD += afp_dtrace.o @DTRACE_LIBS@
 CLEANFILES += afp_dtrace.o
 endif
@rdmark rdmark changed the title Fix support for cross-compilation: mysql_config and afpd Fix support for cross-compilation: mysql_config and dtrace Aug 19, 2023
@rdmark
Copy link
Member Author

rdmark commented Aug 20, 2023

PR in #392

@rdmark rdmark closed this as completed Aug 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Status: Done
Development

No branches or pull requests

1 participant