Comments (6)
the idea was that the application should include re.mk
in its Makefile
.
then the application will get the same flags as re. is this possible in your app ?
my goal is to reduce the number of #ifdef
s.
for example the following defines might be subject to removal:
HAVE_INTTYPES_H
HAVE_INET6
HAVE_GAI_STRERROR
what do you think about remove these ?
the goal should be that the re API is source and binary compatible,
independently of which flags are set/unset.
from re.
is this possible in your app ?
I'm currently including it via CMake via the use of the pkgconfig file, so I don't think so. But perhaps CMake has a Makefile compatibility layer? No idea tbh. In any case, since re has a pkgconfig file, IMHO it should be striven for that the library can be used with pkg-config
alone, essentially
cc foo.c `pkg-config --cflags --libs libre` -o foo
should work fine and not require foo.c
to define HAVE_INTTYPES_H
& co.
what do you think about remove these ?
That will probably resolve 90% of the issues but not all of them (like USE_ZLIB
). I would also like an approach that resolves this issue 100% without generating any headers but at this point I'm uncertain whether that's possible. The alternative is of course to expose the defines directly in the pkgconfig file but that is a bit messy. Edit: This is actually what I've done in my Meson support branch for now (should I create a PR for that? 😉).
from re.
the pkg-config file is generated in Makefile:
libre.pc:
@echo 'prefix='$(PREFIX) > libre.pc
@echo 'exec_prefix=$${prefix}' >> libre.pc
@echo 'libdir=$${prefix}/lib' >> libre.pc
@echo 'includedir=$${prefix}/include/re' >> libre.pc
@echo '' >> libre.pc
@echo 'Name: libre' >> libre.pc
@echo 'Description: ' >> libre.pc
@echo 'Version: '$(VERSION) >> libre.pc
@echo 'URL: http://creytiv.com/re.html' >> libre.pc
@echo 'Libs: -L$${libdir} -lre' >> libre.pc
@echo 'Libs.private: -L$${libdir} -lre ${LIBS}' >> libre.pc
@echo 'Cflags: -I$${includedir}' >> libre.pc
so you could add all the mentioned flags to the Cflags section, would that work ?
from re.
Could do but the defines are not prefixed so they might clash. I guess it would be an adequate compromise for now.
from re.
@lgrahl are you planning to do any work on this ?
from re.
I have added the item to the roadmap:
https://github.com/creytiv/re/wiki/Roadmap
from re.
Related Issues (20)
- Some example about JSON may mislead in retest HOT 1
- DNS client only queries first server (in most cases) HOT 5
- add RFC 6062 HOT 2
- accept 401 to re-REGISTER without WWW-Authenticate stale=true HOT 7
- Use database insted of File
- DNS resolution does not respect local configuration (/etc/hosts, avahi *.local, nsswitch.conf, etc) HOT 1
- Is there any demo for ICE ? HOT 1
- Can't Build on Docker from source HOT 2
- Can I use libre and librem in windows applications? How to compile as dll? HOT 7
- Via header address is set before TCP connection is established
- How to use rtmp_send_video to publish H264 frame?
- Issue with RTP Video over Network
- Upstream .so name versioning?
- Compilation with musl-libc fails
- libre can work based on the thirdpary Lwip?
- SIGABRT after tcp_close_handler derefs conn one too many times (race condition on socket close) HOT 2
- auth won't work for binary passwords containing zero byte characters
- config with sip device
- Shani gujjar
- WEB
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from re.