stefanhaustein / TerminalImageViewer

Small C++ program to display images in a (modern) terminal using RGB ANSI codes and unicode block graphics characters
Other
1.56k stars 111 forks source link

Adding autoconf build system #47

Closed boretom closed 5 years ago

boretom commented 5 years ago

Hi,

I'm creating a package for Entware and the basic Makefile posed a bit of limitation. This autoconf is pretty basic since I'm very new to it but it did the job for Entware (armv5, armv7, mips, x64) and macos. For macos you'll need to install gcc using brew since Xcode doesn't provide experimental/filesystem.

You start by running autoreconf --install after the checkout, and ./configure & make after that. On macos, for the configuration I run CPPFLAGS="-I/usr/local//Cellar/gcc/8.3.0/include/c++/8.3.0/ ./configure

Btw: I did change to c++11 instead of c++17, just because it worked :)

Maybe you want to give it a go some time.

/Thomas

stefanhaustein commented 5 years ago

The autoconf looks longer than the program itself O:) Do you know why it's needed? Does it need cross-compiling? I was hoping that the code is basic enough that it would just build / work everywhere....

I think another issue might be that the snap uses the makefile?

boretom commented 5 years ago

Hi Stefan,

First I wanted do say that it’s a really lovely program. I was looking for something like it to use in a terminal for a NAS, just to have a quick look at some pictures. Excellent job!

Yes you’re right it is longer then the program code itself. I guess it’s not really needed if the goal is to have as little code as necessary. It’s just very convenient for cross-compiling. Extending the current Makefile would probably do.

Now that it compiles with Enware I had a look at the original Makefile and did work on it to make it cross-compile. I create a pull request so you can have a look at it.

Have a good day Thomas

On 22 March 2019 at 23:37:55, Stefan Haustein (notifications@github.com) wrote:

The autoconf looks longer than the program itself O:) Do you know why it's needed? Does it need cross-compiling? I was hoping that the code is basic enough that it would just build / work everywhere....

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/stefanhaustein/TerminalImageViewer/pull/47#issuecomment-475805128, or mute the thread https://github.com/notifications/unsubscribe-auth/AADL-okkNU8Uktqf-amiA2_8EtrfDlOoks5vZVtDgaJpZM4cEfcy .

stefanhaustein commented 5 years ago

Thanks a lot! Closing this and accepting the Makefile improvements