Simplest change to change from pcre to pcre2
Alright, I added this PR as a patch to the Debian package, and unfortunately the build fails at the linker stage:
gcc -I/usr/include/x86_64-linux-gnu -I/usr/include/libxml2 -I/usr/include/json-c -I/usr/include/x86_64-linux-gnu -I/usr/include/nss -I/usr/include/nspr -g -O2 -ffile-prefix-map=/build/bti-034=. -fstack-protector-strong -Wformat -Werror=format-security -Wl,-z,relro -Wl,-z,now -o bti bti-config.o bti-bti.o -lcurl -lxml2 -ljson-c -loauth -ldl
/usr/bin/ld: bti-bti.o: in function `find_urls':
/tmp/buildd/bti-034/bti.c:1298: undefined reference to `pcre2_compile_8'
/usr/bin/ld: /tmp/buildd/bti-034/bti.c:1310: undefined reference to `pcre2_match_data_create_from_pattern_8'
/usr/bin/ld: /tmp/buildd/bti-034/bti.c:1312: undefined reference to `pcre2_match_8'
/usr/bin/ld: /tmp/buildd/bti-034/bti.c:1322: undefined reference to `pcre2_get_ovector_pointer_8'
/usr/bin/ld: /tmp/buildd/bti-034/bti.c:1339: undefined reference to `pcre2_code_free_8'
collect2: error: ld returned 1 exit status
If I manually add -lpcre2-8 at the end of the gcc call, it works.
Looks like there's some more autoconf/automake magic needed to get the needed flags in the needed places.
Okay, try again (pull request is automatically updated with this correction correction). I'd modified the Makefile, but not the Makefile.am - now fixed. I've checked that it builds on a fresh Fedora machine.
Thanks! This looks good indeed.
I'm able to build the package, and I can even send a tweet with it:
https://twitter.com/gregoa_/status/1462895918596820995
:)