Reply 100 of 131, by Qbix
- Rank
- DOSBox Author
can you type
sdl-config --cflag
Water flows down the stream
How to ask questions the smart way!
can you type
sdl-config --cflag
Water flows down the stream
How to ask questions the smart way!
gulikoza's sdl-config does this:
--cflags)
echo -I${prefix}/include/SDL -D_GNU_SOURCE=1 -Dmain=SDL_main
The problem is, that SDL's make native copies all the include files directly to /usr/iinclude, and not to /usr/include/SDL.
Hence my note to edit SDL's Makefile to do 2 copy-operations:
1. Copying bin, lib and share to $(prefix)
2. Copying include to $(prefix)/include/SDL
-install:
- cp -rv bin include lib share $(prefix)/
- @ln -sf i386-mingw32msvc-sdl-config $(prefix)bin/sdl-config
+install::
+ cp -rv bin lib share $(prefix)/
+ @(cd $(prefix)/bin && \
+ ln -sf i386-mingw32msvc-sdl-config sdl-config)
+ cp -rv include $(prefix)/include/SDL
DOSBox 60 seconds guide | How to ask questions
_________________
Lenovo M58p | Core 2 Quad Q8400 @ 2.66 GHz | Radeon R7 240 | LG HL-DT-ST DVDRAM GH40N | Fedora 32
or modify sdl-config to show the right dir.
dosbox uses as far as I know sdl-config to find the right dirs
Water flows down the stream
How to ask questions the smart way!
Anything is possible. I just prefer to do things 'right' instead of merely 'work'. And the 'right' way is for each product (like SDL) to install its product-specfic include files in /usr/include/<product> (or /usr/local/include/<product>). It makes for less of a surprise and gotcha when things are configure in a standardized way.
DOSBox 60 seconds guide | How to ask questions
_________________
Lenovo M58p | Core 2 Quad Q8400 @ 2.66 GHz | Radeon R7 240 | LG HL-DT-ST DVDRAM GH40N | Fedora 32
franpa: you're not compiling SDL, you're just installing devel package, which at this point seems so broken it's not worth installing 😜 Download full source SDL-1.2.11.tar.gz and compile that...
minimax: you can use whatever SDL you want, but using the latest (or even checking out svn version) is usually best. Autogen is needed if you use plain cvs sources (not pcnwstage tgz) or if you edit any of the .am files. If configure is already there, autogen is not needed. --prefix is not needed with dosbox, I usually just copy the resulting exe (in the src dir) to some other location...
I guess I can use just about any SDL-version. My interest is in defining a build-environment (MSVC version, gcc version, SDL version, g++ version, automake version, etc) that matches what was used to build the different, official 0.70 releases.
Setting --prefix=/some/empty/dir would allow me verify what is being installed and where.
(yes, I am a control freak)
DOSBox 60 seconds guide | How to ask questions
_________________
Lenovo M58p | Core 2 Quad Q8400 @ 2.66 GHz | Radeon R7 240 | LG HL-DT-ST DVDRAM GH40N | Fedora 32
Mine:
install mingw (MinGW-3.1.0-1.exe)
install msys (MSYS-1.0.10.exe), point it to the mingw directory if asked
install msysDTK (msysDTK-1.0.1.exe)
download sdl sources (SDL-1.2.11.zip) and extract somewhere
goto sdl directory:
./configure
make
make install
download dosbox sources (clean cvs here)
goto dosbox directory:
./autogen.sh
./configure --prefix=/what/ever/you/like
make
make install
Works just smooth. Simply works, ever did.
MiniMax: most makefiles support DESTDIR parameter. Do a normal configure --prefix=/usr; make and then 'make DESTDIR=/some/dir install' and everything will install to that dir. You can package it and unzip it later to real /usr. This is how slackware makes packages and I like it 😀
Modifying prefix will sometimes cause the prefix to be built into the libraries and they will only work from that directory!
> MiniMax: most makefiles support DESTDIR parameter.
Hmm - who/what implements that? I have never examined how the whole automake/configure complex works. Is DESTDIR something that automake provides? Or is it something the maintainer of makefile.am(?) is providing? I don't want to rely on something that is merely a side-effect of some specific implementation.
DOSBox 60 seconds guide | How to ask questions
_________________
Lenovo M58p | Core 2 Quad Q8400 @ 2.66 GHz | Radeon R7 240 | LG HL-DT-ST DVDRAM GH40N | Fedora 32
so download and install http://www.libsdl.org/release/SDL-1.2.11.zip ?
AMD Ryzen 3700X | ASUS Crosshair Hero VIII (WiFi) | 16GB DDR4 3600MHz RAM | MSI Geforce 1070Ti 8GB | Windows 10 Pro x64.
my website
That's the one i used.
minimax...yes I think all automake generated makefiles support dest dir, if handwritten then it depends on the implementation. You can of course do a quick search in the Makefile...if you find DESTDIR somewhere then it will work 😀
gulikoza: Yep! DESTDIR seems safe to use.
From the automake manual:
Staged installs […]
Staged installs
Automake generates support for the DESTDIR variable in all install rules. DESTDIR is used during the make install step to relocate install objects into a staging area. Each object and path is prefixed with the value of DESTDIR before being copied into the install area. Here is an example of typical DESTDIR usage:
make DESTDIR=/tmp/staging install
This places install objects in a directory tree built under /tmp/staging. If /gnu/bin/foo and /gnu/share/aclocal/foo.m4 are to be installed, the above command would install /tmp/staging/gnu/bin/foo and /tmp/staging/gnu/share/aclocal/foo.m4.
This feature is commonly used to build install images and packages. For more information, see Makefile Conventions.
Support for DESTDIR is implemented by coding it directly into the install rules. If your Makefile.am uses a local install rule (e.g., install-exec-local) or an install hook, then you must write that code to respect DESTDIR.
Got to test it with DESTDIR="/path/with spaces in"...
DOSBox 60 seconds guide | How to ask questions
_________________
Lenovo M58p | Core 2 Quad Q8400 @ 2.66 GHz | Radeon R7 240 | LG HL-DT-ST DVDRAM GH40N | Fedora 32
wrote:I guess I can use just about any SDL-version. My interest is in defining a build-environment (MSVC version, gcc version, SDL version, g++ version, automake version, etc) that matches what was used to build the different, official 0.70 releases.
I can provide you with the exact version numbers and (possible) modifications I made if you want to have it identical to mine. (although mine is a cross-compiler hosted on a linux system)
Water flows down the stream
How to ask questions the smart way!
Baaaahhhh!!!
$ make install DESTDIR="/path/with spaces in"
make[3]: Entering directory `/mingw/dosbox-0.70/src'
/bin/sh ../mkinstalldirs /path/with spaces in/usr/local/bin
mkdir -p -- /path/with spaces in/usr/local/bin
/bin/install -c dosbox.exe /path/with spaces in/usr/local/bin/dosbox.exe
/bin/install: installing multiple files, but last argument, `in/usr/local/bin/dosbox.exe' is not a directory
Try `/bin/install --help' for more information.
make[3]: *** [install-binPROGRAMS] Error 1
make[3]: Leaving directory `/mingw/dosbox-0.70/src'
make[2]: *** [install-am] Error 2
make[2]: Leaving directory `/mingw/dosbox-0.70/src'
make[1]: *** [install-recursive] Error 1
make[1]: Leaving directory `/mingw/dosbox-0.70/src'
make: *** [install-recursive] Error 1
PROGRAMMERS: USE MORE QUOTES!!!
DOSBox 60 seconds guide | How to ask questions
_________________
Lenovo M58p | Core 2 Quad Q8400 @ 2.66 GHz | Radeon R7 240 | LG HL-DT-ST DVDRAM GH40N | Fedora 32
Did you try single quotes?
why use spaces in the first place? Do a make DESTDIR=/package install
or try escaping spaces 😀 make DESTDIR=/some\ path\ with\ space/dir install 😁
wd: Did you try single quotes?
Just did - no change.
gulikoza: why use spaces in the first place?
Primarily because my HOME directory contains spaces. Second, because I like to bash programmers that naïve thinks the world is a simple place. Ever since I spent hours porting VAX-code with assumed little-endian byte-order to machines with big-endian registers....
gulikoza: try escaping spaces
It won't make any difference. The interpretating of the quoting/escaping is done by the shell when it constructs the argument list. make never sees a difference. I could try to double-escape or double-quote, but that is plain silly.
DOSBox 60 seconds guide | How to ask questions
_________________
Lenovo M58p | Core 2 Quad Q8400 @ 2.66 GHz | Radeon R7 240 | LG HL-DT-ST DVDRAM GH40N | Fedora 32
Let's bash Microsoft for allowing spaces 😁
1+1=10
The interpretating of the quoting/escaping is done by the shell when it constructs the argument list.
Well the single quotes should be evaluated at a different point. But neither
tested it nor ever can remember how they work. Try playing with them,
stacking \"' in funny amounts. Or remove the spaces 😉